Classic asp / asp.net site - global.asa not working

I was recently provided with a website written in classic asp for customization and customization - although it also has pages written in asp.net.

The problem I'm currently facing is that it does not collect settings from the global.asa file, such as Application ("ConnectionString") ....

As with trying to write them somewhere in the code, nothing appears.

Any idea how to prevent this site from using global.asa ... or why is it not using it yet?

There is a web.config and global.asax file ... shouldn't it be for .net?

Code will not compile in visual studio.

+6
asp-classic global-asax
source share
4 answers

I saw this problem when the application directory is not configured in IIS with the application name. You can change this from IIS Manager.

+11
source share

long lines of what Luke has already indicated:

Make sure you place the global.asa file in the root of the website / virtual directory from which your application is running.

+1
source share

All great tips. Otherwise, it is difficult to mix classic asp and .Net.

There is good basic information at http://www.w3schools.com/ASP/asp_globalasa.asp .

0
source share

What type of file are you trying to read values ​​from global.asa? ASP or ASPNET page?

As Jim W. said, values ​​in global.asa will not be available on aspx pages and vice versa.

Also keep in mind that routines in global.asa will not start until the ASP page is requested, and global.aspx procedures will not run until the ASPNET page is requested.

0
source share

All Articles