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:
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:
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:
In my case the url was:
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.
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.
Last revised: 13 Jan, 2011 12:24 AM
No new comments are allowed on this post.