[RESOLVED] Debug whilst impersonating domain user using Development web server
I have a .net 3.5 asp.net web service that impersonates a domain user
Code:
<identity impersonate="true" userName="Domain\TMHost" password="password"/>
If I deploy this WS to IIS it works fine but I cannot get it to work within Visual Studio using the Development Webserver.
Here is an example of an entry from my Event Log
Code:
Exception information:
Exception type: HttpException
Exception message: Failed to start monitoring changes to 'C:\1work\temp\NotificationWatcherWebServiceClean2010\NotificationWatcherWebService\NotificationWatcherWebService\global.asax'.
Request information:
Request URL: http://localhost:1913/NotificationWatcherWebService/Service.asmx
Request path: /NotificationWatcherWebService/Service.asmx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: Domain\TMHost
Thread information:
Thread ID: 8
Thread account name: Domain\TMHost
Is impersonating: False
Stack trace: at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
By the way I don't have a global.asax within my project although I tried adding 1 and gave everyone full permissions to it, but to no avail.
I've been struggling with this for hours so any help massively appreciated.
Re: Debug whilst impersonating domain user using Development web server
Hello,
There are some things that the built in Web Server within Visual Studio simply can't do, and I "think" that this is one of them.
Can you not simply use IIS to do the debugging? If you don't want to use the full IIS, have you considered using IIS Express?
Gary
Re: Debug whilst impersonating domain user using Development web server
That works perfectly fine. Cheers Gary.
Re: [RESOLVED] Debug whilst impersonating domain user using Development web server
Actually, after setting the project to use IIS and creating a virtual directory, I can also now use the built in web server to debug it.
So what has happened in creating a virtual directory to make it now work using the development web server? It must be more than setting permissions as in my desperation I had given "everyone" full control to try and get it working.
Re: [RESOLVED] Debug whilst impersonating domain user using Development web server
Not a problem at all.
Gary
Re: [RESOLVED] Debug whilst impersonating domain user using Development web server
Hello,
Interesting! I am not sure what changes are made during this process.
Gary