asp site will not work when uploading to web server? - asp.net

<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="rde_410978ConnectionString" connectionString="Data Source=SQL2008.net.dcs.hull.ac.uk;Initial Catalog=rde_410978;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
</configuration>
Here is my config file. I'm publishing it to the server by going to build > publish website.
None of the errors are due to the server as the university has set it up and it's working correctly for other people.
the 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: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
Line 16:
Line 17: <system.web>
Line 18: <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
Line 19:
Line 20: <authentication mode="Forms">
Source File: C:\RDEUsers\NET\410978\web.config Line: 18

Did you check IIS?
Sometimes IIS is set to a different framework.
http://technet.microsoft.com/en-us/library/cc754523(v=ws.10).aspx
Here is a similar problem and solution:
http://forums.asp.net/t/1491204.aspx/1

I think its because of the .net version of the Deployment Environment, which I presume is not 4.0.
Check it up with others if they have the same target Framework listed i.e. 4.0.

Related

Configuration Error on web host ,Could not load file or assembly

Please i want to solve this problem i did .aspx web application and when i try to publish it by GearHost i face this problem
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 file or assembly 'MySql.Data, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
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: C:\home\site\wwwroot\web.config Line: 14
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3429.0
and my web.config is
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
</appSettings>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="MySql.Data, Version=8.0.18.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5"/>
</system.web>
</configuration>
Please can anyone help me

Getting Configuration Error?

I have downloaded a online shopping project made in asp.net from
[http://prakashjha.codeplex.com/]
and trying to execute it in visual studio 2012 but i am getting this 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 39: <!--<roleManager enabled="true" />-->
Line 40: <compilation debug="true" targetFramework="4.0" />
Line 41: <authentication mode="Forms" >
Line 42:
Line 43: <forms defaultUrl="default.aspx" loginUrl="login1.aspx" cookieless="AutoDetect" ></forms>
i have configured iis server by going to
Control Panel then
Programs then
Turn Windows on or off
Then selecting iis
but still it is giving the same error.
Please help
Thanks in advance
If you have added this application to the sites in IIS then please for the development period change <compilation debug="true" targetFramework="4.0" /> to <compilation debug="false" targetFramework="4.0" /> because IIS doesnot support debugging and in the Advanced Settings of the site in IIS be sure to change Application Pool to ASP.NETv4.0 and you will be done.

Server Exception With ASPX

When I run aspx code through web server I get the following exception. What should I do to fix it ?
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:
Line 9: <system.web>
Line 10:<customErrors mode="Off"/>
Line 11: <compilation debug="true" targetFramework="4.5" />
Line 12:<httpRuntime targetFramework="4.5" />
Line 13: </system.web>
It is because of the below cases:
Your Application pool may configured for the .net framework version 2.0.
Or the framework 4.5 may not be installed on your server.
Make sure the framework is registered with the IIS.
Go to "Website" in IIS -> Start Options -> build tab – > Select Target Framework in combo box (.NET FrameWork 4.5)
There's no targetFramework attribute for the <httpRuntime> node. You should remove it from your web.config:
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime />
</system.web>
Also make sure that you have configured the IIS application pool to use the correct version of the .NET framework.

How to solve the following errors in Web.config

here is the error that is occuring at runtime
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 25: ASP.NET to identify an incoming user.
Line 26: -->
Line 27: <authentication mode="Forms"/>
Line 28: <!--
Line 29: The <customErrors> section enables configuration
Source File: F:\Final Event Management\event management\web.config Line: 27
and it is the coding in which error is genrating
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug="true" targetFramework="4.0">
</compilation>
<authentication mode="Forms"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
</configuration>
please solve this problem.............
Create a virtual directory and see if that solves the problem:
How to: Create IIS Virtual Directories in Visual Studio
Right-click project node in Solution Explorer Window and select Properties, then the Web tab and you should see a button to create a virtual directory for your site.

Publishing website on IIS error

Hi everyone when i publish my website via IIS, I get this error code as you can see at below. Can you help me ?
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 27: </assemblies>
Line 28: </compilation>
Line 29: <authentication mode="Forms">
Line 30: <forms loginUrl="~/Account/LogOn" timeout="2880" />
Line 31: </authentication>
Source File: C:\Users\furkan\Desktop\WebCity\webcity\web.config Line: 29
Then I converted my root dictionary to Application but I get this 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: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
Line 17: <system.web>
Line 18: <httpRuntime requestValidationMode="2.0" />
Line 19: <compilation debug="true" targetFramework="4.0">
Line 20: <assemblies>
Line 21: <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Source File: C:\Users\furkan\Desktop\WebCity\WebCity\web.config Line: 19
The answer to the first issue was this:
This usually means you have not configured the directory for your website as an application. Open up IIS Manager, find the root directory for your website (where web.config is), right click, and select "Convert to Application".
For the new issue, it's a problem of the .NET version. You either don't have asp.net 4.0 installed, or you have the application pool set to use the wrong framework. It's probably the latter, so go to the advanced setting for your site, select the Application Pool setting, and choose an Application Pool called ASP.NET 4.0, or any other that uses the 4.0 framework. If there aren't any, then you need to install .NET 4.0
Did you check if you have multiple web.configs in a sub directory somewhere?
Link describing the problem here

Resources