http-status-code-401

IIS 6.0 Is Stubbornly Remembering Authentication Settings

I have an .asmx in a folder in my application and I keep getting a 401 trying to access it. I have double and triple checked the setting including the directory security settings. It allows anonymous. I turned off Windows Authentication. If I delete the application and the folder its in, then redeploy it under the same application na...

Friendly HTTP 401 Status Code Message?

I'm a developer not a wordsmith and as such I'm stuck. We have a subscription based site whereby users may well come across our 401 page. We've decided that the IIS 401;2 page needs replacing. Does anyone have any examples or advise about writing a good non offensive 401 page? ...

How do I get an already (basic) authenticated context to call a web service behind the same authentication?

Hi, I have a site behind basic authentication (IIS6). Part of this site calls a web service that is also part of the site and thus behind basic authentication as well. However, when this happens the calling code receives a 401 Authentication Error. I've tried a couple of things, with the general recommendation being code like this: ...

401 Returned for every 5th call in an ASP.NET MVC application that returns JSON

This is nuts. I have an ASP.NET MVC application using Windows authentication that, amongst other things, interacts with a number of ExtJs Javascript components by returning JSON data to them. The problem is that even after the user is successfully authenticated, every 5th request to grab some JSON data from MVC results in TWO "401 Unau...

How do I stop 401 responses from TFS 2008

Whenever a web request is made by Visual Studio to TFS, Fiddler will show a 401 Unauthorized error. Visual Studio will then try again with a proper Authorization Negotiate header in place with which TFS will respond with the proper data and a 200 status code. How can I get the correct headers to be sent the first time to stop the 401? ...

Eradicating 401 "Unauthorised" responses followed by 200 "Ok" responses

I’ve got a situation with a large internal corporate web based application running ASP.NET 3.5 on IIS6 generating 401 “Unauthorised” responses followed by 200 “Ok” responses (as profiled by Fiddler). I’m aware of why this happening (integrated auth forcing the browser to resend credentials) but I’m looking for some thoughts on how to min...

Calling webservice in C# using SSL - '(401) Unauthorized'

I'm calling a method on a web service from behind a proxy server using the following code: myWebService.TestWebService webservice = new myWebService.TestWebService(); webservice.Url = "http://test.com/webservice?wsdl"; WebProxy proxy = new WebProxy("1.2.3.4", 8080); proxy.Credentials = new NetworkCredential("username", "password"); web...

Unable to call PSI functions in Shared Services

I can't call PSI functions using the Shared Services impersonation. I get a "The request failed with HTTP status 401: Unauthorized." error. I'm using the common Derived class to do it, and it doesn't even work in ProjTool (Project Server 2007 SDK sample). It works without impersonation (i.e. by the pwa/_vti_bin/psi/...asmx) but not thr...

Rare and sporadic 401 Unauthorized error with ASMX / WCF web service using Windows Authentication

We have a hybrid WCF and ASMX web service currently being used on a decent sized project. Now, most of time everything works perfectly fine, however on rare occasions and seemingly randomly, the web service begins to block calls which returns a 401 Unauthorized error back to the page in question. It seems to be the ASMX service calls tha...

Safari browser won't display Error 401 page.

I'm using Apache 2 and have a custom 401 page, in httpd.conf ErrorDocument 401 /error/unauthorized.html When I access a protected resource, all browsers show the basic http authentication dialog. If I click "cancel", all browsers but Safari (v3 and v4) will display the custom 401 page. Safari just displays the current page. Is there ...

Avoiding 401 response for each request using NTLM

HI, We have here an asp.net 3.5 application using NTLM based windows authentication. The system runs on a private network that actually distributed over different geographic places (connected via VPN). We are now trying to optimize the website's performance. Because the way NTLM works, every new request to the IIS is composed with 3 di...

Why my httpwebrequest post to myhandler.ashx is rejected with status code 401

I've already written an HTTPHandler that gets POSTed from a ColdFusion page and it works successfully; now, I am trying to write a web application in ASP.NET so I can post a form to the .ashx handler from an .aspx page. Application Trace (trace.axd) shows the following as my last 3 entries: 2 8/14/2009 1:53:56 PM /Default.aspx 2...

SSRS Report Viewer + ASP.NET Credentials 401 Exception

I have a report saved on a SQL2005 reporting server, and I want to return a rendered PDF of this report. I've figured this out when working with a local *.rdlc file (and I've blogged about it), but not when the *.rdl resides on a reporting server. I am getting a 401 Not Authorized error at the line... reportViewer.ServerReport.SetParame...

IE 7 not showing my custom 401 page

I created a 401 page, which is html, and within an accessible directory. It displays in IE 6, Firefox, Safari, but not IE 7. Here is the .htaccess file for setting the authentication on the directory and location for the 401 page. KrbServiceName HTTP KrbMethodNegotiate On KrbMethodK5Passwd On #KrbVerifyKDC on KrbSaveCredentials off Kr...

ApplicationPoolIdentity in IIS7 401 errors

We have just started to use Windows Server 2008 R2 and IIS7.5 and I'm trying to move some existing sites across from our Windows 2003 box. I can get the sites running ok but am getting 401 errors for all the CSS / Images in the sites. Granting Everyone read access will solve this - but I'm not very happy doing this. I've read that IIS7....

Can't access webpage using Internet explorer

I have a problem accessing an intranet website with IE8. I can access the site through Firefox or any other browser, except IE. IE will prompt for a username and password but never accepts the credentials and just shows a 401 message, "You are not authorized to view this page" The website is configured as follows: Windows Server 2003 ...

WCF Delete 401 - Unauthorized: Access is denied due to invalid credentials.

I have a WCF REST service that among others saves/deletes files and folders on the server. To be able to access data on the server I impersonate a user that has credential for writing/deleting from the servers hard-disk. Things work alright until i want to do 2 DELETEs in a row. Meaning a call "foo.svc/bar/1" with DELETE method it works...

Issue with authentication through isapi redirect

Hello, we have an IIS (Owa) server that redirects to another server using isapi_redirect. Everything works fine for users in the LAN but for users connecting from Internet a windows authentication popup appears when trying to access the redirected server, that ends up in a 401 error even when giving a valid user/password. Using Fiddle...

Custom 401 Error Page for SVN Server

I have SVN server running on one of my domains as svn.mydomain.com and would like to setup a 401 error document for when the user authentication fails. As svn isn't an actual folder or real subdomain, i'm confused as to where I can put the ErrorDocument 401 line. It doesn't have to be in the .htaccess file, if it will work I could put ...

How to check for an HTTP status code of 401?

In one of the answers that I have received here, I encountered a problem of not knowing how to pass automatically through "Google App Engines" my ID and a password to a website, on which I am a registered user and have an account. A suggestion was given to me to "check for an HTTP status code of 401, "authorization required", and provide...