Silverlight WCF RIA services deployment and the 404 error
For the whole day yesterday I’ve been struggling with deploying a silverlight website with RIA services to a test environment.
The website worked fine in my development environment when it’s published from VS2012, the only problem I encountered in the dev environment was having to re-add (remove and add) some .net 4.0 svc extensions and making sure the correct .net 4.0 svc extension is being used (Running “aspnet_regiis.exe -i” in C:\Windows\Microsoft.NET\Framework\v4.0.30319).
However, once I copied the whole web application folder onto my test environment. All svc pages started to give me 404 errors. Only information in fiddler was an “EndpointNotFoundException”. I think I’ve gone through every single blog,forum post/comments but I was still getting nowhere with this issue. I’ve checked my config files, IIS settings, bin folders and everything seems to be correct.
The steps I used to deploy the application are in
http://msdn.microsoft.com/en-us/library/ff426912(v=vs.91).aspx
And finally, after a day and a half, I realized what I was missing. The guide only tells me to include the following 2 domain services assemblies in the bin folder.
System.ServiceModel.DomainServices.Server.dll
System.ServiceModel.DomainServices.Hosting.dll
But in fact, for the runtime generated svc to work, we need a 3rd dll which is
System.ServiceModel.DomainServices.EntityFramework.dll
Once I put this dll into my bin folder, the svc pages started to work and everything came together!
Then I went back to some of the blogs I’ve read, I noticed that some of them actually mentioned about this dll and it’s simply my attention to detail that’s been failing me..
http://blogs.msdn.com/b/saurabh/archive/2010/03/16/ria-services-application-deployment.aspx
Leave a comment