Twitter Feed Popout byInfofru

Prevent Request Timeout in Asp.net

In one of our application we want our user to upload data up to 1GB and the most interesting part is we want this uploading via HTTP. I mean, we have plan to use FTP but that is for future. For now we need to make it with HTTP.

Off course, uploading data in GB's requires much extra time then the default configuration and same problem with the request size. So, to make it done we need to change the configuration of following items.

  1. executionTimeOut : Default value is 110 seconds, we need to make it for at least 12 hours.
  2. maxRequestLength : Default value is 4096 KB (4 MB), we want it to accommodate 1 GB size of data.
  3. Session Timeout : Default value is 20 minutes, we need to make it according to the executionTimeOut.

The above two are the configuration of httpRuntime attribute, but along with that why do we need to change the session timeout. Because, if session timeout is less then execution timeout it means when the request finishes its processing meanwhile, the session get's end which can raise an error.

So, here is the configuration which we need to make in web.config.

   1: <httpRuntime executionTimeout="43200" maxRequestLength="104856"  />
   2: <sessionState mode="InProc" cookieless="false" timeout="720"/>

Notice, executionTimeout needs to be filled in seconds where as timeout of sessionstate needs minutes as input.

But that doesn't work in my case. I spent many hours replacing the configuration settings and no results.

Finally, I get to know that Application Pool also have idle timeout settings which can be useful.


To get application pool in Windows 2003  :

  1. Right click on your website and click properties
  2. Then Home Directory Tab and notice the last most drop down of  screen. Application Pool
  3. Notice the name, and close screen.
  4. Then go to Application Pools right click the application name which you have in our website and then properties. You will see the following Screen.

 

idle

The default value of idle timeout is 20 minutes. I have changed this to 720 (same as of session) minutes and every thing start working.

I did never even hear of this idle timeout before neither I think that while uploading the file connection thread is idle but now this is for sure, if you are increasing the session timeout greater then 20 you must need to configure the same amount in your Application Pool Settings.

The Project Creation Wizard was not able to connect to the Windows SharePoint Services at [Server-Name]

This morning we had another TFS Error. I guess, I can write a book called "Team System Errors and Solutions" :).The Error occured during the creation of New Project
The Project Creation Wizard was not able to connect to the Windows SharePoint Services at [Server-Name]
The error is mainly because the sharepoint admin services (Sharepoint Central Administration Site) is no more working.So to remove the error I took following steps on the server
1. Goto IIS2. Click Application Pools3. Right Click -> Sharepoint Administration Site V3 (It is the application pool which is in used by Admin site)4. Click Properties5. Identity Tab and make sure the user which is in use by Application Pool is a valid TFS Service Acccount. If it is then re-enter user id and password
and it will work.

Unable to start debugging on the web server. Debugging failed because integrated Windows authentication is not enabled. Please see Help for assistance.

Error : "Unable to start debugging on the web server. Debugging failed because integrated Windows authentication is not enabled. Please see Help for assistance." Fix : This error usually comes when you are using asp.net with IIS and try to debug the application. To fix it, you need to goto IIS - > Select your Virtual Directory -> Right-Click -> Properties -> Directory Security Tab -> Press the top most Edit button -> In the next form Check the lower most check box saying "Integrated Windows Authentication" and it will work.

Unable to create the Web site 'http://localhost/sitename'. An error occurred accessing your Windows SharePoint Services site files

Have you ever face the following error.
Unable to create the Web site 'http://localhost/sitename. An error occurred accessing your Windows SharePoint Services site files. Authors - if authoring against a Web server, please contact the Webmaster for this server's Web site. WebMasters - please see the server's application event log for more details.
Goto IIS -> Click Defalt Web Site -> Right Click -> Properties -> Check TCP Port If it is other then port 80 then you have to change it back to 80 and the stuff on.