Throwing error after deployment of asp.net project - c#

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

Related

Topshelf.HostFactory: Autofac missing assembly

I have problem with loading Autofac assembly on runtime in NET Core 3.1. In my project I have never use version 4.9.4, I have referenced only 6.3.0 version.
On starting application I get error
Topshelf.HostFactory Error: 0 : An exception occurred creating the
host, System.IO.FileLoadException: Could not load file or assembly
'Autofac, Version=4.9.4.0, Culture=neutral,
PublicKeyToken=17863af14b0044da' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
File name: 'Autofac, Version=4.9.4.0, Culture=neutral,
PublicKeyToken=17863af14b0044da'
My question is how to determine which assembly try to call Autofac in version 4.9.4?
How can I improve my logs to get such information?
Problem occurs on PROD env so we cannot use WinDbg or Fuslogvw.

mono - Mono.Options.dll not found

I'm trying to run a small C# application which parses its command-line arguments using Mono.Options. I added the following line to my .csproj:
<Reference Include="Mono.Options" />
and it compiles fine. However, when trying to actually run the application, I get the following error:
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Options, Version=0.2.3.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
File name: 'Mono.Options, Version=0.2.3.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Options, Version=0.2.3.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
File name: 'Mono.Options, Version=0.2.3.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
What am I doing wrong? locate Mono.Options shows the following:
/home/martin/.cache/MonoDevelop-5.0/DerivedData/Mono.Options.dll-f8111709
/home/martin/.cache/MonoDevelop-5.0/DerivedData/Mono.Options.dll-f8111709/0
/home/martin/.cache/MonoDevelop-5.0/DerivedData/Mono.Options.dll-f8111709/0/assembly.data
/home/martin/.cache/MonoDevelop-5.0/DerivedData/Mono.Options.dll-f8111709/0/assembly.tag
/home/martin/.cache/MonoDevelop-5.0/DerivedData/Mono.Options.dll-f8111709/0/data.xml
/usr/lib/mono/4.5-api/Mono.Options.dll
/usr/lib/mono/4.5.1-api/Mono.Options.dll
/usr/lib/mono/4.5.2-api/Mono.Options.dll
(I'm not using Visual Studio, monodevelop or any such IDEs, so please don't tell me to click some magic button or tick an option on a menu).

Web API Deployment error

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:

Could not load file or assembly 'System.Data'

I receive this error:
Could not load file or assembly 'System.Data' or one of its dependencies
This is my code in Web.Config.
<add assembly="System.Data" />
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Data' 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.272
Could you help me out to figure out what I'm doing wrong? Thanks

Error in webservice after publishing

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>

Categories