我要将iis站点身份验证从“匿名身份验证”夹到“ Windows身份验证”,但是我无法对在同一服务器上运行的Windows服务进行身份验证,因此我尝试将其添加到我的.config文件中服务
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" proxyCredentialType="None"realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
但它不起作用,例外是:
Configuration system failed to initialize ---- at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.get_AppSettings()
at DynamicReportWinService.DynamicReportingService.OnStart(String[] args)
我如何登录Windows服务?
答案 0 :(得分:0)
只需更改服务登录信息。键入services.msc
来找到您的服务->右键单击->属性->登录
https://docs.microsoft.com/en-us/windows/desktop/ad/service-logon-accounts
答案 1 :(得分:0)
我已经在Binding标签中添加了它
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
现在可以使用了:D