Web service impersonification - .Net 2.0

J

JDavide

Hello!

I'm working on a web application made of a web site and a web service, using
ASP.NET 2.0.

Basic authentication is used to log in to the web site. Web pages then call
some web methods, mostly using the identity of the logged in user. Sometimes
I need to call the web method as another user, a superuser. The web service
should then use this user to connect to a SQL Server using integrated
security. I have developed a solution which calls the webservice in this way:

myService.Credentials = New
System.Net.NetworkCredential("wsSuperCallerUser", "wsSuperCallerPassword",
"wsSuperCallerDomain")
xds = myFindService.ws_myMethod(someData)

Both the web site's and the web service's web.config specify
impersonate="true" and anonymous access is not allowed.

The solution works on the development machine, I get problems when I deploy
the code: IIS logs the call to the web method as performed by the superuser,
but inside the web method, Me.User actually refers to the user who logged in
to the web site.

I don't have any control over the configuration in the deployment
environment, but it used to work even there until possibly someone changed
something. I can't find out what it was, but does anyone know about such
problems? Maybe due to some Service Packs? Their OS is Windows 2003 Server.
Or is there some other way of calling a web service impersonating someone
else?

Any help will be very appreciated!!!!

Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top