Reference.svcmap Source Error [No relevant source lines]

Had an annoying bug writing a WCF service. If the service was hosted on the same server as the IIS6 ASPX site that consumed it I got the following error:

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: Specified argument was out of the range of valid values.
Parameter name: site

Source Error:

[No relevant source lines]


Source File: /App_WebReferences/MyServiceReference

Really no help whatsoever. There are two solutions, firstly  you could generate a proxy for the service like

  1. svcutil MyService.dll
  2. svcutil *.wsdl *.xsd /language:C# /namespace:*, MyService
  3. Move the generated CS to the App_Code folder
  4. Remove the Web_References folder entirely

Secondly update your .net framework from 3.5 to 3.5 SP1! This bug has been cleared up in SP1 and totally avoids the problem.

http://www.microsoft.com/net/Download.aspx

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Technorati
  • Twitter
Posted Monday, February 16th, 2009 under Development.

2 comments

  1. Cheers Russ!

    I’ll admit, its of no use to me but I do like it when bloggers post problems and their solutions. I try and do it myself on the odd occasion I’ve found a fix for something not well documented on the net.

    I’ve no doubt someone using Google will find this useful sooner or later.

  2. :D I love it, I actually have had quite a few thank yous from my [I thought] pointless blog :) Nice to give something back you know. Plus it’s a brilliant diary of problems, which I will inevitably come across again in the future, this logs how I solved it last time. Also I think it kinda works like a rolling C.V.

    You have inspired me to update my profile with a picture, damn you! When I get around to integrating Google Reader properly I’ll be sure to follow your blog more closely (rather than a quarterly catch up I currently do) :)

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes