大佬教程收集整理的这篇文章主要介绍了wcf – 使用InstallUtil.exe安装Windows服务时出错,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我按照马特的指示来创建我的服务:
Easiest language for creating a Windows service
尽管我尝试过LocalService,LocalSystem和NetworkService,但ServiceAccount设置为User.
我的Windows服务的目的是为我的WCF服务创建一个主机.我正在运行Win 7 64位教授.
我在PowerShell w / Admin Privelages中运行了以下内容:
PS C:\windows\Microsoft.NET\Framework64\v2.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?.虽然,我担心我会遇到类似的问题.
谢谢
以上是大佬教程为你收集整理的wcf – 使用InstallUtil.exe安装Windows服务时出错全部内容,希望文章能够帮你解决wcf – 使用InstallUtil.exe安装Windows服务时出错所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。