Search code examples
silverlight-4.0wcf-ria-services

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??


Solution

    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;