• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2337
  • Last Modified:

Classic ASP site under IIS 7. Is web.config file needed, and how to create it

I maintain a classic ASP application.  I recently installed IIS 7 on my Vista Ultimate system.  I added my website to the configuration, and granted IUSR appropriate access in the file system.

Attempting to browse the site, via http://localhost:80 results in a server error, complaining that the related configuration data for the page is invalid.  Further in the page, I see:
------------------------------------------------------------
Config Error: Cannot read configuration file
Config File: \\?\C:\Users\....my path....\My_Website\web.config
Config Source:
   -1:
    0:
More Information... This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
------------------------------------------------------------

Fair enough.  It's looking for a web.config file, and one doesn't exist.  Classic ASP doesn't use them, I'm not developing with Visual Studio, and I have no idea how to bring into existence a usefully populated web.config file.  

If you answer, 500 points are yours.  Thanks.
0
JohnAtkinson
Asked:
JohnAtkinson
  • 3
  • 2
1 Solution
 
samtran0331Commented:
As you've already posted, Classic ASP doesn't need or use a web.config file.
the problem here it looks like is that you have the default web site in IIS7 configured as an ASP.Net application...
First of all be sure Classic ASP is enabled in your IIS.
http://goingspare.wordpress.com/2007/07/24/classic-asp-on-vistaiis-70/
(notice the first screenshot)...

There are a few links at the end of that article that might help too.

...are you tring to run Classic ASP and ASP.Net as 2 separate applications?
or is your intention to have *.asp and *.aspx pages in the same "application"?
0
 
JohnAtkinsonAuthor Commented:
This application will remain Classic ASP for the forseeable future.
0
 
JohnAtkinsonAuthor Commented:
oh, and classic ASP is turned on.  I turned on everything when I enabled IIS 7.
0
 
samtran0331Commented:
>>Attempting to browse the site, via http://localhost:80 results in a server error
I would imagine that the root site (at localhost port 80) is configured to be ASP.Net.
I've never changed it in Vista/IIS7 to *not* be ASP.Net...
I'm curious as to what happens if you just put in a default web.config....
try creating a new file in notepad named "web.config" and put the below in it ..(and of course save it to the correct directory)
<?xml version="1.0"?>
<configuration>
    <appSettings/>
    <connectionStrings>
    </connectionStrings>
    <system.web>
        <compilation debug="false" strict="false" explicit="true" />
        <pages>
            <namespaces>
                <clear />
                <add namespace="System" />
                <add namespace="System.Collections" />
                <add namespace="System.Collections.Specialized" />
                <add namespace="System.Configuration" />
                <add namespace="System.Text" />
                <add namespace="System.Text.RegularExpressions" />
                <add namespace="System.Web" />
                <add namespace="System.Web.Caching" />
                <add namespace="System.Web.SessionState" />
                <add namespace="System.Web.Security" />
                <add namespace="System.Web.Profile" />
                <add namespace="System.Web.UI" />
                <add namespace="System.Web.UI.WebControls" />
                <add namespace="System.Web.UI.WebControls.WebParts" />
                <add namespace="System.Web.UI.HtmlControls" />
            </namespaces>
        </pages>
         <authentication mode="None" />
        <!--
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    </system.web>
</configuration>

Open in new window

0
 
JohnAtkinsonAuthor Commented:
After adding a web.config file, the error message changed.  I discovered that I had grant TWO groups, IIS_IUSRS and IUSRS, read, read & execute, and list permissions.  I was accustomed to granting it for IIS_IUSRS, but not IUSRS.  Must be a new "feature" of IIS7.

Now if I could just get php to install properly...
But that's another question!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now