http-status-code-401

The request failed with HTTP status 401: Unauthorized

扶醉桌前 提交于 2019-12-14 00:29:21
问题 I have a .NET 2.0 website (VB) running in my IIS6 (XP Pro SP2) and a .NET 3.5 (configured as .NET2 under IIS's ASP.NET tab, of course) hosting an ASMX web service. In Chrome, I can call the ASMX and invoke the web methods successfully. However, in calling the web methods in code, from the .NET 2.0 website I get: The request failed with HTTP status 401: Unauthorized. How do I get around this? 回答1: You need to set the credentials in you application when you initialise the webService object.

401 Using Multiple Authentication Methods IE 10 only

♀尐吖头ヾ 提交于 2019-12-13 20:24:43
问题 I am not sure if this is more of a coding issue or server setup issue... On our production site we've run into an issue that is specific to Internet Explorer 10. I am using jQuery doing an ajax POST to a web service on the same domain and in IE10 I am getting a 401 response, IE9 works perfectly fine. I should mention that we have mirrored code in another area of our site and it works perfectly fine in IE10. The only difference between the two areas is that one is under a subdomain and the

Using Google Calendar API returns 401 (unauthorized)

断了今生、忘了曾经 提交于 2019-12-13 14:41:56
问题 I'm trying to use Google Calendar API via JavaScript and keep getting the 401 error response while using the following code: $.ajax({ dataType: "json", url: "https://www.googleapis.com/calendar/v3/users/me/calendarList/<calendarID>?key=<my api key>", success: function(result){ $('#result').html(result); } }); Is there something wrong in my usage of the API and how should I use the oAuth ? I already have a clientID and secretID from the Google console but don't know how to use those. Thanks.

Error 401 and 403 only in Internet Explorer (not in Chrome, Firefox, ..) - IIS configuration?

若如初见. 提交于 2019-12-13 12:43:02
问题 I am trying to connect to a site that is running on IIS on my local machine. When I am using Anonymous Authentication, it works fine in Chrome and Firefox, but in IE I get HTTP Error 401.0 - Unauthorized. The error details are: Module: ManagedPipelineHandler Notification: ExecuteRequestHandler Handler: System.Web.Mvc.MvcHandler Error Code: 0x00000000 Requested URL: http://localhost:80/ Logon Method: Anonymous Logon User: Anonymous When using Windows Authentication, it also works in Chrome and

Why do I get 401 Status code from post request?

偶尔善良 提交于 2019-12-13 03:47:10
问题 I am trying to login to a website using python requests library, but keep getting a 401 status code. I have tried many variations of the various post function variables including: data = formData , form data includes the correct username , password and _csrf token data = json.dumps(formData) headers = headers (which included the "user-agent" and many other fields) auth = HTTPBasicAuth(username,password) where username and password are the correct string variables for the site login with

Twitter stream using OAuth in Python behaving differently on two equally configured machines

不想你离开。 提交于 2019-12-12 11:47:36
问题 I have the same piece of coding to deal with Twitter User Stream running on two different machines. Both machines are Ubuntu Lucid using python 2.6.5, but on the machine in my home I receive HTTP Error 401: Unauthorized while on the university it works perfectly. On both machines it works perfectly when I use curl with the same parameters, i.e., consumer key, consumer secret, acces token, and access key. See the code bellow, it was created by Josh Sharp from oauth.oauth import OAuthRequest,

Using Web Deploy tool for IIS - works with administrator account but not IIS or Windows user account

余生颓废 提交于 2019-12-12 10:48:22
问题 I am struggling with the massive beast that seems to be WMSvc - Web Management service for IIS. I am trying to deploy web sites from Visual Studio which is killing me. Actually it's killing everyone except me on my team, but since I am designated web server manager right now I'm the one thats feeling the hurt. It works when I deploy using my Admin windows account, which atleast means I should be on my way, but it doesn't work with another account that isn't admin or an IIS manager account.

Get rid of a 401 (unauthorized) ajax error in browser console

為{幸葍}努か 提交于 2019-12-12 08:24:26
问题 I'm calling an api through javascript using a jQuery.ajax call. The api respond with 401 if the user is not authenticated and I want to ignore this error only for this call. I've tried all the callback options described in the jQuery options but the error still pops out in the browser console (both in Firefox and Chrome). Here is a sample code which trigger the error: $.ajax({ type: 'GET', url: '/url-with-auth', dataType: 'json', statusCode: { 401: function (error) { // simply ignore this

strange 401 error appears for some urls when using .htaccess to redirect http to https

好久不见. 提交于 2019-12-12 07:50:22
问题 OK, here is the 7th day of unsuccessfull attempt to find an answer why 401 error appears... Now, .htaccess in the root folder contains the only 3 strings (was simplified) and there are NO more .htaccess files in the project: RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} So, it redirects all requests to be https. It works fine for any urls, even for /administration directory. So, http://mydomain.com becomes https://mydomain.com If https:/

ASP MVC 5 Logged in User can still access Login and Registration Pages?

本小妞迷上赌 提交于 2019-12-12 03:49:18
问题 I have an ASP MVC 5 application and I've noticed that logged in user can still access the registration and login pages. I've also noticed that when a logged in user tries to access a controller action to which they are not authorized, they are redirected to the login page. This is confusing because the user is already logged in. How do I fix this so that unauthorised redirects to some other 401 error page or view. 回答1: On registration/login page, you can redirect logged users : // GET: