I have added a wcf service (SifService) reference to my Kentico web application in VS. I didn't select any of the advanced options. I just provided the wsdl address, provide a namespace (SifService) and click OK. The service reference seems to have added successfully. However, when I attempt to create an instance of the client like in the code below, VS says the type or namespace "SifService" could not be found. We have just recently upgraded from Kentico 8 to Kentico 9. The same exact code works fine in the Kentico 8 code branch. The issue only appears in the Kentico 9 branch.
var sifClient = new SifService.SifClient();
When I attempt to run the site in VS, I get this error in the browser:
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.Http, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
[No relevant source lines]
Source File: /App_WebReferences/SifService/ Line: 1
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Http, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
NOTE: Everything runs fine until I add the service reference to SifService.
Sometimes it's an error of visual studio, clean the solution, build, so close the visual studio and build again, for me it worked a few times!
Related
I initially got a problem in DB due to which I re-installed entity framework (earlier my version was 5.0 and now I installed 6.1.3), I am connected to SQL server but now I am getting an error which says:
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: An error occurred creating the configuration section handler for entityFramework: Could not load file or assembly 'EntityFramework, Version=6.1.3, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Please tell me how to resolve it.
Thanks
Try to update your EntityFrame Work using this command from
update-Package EntityFramework
Also, make sure that the versions on packages.config and web.config match
It works fine on server. But now I'm deploying this on new server. I just copied the Package from my old server to this server.
When I browse application, getting the below mentioned error.
Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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.WebPages.Razor, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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.
On new Server its showing .net clr version v4.0.30319, but on old server it is
.net version v4.0.30319 for Application Pool.
Is this Framework related Issue? or m I missing something?
You new server might not have an ASP.NET-MVC installed on. You can set the reference to System.Web.WebPages.Razor copied to local set to true.
Right click on the System.Web.WebPages.Razor in your references and click properties. Set the Copy Local to true.
I installed the 4.5.2 framework onto my R2 dev server last week, and have been getting this error, ever since. The files contain no reference to VisualStudio.Shell. Any ideas?
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 'Microsoft.VisualStudio.Shell, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.
Source Error:
[No relevant source lines]
Source File: /App_WebReferences/ClientApplicationServer/ Line: 1
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'Microsoft.VisualStudio.Shell,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
could not be loaded.
So I spent about 2 days trying to figure out what the heck was going...
The way I was able to fix it is by adding Microsoft.VisualStudio.Shell to
C:\Windows\assembly
But the only way to do that is using gacutil.
gacutil -i Microsoft.VisualStudio.Shell.dll
That fixed it for me. Hopefully it helps someone with the same problem.
Server Error in '/' 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 'RadMenu.Net2, Version=4.4.6.0, Culture=neutral, PublicKeyToken=bbe59a8ad3533e68' or one of its dependencies. The system cannot find the file specified.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'RadMenu.Net2, Version=4.4.6.0, Culture=neutral, PublicKeyToken=bbe59a8ad3533e68' could not be loaded.
Pls help me to resolved this error...
This means that somewhere in your projects and/or web.config(s) you have a reference to this horribly old assembly (I think it is 8 or so years old). Remove it and migrate to the modern AJAX suite.
My web application was working perfectly minutes ago now I get this error when I run it.
How can I solve this issue since its not even part of my project files?
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)) (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config line 285)
Line 285: add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, System.Web.Mobile, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"**
I probably should have done this before posting the question.
I saved my work then restarted Visual Studio.
It worked for me as well after restarting visual studio.