While trying to get a LightSwitch application running on IIS I ran into this problem. Eventually I found the problem and solution, I thought I might share.

LightSwitch - GetAuthenticationType failed

Today I wanted to test a LightSwitch application on a real IIS server and ran into quite a few problems while trying to get it to work. Beth Massi has a number of articles that cover the installation process and solutions for many of the issues involved.

I did however run into another issue to which I could not find the solution on her site.


But before I continue, I am required to add the following disclaimer:

There is NO “go live” license for the LightSwitch Beta. You can deploy your LightSwitch applications to IIS for testing purposes ONLY

If you manage to publish your application following instructions of the article you might still run into an error like this one:

alt text

After searching through the LightSwitch beta forums I found that it is very unlikely the error is actually related to authentication issues,
but rather the result of the first call to the middle tier failing. The exception is simply absorbed by the various layers involed.

Someone (and forgive me for not remembering who) suggested to turn of customer errors in the web.config file:

<customerErrors mode="Off"/>

This won't change the error message you see in the silverlight client, but using Fiddler, it's easy enough to figure out where that first request is going.
Once you've figured this out you can view the page in your web browser:

alt text

In my case the url was:

"/Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationType"

and the exception message was:

IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous.
Change the IIS setting so that only a single authentication scheme is used.

While you might be experiencing different issues, you should be able to discover the real source using this method.

As for the solution to my problem, I went into IIS and checked the enabled authentication schemes for the application.
Sure enough both Forms Authentication and Windows Authentication (along with anonymous authentication) were enabled.

alt text

After disabling the Windows Authentication everything worked like charm (Except on MacOS, but that's a different issue for another time perhaps).

That's it, a bit short, but I decided to post this in case somebody else runs into similar problems, hope it helps.

silverlight-lightswitch
Posted by: Timothy Parez
Last revised: 13 Jan, 2011 12:24 AM

Comments

ATUL KOSHTA
ATUL KOSHTA
10 Sep, 2011 10:52 AM

Hi,

 I have created an application using DevExpress XtraReports trial version and published the application desktop locally, publish is succeeded but the application is giving an error at startup after the installation of setup.

the error is "GetAuthentication.Info"

No new comments are allowed on this post.