Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.net Page cannot run in debug mode

Hi

I am suddenly getting the following message in my ASP.net web application
project and am not sure why

User generated image
Avatar of Gary
Gary
Flag of Ireland image

So have you tried enabling it by modifying the web.config ???
Can occur if the web.config is read-only, assuming that you have tried clicking ok to modify the web.config.

Have you recently copied the project to a different location?
So as GaryC123 mentions, you need to enable debugging within the web.config. The window you are seeing is prompting you to do exactly that. If you click "OK" with the top radio button selected, then the web.config will be modified for you by Visual Studio. This happens in any web project within Visual Studio.
Avatar of Murray Brown

ASKER

When I click OK I get the following message showinh line 25 in red

Line 24:   <system.web>
Line 25:     <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/>
Line 26:     <authentication mode="Forms">
Line 27:       <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
 

 Source File:  C:\Users\murbro\Documents\Visual Studio 2010\Projects\Hotels\Hotels\web.config    Line:  25
Server 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: Sections must only appear once per config file.  See the help topic <location> for exceptions.

Source Error:


Line 25:     <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/>
Line 26:     <authentication mode="Forms">
Line 27:       <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
 

 Source File:  C:\Users\murbro\Documents\Visual Studio 2010\Projects\Hotels\Hotels\web.config    Line:  25


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18055
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks very much