.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

HTTP 408 - Request timed out

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
hi all, i have been developing an mobile to asp site app. All of a sudden i am getting http 408 request timed outerror after just a couple of seconds. This can happen and then i can try again and it'll work fine. Could anyone please offer suggestions to try. I am stumped.  using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System; using System.Collections; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class login : System.Web.UI.Page { String username; String password; String phoneNumber; String deviceType; String dbPassword; SqlConnection cnn = null; SqlCommand cmd = null; string sql = null; SqlDataReader reader; System.Collections.Specialized.NameValueCollection nvc; protected void Page_Load(object sender, EventArgs e) { try{ Server.ScriptTimeout = 3000; Response.Cache.SetCacheability(HttpCacheability.NoCache); if (!string.IsNullOrEmpty(Page.Request.Headers["user

View Complete Post

More Related Resource Links

Test Run: Web Application HTTP Request-Response Test Automation with JavaScript


Write a simple browser-based request-response test automation using JavaScript that's platform independent and useful when you are working in a highly dynamic environment.

James McCaffrey

MSDN Magazine January 2010

HTTP Pipelines: Securely Implement Request Processing, Filtering, and Content Redirection with HTTP


ASP.NET is a flexible and extensible framework for server-side HTTP programming. While most people think of ASP.NET in terms of pages served, there is a lower-level infrastructure sitting beneath this page model. The underlying plumbing is based on a pipeline of app, module, and handler objects. Understanding how this pipeline works is key if you want to get the most out of ASP.NET as an HTTP server platform, while making your process more efficient, and keeping your server secure. This article introduces the architecture of the pipeline and shows how you can use it to add sophisticated functionality to an ASP.NET-based app.

Tim Ewald and Keith Brown

MSDN Magazine September 2002

Anonymous Web Site receives "The request failed with HTTP status 401: Unauthorized"


I set up a test website on my local box and was able to access sharepoint search using the querySearch web service from SP.  After I got it all working properly I transferred the code to the target website that is set up with anonymous access for all people on the fab floor.  However from this website I keep getting the 401 error.  It can't be SP because the same code worked from my local website "localhost".  Any suggestions?  we don't want to have to have the fab people log in so we can't not have the box anonymous.  I would appreciate any suggestions very much!!!

Using WSS 2007 with MOSS.


  private void GetDefaultCredentials()
      m_where = "get configuration data for credentials";
      string userid = ConfigurationManager.AppSettings[ "userid" ];
      string password = ConfigurationManager.AppSettings[ "password" ];
      string domain = ConfigurationManager.AppSettings[ "domain" ];

      m_where = "set search query credentials";
      m_query.Credentials = new NetworkCredential ( userid, password

HTTP 400 Bad Request Error when uploading to document library


I am running MOSS 3007 Standard on Windows 2003. When trying to upload files larger than about 29Mb, I am getting an HTTP 400 Bad request error. The error states "HTTP Error 400 - Request is badly formed." I am able to successfully upload a 28Mb file. Sharepoint is configured to accept files up to 75Mb.

I have done a fair amount of research on this, but none of the solutions seem to apply to our environment. The two most likely candidates do not apply, for example we are NOT running URLScan (there are a variety of solutions suggesting this could be an issue with uploads of 30Mb or more), and we are on 2003 with IIS6, so again the issue relating to 2008 and IIS7 do not apply.

The "Request is badly formed" part of the request is particularly confusing as most issues I have come across where this error is the symptom point to errors in custom code that is trying to talk to SharePoint. We have done none of our own custom coding and this error is occurring when attempting a simple upload to a document library.

Trying to drag and drop the file across when the document library is open in windows explorer also fails.

I did come across someone saying they had a similar problem which was caused by a damaged content database, however in this case, it is occuring regardless of which content database I use, so either they are all corrupt

How to bind a WCF Http client to a specific outbound IPAddress before making the request

I want my request to go out through a specific IP Addresses. Is there a way to do that in WCF. The explanation of why I need this is a little long winded so i'd rather not get into that. Here is sample code string ipAddress = ""; IService service; ChannelFactory<IOmlService> factory = new ChannelFactory<IService>(new BasicHttpBinding(), new EndpointAddress("http://" + IPAddress + ":6996/IService")); service = factory.CreateChannel(); service.Test(); Here is an example scenario to explain exactly what i'm looking for. Let's say I have two IPs on my machine ( and Both of them can hit If i run this code now, it will hit the IP (.32) from any of my IPs (.30 or .31). How can i force it to go through a specific IP of mine (say .30). Is there any way to do that using WCF? Thanks

While calling Web service gets exception "The request failed with HTTP status 401: Unauthorized"

Hi All, I created a ASP.NET web service, which was hosted on default visual studioserver, and on excecution of webservice it run .exe file which in turn update xml file. Now i hosted this webservice on IIS 6.0 server, and when i run the service, itfails to execute the exe.When i run it on debug mode, i never get any exception.Code...public string HelloWorld()    {        Process myProcess = new Process();        try        {            myProcess.StartInfo.UseShellExecute = false;            // You can start any process,             myProcess.StartInfo.FileName = @"E:\Projects\some.exe";            myProcess.StartInfo.CreateNoWindow = true;            myProcess.Start();            myProcess.Close();            myProcess.Dispose();            return "Suceess";         }&n

XML for Analysis parser: The XML for Analysis request timed out before it was completed.". Possible

I have one SSIS package in which I am executing one MDX query for getting the record count. but after executing the task  I am getting following error message. [Execute SQL Task] Error: Executing the query "SELECT  [Measures].[Enroll Row Count] ON COLUMNS F..." failed with the following error: "XML for Analysis parser: The XML for Analysis request timed out before it was completed.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.Ani

WCF webservice: HTTP/1.1 400 Bad Request while sending large input

I am connecting to a WCF based webservice. For certain methods, the input contains a list of objects/structures. When the number of items in this list increases beyond a certain number, the service fails with HTTP/1.1 400 Bad Request when I try to test the same using SOAPUI. I tried changing the web.config file with the following changes: <httpRuntime maxRequestLength="2097151" /> <binding name="basicHTTP" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:01:00" sendTimeout="00:01:00" maxReceivedMessageSize="4194304" maxBufferSize="98547" maxBufferPoolSize="258547"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding>   Kangkan

The HTTP request is unauthorized with client authentication scheme 'Anonymous'

I am trying to do a soap request from a WebCTRL server. I went to add a service reference, entered the URL to my wsdl and (after prompting me for a username and password) it added the reference and I can create an instance of the service object and makes calls against it.   Dim eval As New WebCTRL_Eval.EvalClient eval.Open() Debug.Print(eval.getValue("#reception_40/lstat"))   I get this back from the server, on open and getvalue.   The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm="SOAP Access"'.   I understand that it is the HTTP authentication that I need to setup or configure, but just dont understand how to do it.   I have tried eval.ClientCredentials.UserName.UserName = "myusername" eval.ClientCredentials.UserName.Password = "mypassword"   How do I change the client authentication scheme and provide my credentials to it?   Here is what is on my app.config file.   <system.serviceModel>  <bindings>   <wsHttpBinding>    <binding name="EvalSoapBinding"     bypassProxyOnLocal="false"     transactionFlow="false"     hostNameComparisonMode="StrongWildcard"     maxBufferPoolSize="524288"     maxReceivedMessageSize="65536"     messageEncoding="Text"

ASP.NET 4.0 FormsAuthentication Transition (HTTP Error 400 - Bad Request.)

Hi everyone, I have been developing a webapp with vs2008 with .net 3.5 and yesterday moved to vs2010 and .net 4.0. I moved the solution folder to my new computer with vs2010 and it began the process of converting it for .net 4. After this everything appears to work fine but now when i use the login page i get a HTTP Error 400 - Bad Request when redirected to the client area page when i succesfully login, i dont know why this is happening. If I have take out the %2f from the url and replaced it with / the pages loads fine? why has this suddenly stopped working? Any ideas as to why has sudddenly started happening?!

WCF HTTP POST - The remote server returned an error: (400) Bad Request. - URGENT

client & sever code below-------------------------------------------- [ServiceContract(Namespace = "http://test.mydomain.com")] public interface IMyService{[WebInvoke(UriTemplate = "", BodyStyle = WebMessageBodyStyle.Bare, Method = "POST")] Stream SaveXML(Stream input); } ----------------------[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(Namespace = "http://test.mydomain.com")] public class MyService : IMyService{  public Stream SaveXML(Stream input)   {              StreamReader streamReader = new StreamReader(input);       string rawString = streamReader.ReadToEnd();       streamReader.Dispose();        // here need to save the input stream to xml format file          //       Encoding encoding = Encoding.GetEncoding("ISO-8859-1");       WebOperationContext.Current.OutgoingResponse.ContentType = "text/xml";         byte[] returnBytes = encoding.GetBytes(rawString);       return new MemoryStream(returnBytes);   } } --------------------------------------------------Client Code         string postData = GetXmlString("d:\\text.xml"); // user function        WebRequest request = WebRequest.Create("http://test.mydomain.com/myservice.svc");        request.Method = "POST";        byte[] byteArray = Encoding.UTF8.GetBytes(p

The HTTP request was forbidden with client authentication scheme 'Anonymous'

I am trying to build a proof of concept of a WCF service utilisting a
wsHttpBinding with Transport Certificate security. I am having problems
connecting to it with a console client - everytime I try to open the channel
I get the following error: The HTTP request was forbidden with client authentication scheme 'Anonymous'.

can any one help me?
Thanks a lot
Frank Xu Lei--????,????
Focus on Distributed Applications Development and EAI based on .NET
?????????????:Welcome to My Chinese Technical Blog
??????WCF??????:Welcome to Microsoft Chinese WCF Forum
??????WCF??????:Welcome to Microsoft English WCF Forum

WCF The request failed with HTTP status 404: Not Found



I get the error above with a WCF service I've deployed to a Windows Server 2008 box (with IIS 7). When using a test client with a proxy WSDL class to try to consume the service this error pops up while debugging. Using http is fine, however using https causes the error. We do have an SSL on the URL for the WCF service.

Is there a setting I'm missing?


WCF The request failed with HTTP status 404: Not Found


I get the error above with a WCF service I've deployed to a Windows Server 2008 box (with IIS 7). When using a test client with a proxy WSDL class to try to consume the service this error pops up while debugging. Using http is fine, however using https causes the error. We do have an SSL on the URL for the WCF service.

Is there a setting I'm missing?


The HTTP request is unauthorized with client authentication scheme 'Anonymous'.




I am receiving an error when i am callign the WCF service which is hosted in the IIS,


The HTTP request is unauthorized with client authentication scheme 'Anonymous'.The authentication header received from the server was 'Negotiate,NTLM' while calling service hosted in IIS.


Both check boxes are checkd in the properties->DirectorySecurity->Edit...

Anonymus and Integrated Windows.


Can anybody help me regarding thsi issue...






SQL Server Reporting Service 2008 R2 - The request failed with HTTP status 401: Unauthorized.

I got the error "The request failed with HTTP status 401: Unauthorized." when I call the Reporting Service Web Service.

The code is very simple:

// Initialise the reporting service Web Service

this.RSWebService = new ReportingService2010();

// Pass windos authentication credentials to Web Service

this.RSWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;

// List children

List<CatalogItem> reports = this.RSWebService.ListChildren(folder, false).ToList();

The SQL Server is installed on a different machine (say server A) from the Web server (say server B). We are using Windows Server 2003.

The code work fine for all the scenario below:

i) Run locally (XP) to call the web service on the sql server

ii) Provide the Network Credentials with the username, password, and domain when calling the web service

iii) If the web server and sql server is using same server (i.e. not distributed)

I'm using windows authentication and impersonation. Any idea?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend