Troubleshooting Silverlight 5 and Ria services [Web-Services-AuthenticationService.svc does not exist]

前提是你 提交于 2019-12-03 20:42:29

WCF Ria Services registers an HttpModule in order to manage the wcf ria services calls. When the request arrive to the server that module read the url and understand which service to instantiate and which method to call. So it's absolutely normal that you don't find any .svc file
Don't mess with the .g.cs your problem isn't here.
Take a look at your web.config file, you should find rows like this

<system.web>
    <httpModules>
      <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </httpModules>
...
</system.web>

and this

    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true">
          <add name="DomainServiceModule" preCondition="managedHandler" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </modules>
...
</system.webServer>

Besides making sure that the "DomainServiceModule" entries are present in Web.Config as stated above, another thing is that RIA requires ASP .NET compatibility mode to be enabled. Here is a link to Microsoft's deployment guide for RIA:

http://msdn.microsoft.com/en-us/library/ff426912(v=vs.91).aspx

In the third paragraph of the "Configure the Web Server" section, it states that you need the following in your Web.Config file:

<system.serviceModel> ... <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> ... </system.serviceModel>

When this is missing, you get the behavior described in your question.

Before you do any of this make sure the regular bin folder is actually deployed containing your actual code.

I was deploying with MSDEPLOY to a new server and it did not deploy bin folder. You're not going to get anywhere without that!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!