Click here to Skip to main content
15,903,203 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I have a website which is made in .Net3.5 and configured to run on .Net2.0.

When I ran the website in .Net2.0 after commenting the assemblies that were not present in .Net2.0, I got success and was able to load the first page. But when i tried to run the same website under .Net3.5 environment, I got an error in web.config file in line no 57 as:-

MSIL
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. <br />

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.<br />

Source Error:

Line 55:             during development.
Line 56:         -->
Line 57:        <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="240">
Line 58:        </sessionState>
Line 59:        <httpRuntime maxRequestLength="20248" executionTimeout="800"/>



What has to be changed in web.config file OR somewhere else in order to run it smoothly in.Net3.5?

Thanks

Varun Sareen
Posted

1 solution

Generally this happens when you have more than one Web.Config file in your application root folder.
Just check if you have more than one. If so, remove the duplicate copies.

Read a similar issue resolved here:ASP.NET 2.0 & "allowDefinition='MachineToApplication'" error message[^]
Other useful link that has similar issue discussed: http://forums.asp.net/p/769696/769696.aspx
 
Share this answer
 
Comments
Varun Sareen 16-Oct-10 7:46am    
Thanks dear Sandeep. Problem solved

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