mill
mill

Reputation: 85

Silverlight 4 WCF Ria Services 404 Error

My Silverlight 4 WCF RIA Services Project works fine on my dev machine from VS 2010 also published, from IIS. But when I deploy it to the client machine (windows7) all my service methods return NotFound error. I tried all blog posts and forums all day long but in vain. service url from fiddler returns on the dev machine but 404 on the client pc. I am so frustrated right now. In my last trial I saw about manual creation of physical .svc file

<%@ ServiceHost Service="Fully.Qualified.NameOfYourService" Factory="System.ServiceModel.DomainServices.Hosting.DomainServiceHostFactory" %>

But couldn't figure out how to implement, someone please save my future??

Upvotes: 2

Views: 2122

Answers (2)

mill
mill

Reputation: 85

  1. install .NET framework 4.0;
  2. install IIS7 and enable "Windows Communication Foundation HTTP Activation" in the "Windows features";
  3. install WCF RIA Services with the option "SERVER=true" (you could also skip this step setting "Copy Local=True" for the System.ServiceModel.DomainServices.* dlls stored in the bin folder of your web application); msiexec /i RIAServices.msi SERVER=true
  4. use the "Add Application" menu in "IIS Manager" specifying the application name, the deploy dir containing your app and "ASP.NET v4.0" as application pool; if you obtain a "404 error" it's also useful to run "aspnet_regiis.exe -i" from the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory;

Upvotes: 4

Jignesh.Raj
Jignesh.Raj

Reputation: 5987

simple, create a new web site [to host your application] and then run the "aspnet_regiis -i" from the framework folder [Framework for 32bit or Framework64 for 64bit applications].

When viewing the HTTP Handlers section under the new website and you will see the various mappings for the .svc files have been created [look back at the default website and these havent been upgraded!]. This then resolved the 404 errors and Fiddler was also confirming that the svc files were being accessed correctly.

As a last configuration make sure the application pool is set to the ASP.NET 4 Integrated mode pool and enable the allow 32bit applications.

Hope this helps :-)

Upvotes: 1

Related Questions