Solved

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

Posted on 2008-06-13
5
2,318 Views
Last Modified: 2012-05-05
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
Comment
Question by:JohnAtkinson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:samtran0331
ID: 21796452
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
 

Author Comment

by:JohnAtkinson
ID: 21797130
This application will remain Classic ASP for the forseeable future.
0
 

Author Comment

by:JohnAtkinson
ID: 21797145
oh, and classic ASP is turned on.  I turned on everything when I enabled IIS 7.
0
 
LVL 37

Accepted Solution

by:
samtran0331 earned 500 total points
ID: 21797304
>>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
 

Author Closing Comment

by:JohnAtkinson
ID: 31467138
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question