Last post Aug 12, 2009 12:23 PM by yawarasp
Dec 05, 2007 06:18 PM|shawais|LINK
I am trying access a webservice through my web application but i am getting this error, can you please help me to get rid of this error?
Exception::System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object parameters)
at FORIS.TelCRM.RequestManagement.CustomerCare.UI.RequestManagementWSAddRemoveService.AddRemoveServices.GetBalance(String InputXML)
at FORIS.TelCRM.RequestManagement.CustomerCare.UI.AddRemSHiddenForm.Page_Load(Object sender, EventArgs e)
Dec 05, 2007 07:17 PM|doyleits|LINK
There are several things you need to verify.
Hopefully this points you in the right direction.
Dec 05, 2007 07:42 PM|shawais|LINK
Thank you so much for your answer and support.
Your reply was really helpful to solve this issue. I have provided an account for Anonymous Access and then it is working.
Can you please tell me that how can I give credentials to webservice instead of allowing Anonymous Access???
Dec 06, 2007 05:40 PM|doyleits|LINK
To pass credentials to the web service (actually, to IIS), you need to have the web application running under a specific identity. I tried this approach (but never was successful) by running ASP.NET under a domain account. This was supposed to work in my
intranet environment, but again, I went a different route. For public (Internet) facing web services, you'll have to stick with Anonymous Access, or use WSE (Web Services Enhancements -
I'm glad your first issue was resolved.
Oct 03, 2008 03:46 PM|wwwaspnet1234|LINK
Aug 12, 2009 12:23 PM|yawarasp|LINK
how can i pass the domain user credentials to webservice and then to SQL server. user logon to website with integrated windows auth. website calls web service that is on anonymous and calles SQL server that has sa username and password. my business demands
webservice to call SQL server with the identity of the user who calls web service. cant get this done... any help will be much appriciated.