Last post Aug 04, 2013 09:30 PM by Amy Peng - MSFT
Aug 02, 2013 03:48 AM|ogsim07|LINK
We are having an issue in which we have website using windows authentication.
Then, we are passing the windows credentials to call web service using
myWebService.Credentials = System.Net.CredentialCache.DefaultCredentials
myWebService.UseDefaultCredentials = True
Within webservice we are getting the username of logged in user using User.Identity.Name.ToString() (this is just performed to check if username is passed to service, not part of functionality)
However, within the web service, a function that uses session is throwing
This is the web service method:-
Public Function LogIn() As String
oWMSession = New WINDREAMLib.WMSession <--- error on this line
-This code works on website, but throws error on webservice, so we are wondering if this is an web service/sessions issue. Please guide.
Aug 04, 2013 09:30 PM|Amy Peng - MSFT|LINK
It seems that it is a permissions issue.
As far as I know, if we host our project on Web Server. the default identity of ApplicationPool is ApplicationPoolIdentity(IIS7,NETWORK Author\Network services on IIS6). But there are both local account not Domain account. Thus I suggest you create a extra(particular)
account and grant the approprivate rights to it(it can access the UNC share server). And impersonate the account in web.config.
#Understanding ASP.NET Impersonation Security