Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8901

Service reference not defined

$
0
0
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.

Viewing all articles
Browse latest Browse all 8901

Trending Articles