LightSwitch 'Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc' does not exist
Asked Answered
D

3

5

I have exercised my frustration to its utmost today while trying to deploy a Lightswitch application to a Windows 2008 R2 server running IIS 7.5. Upon navigating to the application, I receive the following execrated error:

Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound.

Both the .NET trace and server Event Log have this to say about it:

Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/63835064 Exception: System.Web.HttpException (0x80004005): The service '/Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc' does not exist.

Configuration details are as follows:

  • I have selected "Do not enable authentication" under my Access Control options.
  • In my "Application Server Configuration" publish options, I am selecting IIS Server with the prerequisites checkbox unchecked.
  • Under "Publish Output", I'm creating a package on my local disk. Later, I'm copying that package to the server and running the .deploy.cmd manually, which appears to work fine.
  • My database connection under "Other Connections" is correct -- it is a SQL login that works from my box, and other sites on this server connect to the same DB server with no trouble.

On the server side:

  • The site is running in its own app pool in .NET 4.0 Integrated Mode, using the ApplicationPoolIdentity.
  • Only anonymous authentication is enabled.

What I've tried:

  • Installed all the Lightswitch stuff for 2011 and 2012 from the Web Platform Installer.
  • Installed RiaServices.msi.
  • Repaired .NET 4.5.
  • Ran aspnet_regiis -i

None of these had any effect at all. The only hint I have about the bolded error above is that that .svc is generated at runtime, and that it will throw a 404 error if some other issue occurs on the WCF end. (That's why I tried the RiaServices.msi install.)

I am able to "Remotely publish to a server now" to my own local IIS Express, and the app there works fine. Copying those files to the remote server yields the same result as before, however.

Any suggestions on how to troubleshoot this further?

Dower answered 9/11, 2012 at 23:24 Comment(0)
D
4

The problem was that the Lightswitch application was deploying with Microsoft.Data.Services 5.0.2.0, but Microsoft.LightSwitch.Server 11.0.0.0 must reference Microsoft.Data.Services 5.0.0.0. Once I deployed 5.0.0.0 to the web server, the application ran as expected.

I found this problem by trying to navigate directly to /Microsoft.LightSwitch.SecurityData.svc, which is a static service that deploys with the application, and then following the YSOD instructions.

Dower answered 13/11, 2012 at 22:30 Comment(2)
This download is what you need to install on the server to add the missing Microsoft.Data.XXX 5.0.0.0 stuff: microsoft.com/en-us/download/confirmation.aspx?id=29306Pharaoh
Hours troubleshooting this issue. Installing WcfDataServices (downloaded from the link provided by DCastenholz) was the solution to my particular problem.Allround
W
4

If you are getting this issue after you have installed Visual Studio 2013 or have installed a version of .NET that has newer OData than 5.0.0.0 on your development box, the problem is occurring because new versions of OData assemblies were installed and the LightSwitch Server project is now using these (which are incompatible). You can address the issue by updating your Server.csproj (or vbproj) to refer to the previous version of the OData assemblies.

Add HintPath nodes to the following 5 assembly entries in your Server\Server.CSProj

<Reference Include="Microsoft.Data.Edm">
  <HintPath>C:\Program Files (x86)\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.Edm.dll</HintPath>
  <Private>True</Private>
</Reference>
<Reference Include="Microsoft.Data.OData">
  <HintPath>C:\Program Files (x86)\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.OData.dll</HintPath>
  <Private>True</Private>
</Reference>
<Reference Include="Microsoft.Data.Services">
  <HintPath>C:\Program Files (x86)\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.Services.dll</HintPath>
  <Private>True</Private>
</Reference>
<Reference Include="Microsoft.Data.Services.Client">
  <HintPath>C:\Program Files (x86)\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.Services.Client.dll</HintPath>
  <Private>True</Private>
</Reference>
<Reference Include="System.Spatial">
  <HintPath>C:\Program Files (x86)\Microsoft WCF Data Services\5.0\bin\.NETFramework\System.Spatial.dll</HintPath>
  <Private>True</Private>
</Reference> 

This problem doesn't occur on projects that were upgraded to the V3 project system (with VS 2012 Update 2) or V4 projects (VS 2013) because we addressed how these assemblies were referenced. So an alternative solution is to right-click on the project and choose "Upgrade Project"

David Kidder | Senior SDET | Microsoft | LightSwitch

LightSwitch Forum Post Answer to this Question

Whichever answered 13/11, 2013 at 20:33 Comment(0)
P
2

I had same problem. Go to your application on the IIS, then double click on Authentication. Select Windows Authentication and disable that.

Poon answered 10/11, 2012 at 6:0 Comment(2)
Thanks for the response, but as stated above, only Anonymous Authentication is enabled for this site in IIS.Dower
If you intentionally have Anonymous Authentication disabled, check the answer by Facio Ratio.Pharaoh

© 2022 - 2024 — McMap. All rights reserved.