Configuration error while loading the project from localhost

0

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.Web.Mobile, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

Source Error:

Line 74: 
Line 75:         <browserCaps userAgentCacheKeyLength="64">
Line 76:             <result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 77:         </browserCaps>
Line 78: 

Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config Line: 76 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446 

Rebooted my machine also, still I am not able to load my project

Thanks

c#
.net
asked on Stack Overflow May 9, 2014 by user1069997 • edited May 9, 2014 by Farmer Joe

2 Answers

0

Add this to your web.config

<compilation debug="false" targetFramework="4.0">
  <assemblies>
    <add assembly="System.Web.Mobile, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  </assemblies>
</compilation>
answered on Stack Overflow May 9, 2014 by Andrew
0

This API is obsolete from .NET Framework 4.0 http://msdn.microsoft.com/en-us/library/system.web.mobile.mobilecapabilities%28v=vs.100%29.aspx

Try changing your project Framework target to .NET 3.5

answered on Stack Overflow May 9, 2014 by Jeson Martajaya

User contributions licensed under CC BY-SA 3.0