Click here to Skip to main content
15,881,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Experts,

I upload my website to server but it generate an error. It is working fine on local machine.

Please help me regarding this error.



XML
erver Error in '/' Application.

Configuration Error

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.

Parser Error Message: 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.

Source Error:


Line 24:                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 25:                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
Line 26:        <authentication mode="Forms">
Line 27:            <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
Line 28:        </authentication>
Posted

Hi, if you ever encounter this error

Quote:
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


SOLUTION
I had the same issue with VS 2012.
I resolved this by

1. Unload your current project
2. edit your .csproj
3. Find this
HTML
<mvcbuildviews>false</mvcbuildviews>

4. Instead of false change the value to true
5. Load again your project and you should not have any more this error

If you do have then one solution is to delete the content of the obj folder in the project generated by compiler.
 
Share this answer
 
VS.NET 2005 was complaining about a configuration section within the web.config file in the Backup folder of my application...just remove (or move) the backup folder so it doesn't have a web.config file under the Virtual directory that your ASP.NET 2.0 application is running in.

It worked for me :)
 
Share this answer
 
v2
Comments
Member 1513599 26-Apr-16 19:20pm    
This works
Hi,

The Issue is very common while working in hosting environment and dealing with clients website issues, finally i prepared a post by myself for future references and To help hosting administrators.I posted it on my blog, you may check the below URL to check:

Visit http://blog.geek4support.com

Thanks

Geek4Support_Admin
http://blog.geek4support.com
 
Share this answer
 
v2

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