Solved

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

Posted on 2008-06-13
5
2,312 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
  • 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now