Questions tagged [httpexception]

HttpException or HTTPException are exception classes defined by various object oriented libraries that signal a problem during processing of a http request.

There is a HttpException in the System.Web namespace of .Net, another one in Apache Commons and a HTTPException in JAX-WS

160 questions
2
votes
2 answers

Catch timeout with HttpException

We have an image upload page that will timeout if the user's upload is taking longer than 15 minutes. We're catching the HttpException that occurs with a timeout. But how can we know that the exception occurred because of a timeout, so we can return…
Doug S
  • 10,146
  • 3
  • 40
  • 45
2
votes
1 answer

"Request is not available in this context" on Nested User Control

I have three objects: A Page which contains A User Control (A) which contains Another User Control (B) The scenario is an event in User Control A gets called, the Request object is still accessible here. But during that call, I attempt to call…
Jonn
  • 4,599
  • 9
  • 48
  • 68
2
votes
1 answer

Google Custom Search API error

I used Google Cloud Platform for Free trial https://cloud.google.com/free-trial/ to use custom search API in my java application I write the following code in my application URL url = new URL("https://www.googleapis.com/customsearch/v1?key="+key+…
2
votes
1 answer

HttpException when trying to decrypt data after .Net 4.5.2 upgrade

I have a REST service (C#/IIS) where a small amount of data is encrypted using: var encryptedText = MachineKey.Encode(bytes, MachineKeyProtection.All) The encrypted string is later posted (to a REST service) and decoded…
Frogger
  • 94
  • 8
2
votes
3 answers

Server.Transfer("error_404.aspx") in Application_Error returns a blank page

I look for HttpExceptions in the Application_Error sub of my global.asx Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) Dim ex As Exception = HttpContext.Current.Server.GetLastError() If ex IsNot Nothing Then …
kenwarner
  • 28,650
  • 28
  • 130
  • 173
2
votes
0 answers

Socket permissions exception when attempting to read a page via HttpClient.GetStringAsync

I am trying a Windows 8 App which gets source code of a webpage and extract some important data. But I am receiving this when getStringAsync function get called. System.Net.Http.HttpRequestException: An error occurred while sending the request.…
HannanKhan
  • 21
  • 1
2
votes
2 answers

One form tag on page in ASP.NET Issue

I am getting this error when trying to run my project on localhost Exception Details: System.Web.HttpException: A page can have only one server-side Form tag This is my ASP.NET form
<%-- Consultation…
Javacadabra
  • 5,578
  • 15
  • 84
  • 152
2
votes
1 answer

Error Creating Simple Controller MVC

I am creating a simple empty Controller Default1 in ASP.NET MVC4 VS 2012 but when I run it, it gives error. My Controller is as follows: public class Default1Controller : Controller { // // GET: /Default1/ public…
2
votes
3 answers

NullPointerException on Simple HttpPost

If username & Password are correct it has to show "SUCCESS" else it has to show "FAILED".I'm connecting to a server using BasicNameValuePair. and its showing NullPointerException on this line int code = pres.getStatusLine().getStatusCode(); public…
DroidLearner
  • 2,115
  • 5
  • 31
  • 50
2
votes
1 answer

Is there a way to channel some HTTP server events into a single javascript function?

I have a C# webserver which provides some html/js/css and images to a browser-based client. I create the page dynamically using javascript, filling images and divs while receiving messages from a websocket C# server. Sometimes, I receive a message…
malber
  • 1,053
  • 4
  • 16
  • 24
2
votes
2 answers

ASP.NET How to get HttpException ErrorCode

I'm trying to catch and handle a specific HttpException, namely "The remote host closed the connection. The error code is 0x800704CD." My intention is to add a Catch for the HttpException to the relevant Try block and test for the error code that is…
AGB
  • 2,378
  • 21
  • 37
2
votes
1 answer

Symfony2 HttpException(422, 'some message') not working

My problem is the following: throw new HttpException(422, "some message") doesn't work in Controllers. However, throw new HttpException(404, "some message") works, as well as 400 (etc.) Why can't I throw an HttpException with a 422 HTTP status…
Denes Papp
  • 3,835
  • 3
  • 32
  • 33
2
votes
3 answers

Render view to string followed by redirect results in exception

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…
Chris Charabaruk
  • 4,367
  • 2
  • 30
  • 57
1
vote
3 answers

"Could Not Load Type" on deployed site refering to old pages/classes

When I run my code in VS debugger and set it to catch CLR exceptions when thrown, I get tons of these HttpExceptions saying "Could Not Load Type" that refer to pages/classes which have been removed from the application. It does not cause any…
1
vote
1 answer

httpException 11481611 caused from bad url... how to fix?

In my event logs I am have an warning appear: Log Name: Application Source: ASP.NET 4.0.30319.0 Date: 10/24/2011 11:14:18 PM Event ID: 1309 Task Category: Web Event Level: Warning Keywords: …