Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I am trying to open web project and run it. When I am going to run it the following error arises. I have already configured the web.config file of this project as per my system, but still this error occurs.
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Here is my web.config file
XML
<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
    <appSettings/>
    <connectionStrings>
        <add name="HelpDBConString" connectionString="Data Source=ALOK-PC\SQLEXPRESS;Initial Catalog=HELPDESKMGMTSystem;Trusted_Connection=true;" providerName="System.Data.SqlClient"/>
    </connectionStrings>
    <system.web>
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        -->
        <compilation debug="true" targetFramework="4.0">
        </compilation>
        <!--
            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" />
        </customErrors>
        -->
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
    <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
</configuration>


and the error is-
XML
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.



What should be the solution of this error. Pls tell me...
Thank you.
Posted
Updated 11-Nov-12 2:51am
v2
Comments
njammy 12-Nov-12 4:31am    
Which version IIS is it? 6 or 7? (Or other?)
NayakMamuni 12-Nov-12 7:37am    
IIS 7

1 solution

The error message is clear - "This error can be caused by a virtual directory not being configured as an application in IIS."

Check this Deployment of a Website on IIS[^]
 
Share this answer
 
Comments
NayakMamuni 13-Nov-12 2:16am    
Thanks for the valuable information.
Thanks again

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900