When I deploy my web project on IIS, I get the following error - asp.net

When i deploy my web project after publishing, on IIS. it gives me the following error.
Server Error in '/' Application.
Could not load file or assembly 'System.Web' or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly 'System.Web' or one of its dependencies. The system cannot find the file specified.
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web' 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].

Try the following (If using 64 bit IIS - replace framework by framework 64):-
Run command prompt as admin.
2a. If using version 3.5 Type
cd c:\windows\microsoft.net\framework\v2.0.50727
and press enter.
2b. If using version 4.0 or 4.5 type
cd c:\windows\microsoft.net\framework\v4.0.30319
and press enter.
3. Type
aspnet_regiis -i
and press enter.

Related

Alachisoft.NCache.Web.SessionState.NSessionStoreProvider can't find protobuf-net

I've downloaded the open source edition of ncache and i've followed the instructions at http://www.alachisoft.com/resources/docs/ncache/help/aspnet-session-state-provider.html?mw=Mzk2&st=MQ==&sct=MTk4&ms=QwAAEAAAIAAAAQACATgIAhA=
to configure my website to put the session state in ncache.
However, i get this error hitting the site.
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 'protobuf-net, Version=1.0.0.282, Culture=neutral, PublicKeyToken=257b51d87d2e4d67' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 136:
Line 137:
Source File: C:\inetpub\wwwroot\xxxx\web.config Line: 138
Assembly Load Trace: The following information can be helpful to determine why the assembly 'protobuf-net, Version=1.0.0.282, Culture=neutral, PublicKeyToken=257b51d87d2e4d67' could not be loaded
I'm not sure where to find that dll or why it can't be loaded? I tried using nuget to install protobuf-net but there is no 1.0.0 version and the recent version does not fix the problem when i copy it to the bin folder.
Randy
Turns out the issue was that you need NCache installed on the web servers too, in addition to the cache servers. This is a better page to follow if you are just starting out with NCache for sessionState.
http://www.alachisoft.com/resources/docs/ncache/ncache-session-guide.pdf

MSDeploy build after win upgrade

I am doing a msdeploy in the Developer Command Prompt (Admin) and after updating to Win 8.1 Pro, I get this error after running the command.
I did not get this error before the update I got another error USER NOT ADMIN to fix this I had to upgrade so I could create a group and add deploy as Admin.
Please forgive any bad formatting first timer.
>..\..\lib\msdeploy\msdeploy -verb:sync -source:package='Package.zip' -dest:contentPath='test.dev',computerName=localhost,userName=deploy,password=xxxx
Error: Exception has been thrown by the target of an invocation. ---> System.Exception: The type initializer for 'Microsoft.Web.Deployment.DeploymentManager' threw an exception. ---> System.Exception: The type initializer for 'Microsoft.Web.Deployment.BuiltInTypesCache' threw an exception. ---> System.Exception: The type initializer for 'Microsoft.Data.Tools.Schema.MsDeploy.MsDeployProviderBaseProviderFactory' threw an exception. ---> System.IO.IOException: Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft SQL Server\110\DAC\Bin\Microsoft.Data.Tools.Schema.Sql.dll' or one of its dependencies. Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) ---> System.Exception:Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
I believe this part of the error indicates you need to install, repair or uninstall/reinstall the 2012 version of the SQL Server Data Tools:
System.IO.IOException: Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft SQL Server\110\DAC\Bin\Microsoft.Data.Tools.Schema.Sql.dll' or one of its dependencies.

Azure Web Role with Transient Fault Handling Block exception: The path is too long after being fully qualified

We applied Transient Fault Handling Block for our web role of cloud service, we even didn't write one single line code. When we try to debug our cloud service locally, the exception would show on webpage, like this:
The path is too long after being fully qualified. Make sure the full
path is less than 260 characters and the directory name is less than
248 characters.
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.IO.FileLoadException: The path is too long
after being fully qualified. Make sure the full path is less than 260
characters and the directory name is less than 248 characters.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/AzureCloudService2/WebRole1/
LOG: Initial PrivatePath = C:\AzureCloudService2\WebRole1\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\AzureCloudService2\WebRole1\web.config
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/<user>/AppData/Local/dftmp/Resources/7f758b78-aef1-47f7-ad86-8be56d4218e0/temp/temp/RoleTemp/Temporary ASP.NET Files/root/63defe93/23a6bb89/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.DLL.
LOG: Attempting download of new URL file:///C:/Users/<user>/AppData/Local/dftmp/Resources/7f758b78-aef1-47f7-ad86-8be56d4218e0/temp/temp/RoleTemp/Temporary ASP.NET Files/root/63defe93/23a6bb89/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.DLL.
LOG: Attempting download of new URL file:///C:/AzureCloudService2/WebRole1/bin/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.DLL.
LOG: Using application configuration file: C:\AzureCloudService2\WebRole1\web.config
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
ERR: Failed to complete setup of assembly (hr = 0x8007006f). Probing terminated.
From the logging, it seems couldn't find Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.dll in above locations, but actually it indeed located at C:/AzureCloudService2/WebRole1/bin/, I've checked it many times.
Several information:
We just install the packages via Nuget
We also tried other packages such as TransientFaultHandling.Caching .etc, all have such problems.
What's interesting is it works fine in worker role
#RandyLevy thanks for your comment, it solved my problem. You would win the bounty if you post it as an answer :)
It looks like the ASP.NET temporary directory is exceeding the max
path length. Take a look at Windows Azure - Resolving 'The Path is
too long after being fully qualified Error Message' to set the
_CSRUN_STATE_DIRECTORY environment variable. – Randy Levy

Compiler Error Message: CS0009 - mscorlib.dll

When I try to run my web application, the following error occurs:
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.
Compiler Error Message: CS0009: Metadata file
'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' could not
be opened -- 'File is corrupt.'
It seems to me that the .NET framework 4 installation is corrupt, but I am using Windows 8.1, and I'm not sure how to repair this, as it is integrated into the Windows installation.
I manually copied the corrupted file from a different computer with the same Windows installation. It took some permission changing, but I managed to do it.

Web service Compilation Error

I have a problem with a web service. I add a web service reference to my project. I use this service in many pages. It is working correctly, no problems in VS but I copy App_WebReferences folder's files and Web.Config file to ISS path. But it is not working.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'InterkomLaboratuar' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 22: InterkomLaboratuar.Service1SoapClient _sistemTip = new InterkomLaboratuar.Service1SoapClient();
Source File: c:\Inetpub\wwwroot\MedulaV3\diyaliz02\Istemler.aspx.cs Line: 22
How can i solve this problem please help..
Copy Bin folder to IIS. You are missing some assemblies.

Resources