Solved

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

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp.net web application 3 44
Securing WEBAPI on Azure 2 23
Calculating percentage 2 29
Build a string of emails from a gridview 2 15
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

749 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