Archive: January 2011

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

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

Moving Comma‑Delimited Keywords into a Proper SQL Table

Scott Walker · Jan 18, 2011

PROBLEM:

Had an application that contained a field in SQL Server which stored all of it's keywords as a comma delimited string. This presented a problem when doing searches by keywords and was hard to maintain. So, I wanted to move each keyword in this field into a keyword table instead of listing them all seperated by commas.

SOLUTION:

The solution below will extract each keyword and insert it into the new keyword table. The id of the vendor is stored and then each keyword is assigned a unique id for managing ( edits and deletions ).

đŸ’Ŧ 0