Acess to a web service throws: The request failed with HTTP status 401: Unauthorized.

I have a stable web service that I have accessed a bunch no problem.  I use a NetworkCredetial object with proper credentials to access the web service.  There is no problem with the credentials.  I have no idea why this response (The request failed with HTTP status 401: Unauthorized.) is coming back.

On the test server where the web servcie is set up without SSL the connections work just fine.

On the production server, the web service has an attached SSL certificate.  I can consume the web service reference from the production server on my local machine and run it locally with NO problem.  The second I publish the app the the production server (the exact same server that the web service exists), the 'Unauthorized' exception is thrown.

This seems to be a permissions issue, but I can not figure out where.  The same secure (SSL) production web service calls work just fine from my local machine.  As soon as I deploy the app to the production server, the calls to the web service on the same box don't work!

Any ideas?


Thank you,

2/7/2008 9:59:17 PM 7071 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 56

To further add to this, I unchecked 'Integrated Windows Authentication' in IIS on the server and switched it to 'Basic'.  This solved the problem and I believe it is still secure because the web service is using SSL so the credentials being sent should still be secure (can anybody confirm or deny this?)

The only snag is now when consuming the web service, I am prompted for an additional set of credentials for the 'Basic' authentication.  On occasion I am not able to successfully consume the web service and the following exception is displayed:

Unable to cast COM object of type 'System.__ComObject' to interface type 'EnvDTE.IVsExtensibility'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3C536122-57B1-46DE-AB34-ACC524140093}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

This never appeared when IIS had integrated windows security set up.

Any ideas?  I know this stuff is advanced but I am hoping the web service experts can lend some knowledge.


Thank you,

2/8/2008 4:19:34 PM

Hi atconway,

Since you are using security web service, you should apply a certificate and use the Microsoft Windows HTTP Services Certificate Configuration Tool (WinHttpCertCfg.exe) to install the client certificate and to grant access to the client certificate for additional user accounts such as the Network Service account.

For more information:

 Best regards,
Guang-Ming Bian - MSFT

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
2/13/2008 10:02:19 AM

Similar Artilces:

Web app calling Web service error The request failed with HTTP status 401: Unauthorized
I have a web site calling a web service which are both located on the same server.  Integrated windows authentication is being used on both the app and service.    When I start the web app from VS's IDE (code on server), it runs fine displaying "Hello world" and populating the dropdownlist. However, if I browse to the URL in IE, I get the following errorSystem.Net.WebException: The request failed with HTTP status 401: UnauthorizedI output the credentials used in the web app, and they are correct.Why would it run fine through the IDE but not browsing to the u...

web service The request failed with HTTP status 401: Unauthorized.
Im getting this error with a web serice ive created.  Im running on my local machine and using windows authentication.  Ive added some code to provide credentials but it still wont work.QAS.AddressVerificationService avs = new QAS.AddressVerificationService();avs.PreAuthenticate = true;avs.Credentials = System.Net.CredentialCache.DefaultCredentials;can anyone shed some light on this ?tiaMark You need to set access rights for the webservice called. see here:

The request failed with HTTP status 401: Unauthorized
Hello All, I am getting the mentioned error: The request failed with HTTP status 401: Unauthorized, when i tried to call ReportingService2005 reference in my IIS web project. Below is my code: string strReport; string strRptUrl; string strFormat; string strFormatCode; ReportingService2005 rs = new ReportingService2005(); // Pass Windows Authentication credentials to Web Service rs.Credentials = System.Net.CredentialCache.DefaultCredentials; // Call ListChildren method to get array of reports CatalogItem[] itmReports = rs.ListChildren(strFolder, false); foreach (CatalogItem itm in itmReports)...

web service error: The request failed with HTTP status 401: Unauthorized.
I am doing the web service walk-through from here:,vs.80).aspx I get the error 'The request failed with HTTP status 401: Unauthorized'.  My app is using windows authentication, I made sure the web service folder has permissions for everyone to execute and that didn't work.  IIS has annonymous access checked. I'm not sure what else to do. Help? Another thing... I'm using the integrated web server that comes with Visual Studio... does using it change things? Hello. I've faced that error when I tried to use async pages (at...

system.Net.WebException: The request failed with HTTP status 405: Method Not Allowed. Error in Calling Web Service Function
Hello Friends, I am using a web service to get availability information. i have only following url I added Web References to the VS 2008 project , then i tried C# proxy class created from wsdl tool But when i am calling any function from code it gives following error system.Net.WebException: The request failed with HTTP status 405: Method Not Allowed. Please check the following page And click the Check Availability Button. Please tell me what...

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: Hope this helps....

"The request failed with HTTP status 400: Bad Request." when attempting to use a web service
Hi, I'm having a tough time deploying this web service I wrote.  Before I moved it over to the development server I tested the web service locally on my computer using a web portal to talk to the service...  However, now that I've copied it up to the Web Server, it keeps giving me these 400 errors and I can't figure out why.  Any ideas?    Kyle Which web server are you using, 6.0, 7.0....Do you have ASP.NET installed and correctly mapped. Do you have the security set up to allow Web Services. Have you checked your IIS log for any status sub codes.Chr...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

Reporting Services Error
Hello, I'm hoping that someone can help me out here. I'm using reporting services for the first time. I have it set up and it is working fine when I test the asp pages on my computer but when I put them up to our web server they I get the error - The request failed with HTTP status 401: Unauthorized. I using the ReportViewer to display the reports. Does anyone have an idea what could be wrong? This is what i have done in my .aspx.vb file  ReportViewer1.ProcessingMode = ProcessingMode.Remote ReportViewer1.ShowCredentialPrompts = True ReportViewer1...

DynamicPopulateExtender: Web Service call failed: 12152, Web Service call failed: 12031
Hi, I'm using a DynamicPopulateExtender to take the value of a SELECT dropdown and pass it to an onpage web service (defined with <System.Web.Services.WebMethod()> _ '<System.Web.Script.Services.ScriptMethod()>) and as PUBLIC SHARED FUNCTION myfunction(contextKey as string) as string. The function returns the html for a listbox. Everything seems to fire properly on the client but when the web service is called by the Javascript function, I get Web Service call failed: 12152 or Web Service call failed: 12031 Any pointers would be appreciated.  Do...

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

Calling a Web Service from a Web Service
Hello,I was looking for some feedback on calling a web service from within a web service. I've heard that it's not good practice (or not possible). I have a scenario where I think it might make some sense.Within our infrastructure, we've created a web service that handles incoming updates on the statuses of all processes. This has proven to be a good thing since it allows applications to communicate across server to make status updates. It's also used by third party developers and applications to communicate with our infrastructure.Along these lines ... we are planning to create a new compon...

Is web services a part of web Service?
  I have a question: Is web services a part of web server?? And when the client calls web service, it means that client calls web server?? Or is it a different entity in itself which communicates separately both with client and server and acts as middleware application.. I am very confused.. Can someone explain me the architecture...??? Thanks..Dont forget to click "Mark as Answer" on the post that helped you.This credits the member,earns you a point & marks your thread as Resolved so that new users will know where to search for their queries. When you build and dep...

Web resources about - Acess to a web service throws: The request failed with HTTP status 401: Unauthorized. -

A Very Merry Unauthorized Children's Scientology Pageant - Wikipedia, the free encyclopedia
... , Atlanta 2007 – Philadelphia , Atlanta, Washington, D.C. 2008 – Syracuse , Fort Worth , Cincinnati , Chicago , Phoenix A Very Merry Unauthorized ...

Facebook Blocks Access To Unauthorized Pre-Release Version Of Home
... scheduled release in the Google Play store Friday on selected smartphones , but it seems that Facebook was able to pull the plug on the unauthorized ...

Detecting unauthorized cross-app resource access on OS X
Last week, Luyi Xing, a Ph.D. student from Indiana University Bloomington and his colleagues released a research paper on several vulnerabilities ...

Facebook Has Users Identify Friends In Photos To Verify Accounts, Prevent Unauthorized Access
Facebook users are now better protected from unauthorized password changes and suspicious logins thanks to a new set of security features. The ...

Twitter Blog: Unauthorized Access: An Update
Twitter Blog Unauthorized Access: An Update on Security 811282302648909752 Thursday, April 30, 2009 This week, unauthorized access to Twitter ...

Some authenticated requests result in spurious 401 Unauthorized errors that should be HTTP 500-series ...
A number of authenticated requests to the API that would normally result in a 500-series error condition are currently throwing 401 errors with ...

All sizes - Commerce Committee Hearing on Unauthorized Mystery Telephone Charges - Flickr - Photo Sharing ...
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

The Unauthorized Saved by the Bell Story - Trailer - YouTube
Check out the first trailer for Lifetime's look at what happened behind-the-scenes on Saved by the Bell.

Brian Mulroney : The Unauthorized Chapter : the fifth estate : CBC News
CBC's the fifth estate is Canada's premiere investigative journalism series.

File-Sharing Lawsuits Come To Canada: Canipre Identifies 1 Million Unauthorized File-Sharers
A Canadian copyright enforcement group has collected data on one million people who allegedly participated in illegal file-sharing, potentially ...

Resources last updated: 1/23/2016 10:24:58 PM