http-status-code-401

Error 401 in C#

不羁岁月 提交于 2020-01-03 02:26:20
问题 I'm working on my first app for Windows 8 but I have a problem, when I'm launch my app, I've got the error "Response status code does not indicate success: 401 (Authorization Required) So yes, I need to include username and password but I don't know where in my code: var fond = new HttpClient(); var reponse = await fond.GetStreamAsync("http://example.com/search/mario%20kart" + TitleNewsGrid.Text); So where I'm include the username and password in the code? 回答1: There should be a Credentials

urllib2.HTTPError: HTTP Error 401 while querying using the new Bing API ( in azure marketplace )

感情迁移 提交于 2020-01-01 12:23:05
问题 So, I ve made corrections based on most of the answers under the same roof in stack overflow, I'm still unable to resolve this problem. queryBingFor = "Google Fibre" quoted_query = urllib.quote(queryBingFor) account_key = "dslfkslkdfhsehwekhrwkj2187iwekjfkwej3" rootURL = "https://api.datamarket.azure.com/Bing/Search/v1/" searchURL = rootURL + "Image?format=json&Query=" + quoted_query cred = base64.encodestring(accountKey) reqBing = urllib2.Request(url=searchURL) author = "Basic %s" % cred

Java JBoss 401 Error on SharePoint 2010 Web Service

﹥>﹥吖頭↗ 提交于 2020-01-01 09:22:43
问题 My code runs successfully when tested within the Eclipse IDE. I'm connecting to MS SharePoint 2010 via Web Services using the generated Copy.wsdl When I deploy my code on the JBoss server (Running Adobe LifeCycle) my code receives a 401 Error. Error: Caused by: org.jboss.ws.WSException: Invalid HTTP server response [401] - Unauthorized at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75) at org.jboss.remoting.transport.http.HTTPClientInvoker

GCM http 401 authorization error

…衆ロ難τιáo~ 提交于 2019-12-28 03:39:08
问题 When my backend server sends post requests to GCM servers I get an authorization error HTTP 401. I followed the steps described here: http://developer.android.com/google/gcm/http.html#auth_error >> api_key=AIzaSyDEy3... >> curl --header "Authorization: key=$api_key" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_id\":\"ABC\"}" I get this: <HTML> <HEAD> <TITLE>Unauthorized</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1

Can't get .net core MVC to redirect 401 to /Account/Login

╄→гoц情女王★ 提交于 2019-12-25 04:12:31
问题 When I request a controller action that is [Authorize] decorated instead of being redirected to the login page I receive a 401 error. This is a .net core mvc app using the identity template running on IIS express. When i run the app from program.cs the redirect to login works fine. I've added explicit directions to for the cookie authentication to use the /Account/Login redirect both for configuration and services section, as well as configuring Identity to perform this redirect. I can't get

Exception while fetching value of first key vault secret for the application

£可爱£侵袭症+ 提交于 2019-12-25 04:01:52
问题 In my application I am getting exception when my application fetches value of first key vault secret. The exception I am only getting when I turn on "Common Language Run-time Exceptions" from exception settings. Exception that I am getting is- Microsoft.Rest.TransientFaultHandling.HttpRequestWithStatusException: 'Response status code indicates server error: 401 (Unauthorized).' StackTrace:- at Microsoft.Rest.RetryDelegatingHandler.<>c__DisplayClass11_0.<<SendAsync>b__1>d.MoveNext() My code to

Yammer Embed Feed works in IE and Firefox but not in Chrome, gives 401 unauthorized

北城以北 提交于 2019-12-25 02:59:17
问题 ode : <div id="embedded-feed" style="height: 99%; width: 100%; overflow: auto"></div> <script src="https://assets.yammer.com/assets/platform_embed.js"></script> <script>yam.connect.embedFeed({ container: "#embedded-feed", network: "tcs.com", feedType: "group", feedId: "all" }); </script> Code works fine in IE and FireFox but in Chrome gives 401 Unauthorized Console Error : GET https://www.yammer.com/tr8n/api/v1/language/translate?batch=true&source=yamjs 401 (Unauthorized) However opening the

Get content of response with StatusCode 401

十年热恋 提交于 2019-12-25 00:36:45
问题 I'm trying to establish a connection to a server that sends 401 Authentication Error for all my requests along with the normal html response. e.g. However, I also want to read the HTML response that is sent alongwith so that I can parse that. An example header exchange captured using LiveHTTPHeaders: Clearly, content-length is non-zero. Firefox shows it to be javascript. https://172.31.1.251:1003/fgtauth?73e285357b2dc5cc Request: GET /fgtauth?73e285357b2dc5cc HTTP/1.1 Host: 172.31.1.251:1003

Nest API returning 401 and 429 when using websock stream yet REST ok

ぐ巨炮叔叔 提交于 2019-12-24 12:28:04
问题 I have an android app that uses the Nest API. I used the NestLib from the sample app from Nest but updated the library with 1.1.1. The whole API works great yet some accounts (not all) seem to come back with a 401 error (as well as a -999 on firebase debug) but only when initiating a websock stream (it authenticates ok then on redirect to stream the error appears). I tested this in POSTMAN whereby i can get all the data back using the Accept: text/event-stream header I get a 429 error. From

Calling Web Service using Integrated Windows Authentication in Angular 2

狂风中的少年 提交于 2019-12-24 07:25:16
问题 I have got two applications. One is an ASP.NET Core Web API REST Web Service that is running at http://localhost:59944 and the other one is an ASP.NET Core application using Angular 2 running at http://localhost:63888/. I want to load JSON Data via the REST Web Service. Exception: Call to Node module failed with error: Response with status: 401 null for URL: Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance+<InvokeExportAsync>d__7.MoveNext() Status Code 401 seems to be