httpexception

How to catch a specific HttpException (#0x80072746) in an IHttpHandler

北慕城南 提交于 2019-12-06 00:32:26
It appears that this HttpException (0x80072746 - The remote host closed the connection) can be thrown if, for example, the user closes the window whilst we are transmitting a file. Even if we send the files in smaller blocks and check the client is still connected, the exception can still occur. We want to be able to catch this specific exception, to ignore it. The ErrorCode provided in the HttpException is an Int32 - too small to hold 0x80072746, so where do we find this number? Int32 is not really too small to hold 0x80072746; only in “normal” notation, this number is negative: 0x80072746 ==

Server cannot modify cookies after HTTP headers have been sent

[亡魂溺海] 提交于 2019-12-05 20:49:50
I am creating a web application in C#. When my page loads I fire an asynchronous thread to process some data. Part of this processing is the updating of a cookie. However when I save the cookie to the response by System.Web.HttpContext.Current.Response.Cookies.Add(cookie) , I get the following exception: HttpException: Server cannot modify cookies after HTTP headers have been sent. Any way I can work around or fix this? Unless you have a very good reason to, you shouldn't be spinning up background worker threads in an ASP.NET request. Ultimately you still have to wait for this thread to finish

Render view to string followed by redirect results in exception

一曲冷凌霜 提交于 2019-12-04 15:12:46
So here's the issue: I'm building e-mails to be sent by my application by rendering full view pages to strings and sending them. This works without any problem so long as I'm not redirecting to another URL on the site afterwards. Whenever I try, I get "System.Web.HttpException: Cannot redirect after HTTP headers have been sent." I believe the problem comes from the fact I'm reusing the context from the controller action where the call for creating the e-mail comes from. More specifically, the HttpResponse from the context. Unfortunately, I can't create a new HttpResponse that makes use of

Any Progress on Diagnosing “Request timed out” HttpExceptions?

旧时模样 提交于 2019-12-04 11:33:56
问题 I am having the same issue as described in this post, Diagnosing "Request timed out" HttpExceptions. I've turned on Failed Request Tracing as recommended and am working with someone at MS (although it's painfully slow). The original post hasn't been updated in over a year, so I'm wondering if a fix was ever found or if you're just ignoring these errors. Any help would be appreciated. 回答1: After over seven months of troubleshooting this issue, the fine folks at Microsoft finally tracked down

HttpException error when I call SPARQL query (on DBPedia) in Java Code

喜欢而已 提交于 2019-12-04 06:58:04
问题 I have a problem with SPARQL endpoint using Java Code. In particular, I have this Java Class: public class example { public static void main(String[] args) { String value = "http://dbpedia.org/resource/Fred_Guy"; example exam = example(); QueryExecution qe = exam.query(value); ResultSet results = ResultSetFactory.copyResults( qe.execSelect() ); } public QueryExecution query(String stringa){ ParameterizedSparqlString qs = new ParameterizedSparqlString( "" + "prefix dbpediaont: <http://dbpedia

HTTPException: invalid and/or missing SSL certificate for url: https://accounts.google.com/o/oauth2/token

牧云@^-^@ 提交于 2019-12-03 17:21:02
问题 When I call for the Google Earth Engine (GEE) Python APIs through Google AppEngine, it throws out a HTTPException which says " HTTPException: invalid and/or missing SSL certificate for url: https://accounts.google.com/o/oauth2/token ". The project runs well before the New Year's Holiday, but it suddenly broke out without any changes on my own codes when I tested it on yesterday. The detailed error information 回答1: I am also experiencing the same issue in my python script with App Engine. It

Any Progress on Diagnosing “Request timed out” HttpExceptions?

。_饼干妹妹 提交于 2019-12-03 08:24:17
I am having the same issue as described in this post, Diagnosing "Request timed out" HttpExceptions . I've turned on Failed Request Tracing as recommended and am working with someone at MS (although it's painfully slow). The original post hasn't been updated in over a year, so I'm wondering if a fix was ever found or if you're just ignoring these errors. Any help would be appreciated. After over seven months of troubleshooting this issue, the fine folks at Microsoft finally tracked down the problem. It didn't end up being that complicated an issue, we all certainly learned a lot about IIS 7+

HTTPException: invalid and/or missing SSL certificate for url: https://accounts.google.com/o/oauth2/token

风格不统一 提交于 2019-12-03 06:20:17
When I call for the Google Earth Engine (GEE) Python APIs through Google AppEngine, it throws out a HTTPException which says " HTTPException: invalid and/or missing SSL certificate for url: https://accounts.google.com/o/oauth2/token ". The project runs well before the New Year's Holiday, but it suddenly broke out without any changes on my own codes when I tested it on yesterday. The detailed error information I am also experiencing the same issue in my python script with App Engine. It was running fine a few days ago and the certificate for accounts.google.com is valid until March, 9th 2017

When HttpStatusCodeException exception raised?

ε祈祈猫儿з 提交于 2019-12-02 13:35:23
when i use below code , what is the case to get HttpStatusCodeException exception . ResponseEntity<Object> response = restTemplate.exchange(builder.build().encode().toUri(), HttpMethod.GET, entity, Object.class); Please can anyone help out ???????? HTTP Status Codes are responses from the server, therefore if you have control of the server then you could make it return whichever errors you want. If you don't have control of the server then you could try sending bad/invalid requests so that the server will complain. Something like this on your server side: @RequestMapping(method = RequestMethod

HttpException error when I call SPARQL query (on DBPedia) in Java Code

安稳与你 提交于 2019-12-02 13:21:38
I have a problem with SPARQL endpoint using Java Code. In particular, I have this Java Class: public class example { public static void main(String[] args) { String value = "http://dbpedia.org/resource/Fred_Guy"; example exam = example(); QueryExecution qe = exam.query(value); ResultSet results = ResultSetFactory.copyResults( qe.execSelect() ); } public QueryExecution query(String stringa){ ParameterizedSparqlString qs = new ParameterizedSparqlString( "" + "prefix dbpediaont: <http://dbpedia.org/ontology/>\n" + "prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" + "\n" + "select