I have two different versions of a Silverlight 5 project using Ria services. Both work locally. The older version (A) works when deployed to ISS7. The new version (B) does not. There is user/password authentication that fails for version B with the error:
Load operation failed for query 'Login'. the remote server returned an error: NotFound.
Referencing various SO and MSDN posts over the past week, I have tried many troubleshooting techniques. Adding error logging as suggested here to the web.config results in the following being logged:
The service '/ClientBin/MyApp-Web-Services-AuthenticationService.svc' does not exist.
Researching that led to finding this forum post which suggests creating a dummy .svc file with the name/path it is looking for. The result:
The service '/ClientBin/DBCRM-Web-Services-AuthenticationService.svc' cannot be activated due to an exception during compilation. The exception message is: The ending bracket '>' for the 'ServiceHost' directive is missing in the '.svc' file..
The details of the above error aren't largely important as it was a blank .svc file I supplied. It merely served to confirm that fact that the project was indeed dependent on it
Here's the kicker... the working version DOES NOT contain this file either, yet it does not throw an exception.
Searching for any reference to needing the service surprisingly turned up a result in both solutions. Both MyApp.Web.g.cs
files are identical (ran a CSDiff) and both contain the line:
public AuthenticationContext() : this(new WebDomainClient<IAuthenticationServiceContract>(new Uri("DBCRM-Web-Services-AuthenticationService.svc", UriKind.Relative))) { }
Both have the same package/deploy settings. I am deploying to a file system, then copying the files over to IIS on my host server.
Questions:
Where is a setting that makes this .svc file a requirement? It's clearly not needed in version A, but is in version B. Again, file
MyApp.Web.g.cs
is the only reference to it, and it exists in both versions.MyApp.Web.g.cs
is a generated file. What service in Visual Studio 2010 creates this file? Also, can I modify it to not include the call to the.svc
file in question?
I'm going to start merging the two solutions together to see at which point the .svc file becomes neccessary. Any ideas in the meantime would be greatly appreciated!