1

I want to swich the iis site authentication from "Anonymous Authentication" to "Windows Authentication", but i can't authenticate my Windows Service that is running on the same server, i try to add this to my .config file of the service

<security mode="TransportCredentialOnly"> <transport clientCredentialType="Ntlm" proxyCredentialType="None"realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> 

but it doesn't work the exception is:

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) 

how can I login my Windows Service?

2 Answers 2

1

I've added this in Binding tag

 <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows" /> </security> 

now it works :D

Sign up to request clarification or add additional context in comments.

Comments

0

Just change the service logon information. Type services.msc locate your service --> right click --> properties --> logon

https://learn.microsoft.com/en-us/windows/desktop/ad/service-logon-accounts

1 Comment

now the error is this "The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'." I'm trying to change the .config file of the service but the service throw the exception "Configuration system failed to initialize"

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.