wcf – 使用InstallUtil.exe安装Windows服务时出错
发布时间:2020-12-14 02:26:55 所属栏目:Windows 来源:网络整理
导读:我在安装 Windows服务时遇到一些问题. 我按照马特的指示来创建我的服务: Easiest language for creating a Windows service 尽管我尝试过LocalService,LocalSystem和NetworkService,但ServiceAccount设置为User. 我的Windows服务的目的是为我的WCF服务创建
我在安装
Windows服务时遇到一些问题.
我按照马特的指示来创建我的服务: 尽管我尝试过LocalService,LocalSystem和NetworkService,但ServiceAccount设置为User. 我的Windows服务的目的是为我的WCF服务创建一个主机.我正在运行Win 7 64位教授. 我在PowerShell w / Admin Privelages中运行了以下内容: PS C:windowsMicrosoft.NETFramework64v2.0.50727> ./installutil "H:&;omitted>Host Windows Service.exe" 我收到以下错误: Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927 Copyright (c) Microsoft Corporation. All rights reserved. Running a transacted installation. Beginning the Install phase of the installation. See the contents of the log file for the H:&;omitted>Host Windows Service.exe assembly's progress. The file is located at H:&;omitted>Host Windows Service.InstallLog. Installing assembly 'H:&;omitted>Host Windows Service.exe'. Affected parameters are: assemblypath = H:&;omitted>Host Windows Service.exe logfile = H:&;omitted>Host Windows S ervice.InstallLog logtoconsole = Unable to create an instance of the Host_Windows_Service.ProjectInstaller installer type. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. The inner exception System.Security.SecurityException was thrown with the following error message: That assembly does no t allow partially trusted callers.. An exception occurred during the Install phase. System.InvalidOperationException: Unable to create an instance of the Host_Windows_Service.ProjectInstaller installer ty pe. The inner exception System.Reflection.TargetInvocationException was thrown with the following error message: Exception h as been thrown by the target of an invocation.. The inner exception System.Security.SecurityException was thrown with the following error message: That assembly does no t allow partially trusted callers.. The Rollback phase of the installation is beginning. See the contents of the log file for the H:&;omitted>Host Windows Service.exe assembly's progress. The file is located at H:&;omitted>Host Windows Service.InstallLog. Rolling back assembly 'H:&;omitted>Host Windows Service.exe'. Affected parameters are: assemblypath = H:&;omitted>Host Windows Service.exe logfile = H:&;omitted>Host Windows Service.InstallLog logtoconsole = Unable to create an instance of the Host_Windows_Service.ProjectInstaller installer type. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. The inner exception System.Security.SecurityException was thrown with the following error message: That assembly does no t allow partially trusted callers.. An exception occurred during the Rollback phase of the System.Configuration.Install.AssemblyInstaller installer. System.InvalidOperationException: Unable to create an instance of the Host_Windows_Service.ProjectInstaller installer ty pe. The inner exception System.Reflection.TargetInvocationException was thrown with the following error message: Exception h as been thrown by the target of an invocation.. The inner exception System.Security.SecurityException was thrown with the following error message: That assembly does no t allow partially trusted callers.. An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback wil l continue. However,the machine might not fully revert to its initial state after the rollback is complete. The Rollback phase completed successfully. The transacted install has completed. The installation failed,and the rollback has been performed. 我甚至试图完全禁用UAC而没有运气.如果您需要更多信息,请告诉我. 我很想在这里使用Matt的方法来安装Windows服务:How to make a .NET Windows Service start right after the installation?.虽然,我担心我会遇到类似的问题. 谢谢 解决方法
尝试将服务及其依赖项移动到C:驱动器并再次尝试,尤其是在H:是网络驱动器的情况下.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
热点阅读