(Asp) Include Not Working

zangief2000

New member
Joined
Mar 22, 2010
Messages
4
Sorry if i kind of flood this section, but i really need help.

Anyway, I was able to connect my PHP files to the server, but the thing is those leads to the ASP pages we had, and there's an error when we're trying to load the ASP page.

I tried replacing the complicated ASP script with a simple response.write script to see if ASP as a whole is the problem, but it loads the response.write script. I tried adding to that script by including "", and to my shock, the page was back to giving out the "500 - Internal Server Error". Meaning this is a problem with the include script

Can anyone please help me out? How do I fix this? I really appreciate all the help I can get.

Thank you very much.
 
I assume that since you are posting in the Server 2008 Forum that you are using IIS7.

If that is the case then I think you will find the Includes are not installed by default.

Go to 'Turn Windows Features On or Off' (Control Panel - under Programs) or just open Server Manager
Under Roles scroll down to IIS and install 'Server Side Includes'

Close Server Manager and open IIS Manager.
Under IIS (Feature View) open 'Handler Mappings'
From the right hand pane select 'Add Module Mapping'
In the request path field type the files type(s) (e.g. *.asp)
From the Module Drop Down List select the 'ServerSideIncludeModule' that you have just installed
Leave the Executable field blank
Give it a unique name (SSI-asp)
Click OK to save

Your asp Includes should now work! Classic asp was on it's way out in 2002 - is there any reason you don't use .NET?
 
If you find they work at the root level but in no other subfolder, it's because your box isn't configured to know where root is, and you will need to change your settings accordingly. Go into your IIS Manager, click on your website. Scroll down and double click on ASP. Change the attribute "enable parent paths" to true, click apply, and then try it out.
 
Back
Top