Error in web.config file in asp.net webform application - c#

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

Related

Configuration Error while running the site from visual studio 2012

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

Could not load type 'System.UI.Page' Configuration Error

I'm receiving this error trying to show an ASP.NET web forms page in a folder in an ASP.NET MVC application. Am I missing an assembly reference or package?
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: Could not load type 'System.UI.Page'.
Source Error:
Line 324: </mobileControls>
Line 325:
Line 326: <pages pageBaseType="System.UI.Page" userControlBaseType="System.UI.UserControl">
Line 327: <namespaces>
Line 328: <add namespace="System" />
Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config Line: 326
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212
Page is not in System.UI. It's in System.Web.UI namespace, in the System.Web assembly. You should have System.Web referenced by default, so just fix the fully qualified name in your web.config. Same thing goes for UserControl class.
<pages pageBaseType="System.Web.UI.Page" userControlBaseType="System.Web.UI.UserControl">

ASP.NET error about connection string name

I have a website with .net framework 4 and telerik 2012, when i uploaded my web site on the server one of my page has this error.
The entry 'ConnectionString' has already been added.
for solving this err i use this solution:
<remove name="ConnectionString" />
and after this line ,define my connection in web config. but this err apear :
** Method not found: 'System.Web.UI.ScriptResourceDefinition System.Web.UI.ScriptResourceMapping.GetDefinition(System.String)'.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.MissingMethodException: Method not found:
'System.Web.UI.ScriptResourceDefinition
System.Web.UI.ScriptResourceMapping.GetDefinition(System.String)'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
**
{Note : this err just occurred on the server not in local }
and when i removed this line : <remove name="ConnectionString" /> the first err apear again : The entry 'ConnectionString' has already been added.
What can I do now?
Please check framework version on your web server, it should be 4.5. In 4.0 GetDefinition function do not have overload which accpet a string param only. Keep following entry in web.config as it has nothing to do with other error you are getting.
<remove name="ConnectionString" />

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