I get the following error when deploying my Web API Project that is targeting the .NET 4.5 Framework. I have made sure that all the referenced DLL's are in the bin folder.
Please have a look below and see the error:
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: The 'targetFramework' attribute in the element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, ''). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.
Source Error:
Line 22: </appSettings>
Line 23: <system.web>
Line 24: <compilation debug="true" targetFramework="4.5" />
Line 25: <httpRuntime targetFramework="4.5" />
Line 26: <authentication mode="None" />
Source File: C:\inetpub\wwwroot[website folder name]\web.config Line: 24
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
If i comment out line 24 and 25 i get a different error:
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 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
Source Error:
Line 109: <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 110: <add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
Line 111: <add assembly="*" />
Line 112: </assemblies>
Line 113: <buildProviders>
Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config Line: 111
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Net.Http' 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.0.30319.1
Are there two related in anyway?
How do i go about solving this problem?
Any help would be greatly appreciated.
Activate the feature WCF HTTP Activation for .NET 3.5 and 4.5 and try again:
Related
I have setup ASP project but when I am opening my local url in browser I am getting below error:
Parser Error Message: Could not load file or assembly
'Microsoft.Web.Iis.Rewrite.Providers, Version=7.1.761.0,
Culture=neutral, PublicKeyToken=0545b0627da60a5f' or one of its
dependencies. The system cannot find the file specified.
Line 16: <compilation debug="true" targetFramework="4.6.2" defaultLanguage="c#">
Line 17: <assemblies>
Line 18: <add assembly="Microsoft.Web.Iis.Rewrite.Providers, Version=7.1.761.0, Culture=neutral, PublicKeyToken=0545B0627DA60A5F" />
Line 19: </assemblies>
Line 20: </compilation>
Had the same problem using a DB provider. Fixed it by installing the URL Rewrite extensibility code samples.
During the installation make sure to select the "Runtime" option in the custom setup. This will register the sample providers in .NET Global Assembly Cache so that they can be used by URL Rewrite Module.
Using Custom Rewrite Providers with URL Rewrite Module
You error message indicates that the DLL is missing. Have you installed the IIS URL Rewrite Module?
For more another possible solution you can look at this post.
while deploying Nopcommerce on server facing this issue,
Method 'ExecuteAsync' in type 'System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy' from assembly 'EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' does not have an implementation.
>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.TypeLoadException: Method 'ExecuteAsync' in type 'System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy' from assembly 'EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' does not have an implementation.
>Source Error:
>The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
>1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%# Page Language="C#" Debug="true" %>
>or:
>2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
I am using webforms, it works fine on local machine but the time when i deployed the project server on it throws me the following error. I am not getting where it is coming from.
i am using following packages in the project:
Captcha.3.0.16.0
jQuery.2.1.3
jQuery.UI.Combined.1.11.4
Here is the error screen which i am getting:
Error Description:
Server Error in '/CabeePortal' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Reference.svcmap: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
[No relevant source lines]
Source File: /CabeePortal/App_WebReferences/CabPortalWS/ Line: 1
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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.0.30319.17929
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">
I created a webservice when it hosted on my local computer it works fine, but when i publish it to the web host, it doesnt work any more, i guess its a question about how the webserver is configured, but can i make some changes in web.config so it will work?
The error i get is below:
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=5.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 37:
Line 38:
Line 39:
Line 40:
Line 41:
Source File: c:\webs\talkactive\gb1634\qaz.dk\web.config Line: 39
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=5.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
The webservice uses a c# class placed in the app_code folder. That c# class uses mysql.
When i use the class in a normal .aspx file it works fine
I guess the obvious thing would be to check whether the MySql.Data exist in the GAC (or the web service's bin folder) on the server and is of the correct version and public key?
Basically, you are missing this DLL. You should look at putting it in the bin directory of your webservice.
There could also be a versioning conflict between the MySql client you want and what is installed on the server. You can add the following section to your web.config file and specify the proper version/public key you need:
<compilation debug="false">
<assemblies>
<add assembly="MySql.Data, Version=5.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
</assemblies>
</compilation>