Question

I have a large silverlight application using RIA Services that I'm migrating from WS2008 to WS2012. This application works fine on the 2008 machine.

On the new machine I've:

  • Enabled WCF Activation, IIS, applicable security, etc.

  • Installed RiaServices.msi with SERVER=TRUE

Regular svc's work (I have a few that I use for logging) just fine, I'm able to communicate with them as expected.

When a call is made to a domain service, however, I get a 404 error.

Any call to a domain service under /Clientbin/service_name.svc returns a 404 error.

I've been pulling my hair out for the last couple of days trying to figure this out. Any ideas?

Thanks!

Était-ce utile?

La solution

I eventually solved this. 404 is apparently what you get with a RIA service when there is some underlying error before you get to your execution code. The best way to get at that for me at least, was to create the svc file that doesn't exist (pretend like it's a normal wcf service), place it in the ClientBin folder, and then use Fiddler. Once the file was there, my 404 became a 500, with a description of the error in Fiddler.

In my case, the error was the SqlServerTypes libs were not installed on the server, and it was throwing up.

Hope it helps someone.

Autres conseils

Maybe you already know it, if not it definitelly worth a look: Troubleshooting the Deployment of a RIA Services Solution.
Also, I won't bother on installing RiaServices on server side, just make sure that you set "Copy Local" to System.ServiceModel.DomainServices.*

Make sure you've deployed bin in addition to ClientBin

If you're using an automated deployment (I use TFS) you should make sure the bin folder has actually been deployed. For some reason my bin folder wasn't being deployed via msdeploy to a new server - but all other files were there.

The ClientBin contains the xap file and it's what runs on the client. For me that was deployed just fine - so it looked like my application was deployed successfully. You'll go round and round in circles with the damn svc mappings which is a total red herring.

Without the bin folder no amount of enabling SVC handlers will make any difference!

--

So it turns out my bin folder wasn't updated since 2015 (even on the old server), which didn't really matter but that explains why some new features I added never worked lol. The only reason it even worked before is I originally had x-copied it over before I started with TFS deployment which is only deploying the client app for some reason.

This is, ultimately what was causing the problem for me (this is the correct setting below):

enter image description here

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top