Posts tagged “ASP.NET”

Resolving SQL Command Timeout Issues in ASP.NET

Scott Walker · Jan 28, 2011
"Connection to database has timed out." This error will occur if there is a lot of processing being used by a SqlDataReader on a web page. My quick resolution was to increase the CommandTimeout on the SqlCommand object.

SqlCommand objCmd = new SqlCommand(spProcedure, objCon);
objCmd.CommandTimeout = 120;

Another possible solution would be to use a DataSet instead of a SqlDataReader. Yet another option, would be to cache the DataSet as well to prevent timeout errors.
đŸ’Ŧ 0 ASP.NET

Running an ASP.NET 2.0 Application Inside an ASP.NET 4.0 Site

Scott Walker · Jan 28, 2011

PROBLEM:

You have an ASP.NET 4.0 website running. Within that folder structure you would like to include a separate application that is built on ASP.NET 2.0. The solution is in the web.config file.

SOLUTION:

Below is how the web.config will need to be structured:



<location allowOverride="true" path="." inheritInChildApplications="false">
    <system.web>
    ...
    </system.web>
</location>

đŸ’Ŧ 0 ASP.NET