Category: ASP

.NET Error: httpRuntime requestValidationMode=”2.0″

If you get .NET errors that reference

<system.web>
<httpRuntime requestValidationMode="2.0" />
<!-- everything else -->
</system.web>

It means that the application you are trying to run has set the property requestValidationMode to function the way it acted under .NET 2.0, but this directive only makes any sense under .NET 4.0 or greater, and your website is not set up to use .NET 4.

You need to run the application in a separate application pool and set it to run under .NET 4.0 (which, of course, needs to be installed before it can be used).

Continue reading

Thread: Changing maxAllowedContentLength

In a .NET application used to deliver quizzes, attempting to import a large quiz from another server resulted in this error:

“The request filtering module is configured to deny a request that exceeds the request content length.” A second message stated:
“Request filtering is configured on the Web server to deny the request because the content length exceeds the configured value.”

Continue reading

Create an iCal file from your data using ASP

Google Calendar and many other calendar apps will import or subscribe to iCal format files (.ics) If your event data is locked away in a database, you may find it useful to display and distribute it using Google’s extensive calendaring features.

Following is an example of an ASP file that will write an iCal file.

Generate the iCal file in a web-accessible directory, then have Google Calendar or other iCal compatible application subscribe to it.

Continue reading

Set up a Cron job in Windows to run an ASP script

If you are used to Linux environments, and working on a web application which needs to execute a function at regular intervals, you’d use a cron job. On Windows, you’d use a scheduled task instead. There is one part of the process that isn’t obvious, so here are the steps involved:

  1. Create the web page that executes the desired tasks – sending email, creating files, etc. For example, I have some ASP scripts that create RSS and iCal feeds from a proprietary database, that need to run daily. Record the URL for later.
  2. You will also need a domain account that can run the task, or a server account that can be used in perpetuity to run these types of tasks. I usually have a “fake” account that will never expire created for this type of thing.
Continue reading

Umbraco installation error: The virtual path ‘/install/steps/welcome.ascx’ maps to another application

After installing “Umbraco,” you may get the following error:


The virtual path ‘/install/steps/welcome.ascx’ maps to another application, which is not allowed.

Screen shot 2010-04-21 at 2.57.47 PM.jpg

This is because you have installed Umbraco in a virtual directory (not at the web root of the “Default Web Site” in IIS terminology). It is a path problem, easily corrected by fixing the paths in the web.config file.

Continue reading