Configuration Error while running the site from visual studio 2012 - c#

I am trying to run my website using The Visual Studio 2012 built in Server. I receive this error. I get this error (Note I am not using a virtual directory or an IIS Server just the Visual Studio 2012):
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 30: </buildProviders>
Line 31: </compilation>
Line 32: <authentication mode="None">
Line 33: <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
Line 34:
Source File: D:\work\latest\NewPortal16-11\NewPortal8\newportal8\web.config Line: 32
Show Additional Configuration Errors:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249

Related

How to Upload a Site (ASP.NET)

I'm trying to upload my c# site,
The sites seems to upload correctly,
But when I try to enter, I get the next message:
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Now I add the customErrors mode="Off" to my Web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<customErrors mode="Off"/>
</system.web>
</configuration>
And the new error is:
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: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File: \blablablablablabla\public_html\myweb\web.config Line: 8
Version Information: Microsoft .NET Framework Version:2.0.50727.8793; ASP.NET Version:2.0.50727.8762
I tryed modifying it to 2.0 (because the error signature), also tryed to delete the targetFramework attribute, but nothing works.
Thaaaaanks.
Go to IIS,
Click on Application Pool--> on the right side --> Select your Site--> double click on it and change the .Net Framework to v4.0
I hope it will solve your problem.
Thnks.

Error in web.config file in asp.net webform application

I am stuck at this and cannot figure it out why it is not working. When i open my website it shows me this error.If you can help me I'll be grateful. It is giving error at membership line and i cannot figure it out why it is giving this error.It is giving the Configuration Error. Below is the description of the 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 52: </controls>
Line 53: </pages>
Line 54: <membership>
Line 55: <providers>
Line 56: <!--

why is my website throwing me Authentication Mode=windows error

When I load my web page its giving me this error, I just published it from visual studio, where it was function perfectly fine and now its giving me an error.
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 87: ASP.NET to identify an incoming user.
Line 88: -->
Line 89: <authentication mode="Windows"/>
Line 90: <!--
Line 91: The <customErrors> section enables configuration
Whenever a new web application created, using Visual Studio.net it automatically creates a virtual directory in IIS and configures as an application. So you have to manually create a Virtual directory and configure it to application.
Start->All program-mes->Administrative tools->Internet Information service-> Select Server name->Web Site->Default Web site-> right click ->new->virtual directory
this opens a virtual directory wizard. give a name, give path of application. Give appropriate permission. then Finish.
Now to cross check whether its configured to an application or not, select created virtual directory Right click->properties->Select Virtual directory under "Application settings"
http://blogs.msdn.com/b/robgruen/archive/2005/09/12/464196.aspx
delete all code in web.config and paste
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="your connection string name" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\your database name;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
</configuration>
it will work.

web config authentication

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 30: </httpHandlers>
Line 31: <httpRuntime maxRequestLength="3145728" />
Line 32: <authentication mode="Forms">
Line 33: <forms loginUrl="~/admin" timeout="40"/>
Line 34: </authentication>
Am I need Add web site to IIS for authentication
The <authentication> node cannot be inherited. It needs to be defined only once at the top level web.config. Your ASP.NET MVC 3 application needs to be hosted in a virtual directory in IIS or in a separate website.

Deploying asp.net website under existing web site on FTP?

I have a web site underneath I want deploy another web application. So I created a folder in the ftp site and dumped all my file in it.
Example:
Now I am getting below error when trying to access my application default.aspx file
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 33: </assemblies>
Line 34: </compilation>
Line 35: <authentication mode="Forms">
Line 36: <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
Line 37: </authentication>
I don't know root site asp.net version, but I developed on asp.net 3.5
How to resolve this?
You need to setup the subfolder as an IIS Application
I believe that you would need to go into IIS and ensure that the "OnlineReport" folder is configured as an application

Categories