This project is read-only.

New user: Web.config file issue

Sep 15, 2010 at 4:04 PM

Hi guys:

I have just uploaded everything to a subfolder on my account called /blog. I have made sure its an application, and it appears the permissions are correct. I dont have a web.config file in the root directory, but I am getting this error:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Cannot read configuration file due to insufficient permissions


It appears its trying to look at a web.config file in the root directory when there isn't one. If anyone can help that would be greatly appreciated.



Sep 15, 2010 at 6:02 PM

If everything is in the /blog folder, the easiest way to get it working would be to make the /blog folder an "application" in IIS.  This can be done in IIS, or if it's at a shared web host where you don't have direct access to IIS, oftentimes the shared host might have a way in their control panel (or via a support ticket) to make a subfolder be an application -- sometimes aka "application starting point".

Sep 15, 2010 at 6:23 PM

Hi Ben:

Thanks for your response. I have already completed this step and the shared host customer support has assured me that the subfolder is an application. It appears to be looking for the web.config file in the root directory (which doesn't exist) instead of the one in the /blog folder.

Sep 15, 2010 at 7:22 PM

It may be one of two things (or both), or even something else.

IIS may be looking for a web.config file at the site-level.  Even though BE is in the /blog folder, /blog is still part of the main website and IIS may be looking for, or requiring, any web.config file in the root.

You may need to add / adjust file permissions for the site.  As the error indicates, IIS may not have sufficient permissions to read the file system.  You might want to look around in the control panel, or ask customer support about it.

For the first item above, you could try putting a basically empty web.config file in the root folder to appease IIS.  The one below is a basic one.

<?xml version="1.0" encoding="UTF-8"?>
    <compilation debug="false" strict="false" explicit="true">
				<clear />
				<add namespace="System" />
				<add namespace="System.Collections" />
				<add namespace="System.Collections.Specialized" />
				<add namespace="System.Configuration" />
				<add namespace="System.Data" />
				<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" />
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
		<authentication mode="Windows" />
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
				<clear />
				<add value="Default.asp" />
				<add value="login.aspx" />
				<add value="Default.htm" />
				<add value="index.htm" />
				<add value="index.html" />
				<add value="iisstart.htm" />
				<add value="default.aspx" />