Why does my silverlight application work when hosted locally but not on discountasp?

Discussion in 'Silverlight' started by Shandrix, Oct 20, 2010.

  1. Why does my silverlight application work when hosted locally but not when it is deployed to shared hosting?
    Question: I have a web site I am developing with the Umbraco CMS. I have a separate Silverlight web application in a subdirectory of that website called KB. We are running .NET 4.0.
    The KB application works fine under Umbraco on my internal web server running IIS 7.0 under Windows Server 2008. I have it set to use the MS SQL 2008 R2 databases hosted by discountasp.net, and everything works.
    Using the exact same files and web.configs uploaded onto the remote server, I get three errors.
    The first error pops up when the I go to the kb application when it first opens.

    [​IMG]


    The second error happens if I try to login to the KB application.

    [​IMG]

    The third error happens when I try to register a new user.

    [​IMG]


    The web site is on shared hosting at discountasp.net, running on Windows Server 2008, IIS 7 and Sql Server 2008. I have one application pool dedicated to my entire website, with both applications (Umbraco and KB).
     
  2. Bruce

    Bruce DiscountASP.NET Staff

  3. We have diagnosed and fixed the problem. Turns out on the remote server, both Basic Authentication and Forms Authentication were enabled at the same time in IIS, and they apparently conflict because Basic authentication uses challenge and forms uses login/redirect. I disabled Basic Authentication and it works now.

    We used Fiddler to find the error. Thanks for the link.
     
  4. mjp

    mjp

    Thanks for posting a follow-up.
     
  5. Has anyone out there get a Silverlight4 Business App authentication model to work?
    SQL2008 DASP Database works just fine .. authentication does not

    If so, can we talk?

    Thanks
     
  6. I'd recommend starting a new thread an posting the problem you're having and as much information about it as possible. This way you'd be able to get some answers specifically for your issue.
     
  7. Shandrix,

    Thanks for posting your solution..... Apparently this is true for Basic and Windows Auth in IIS7.... Would have never thought to look at that, but removed Basic and boom... now I am up and going.... Only wish I had found three hours ago. Still good solution a year later, please keep up!

    TheDog
     
  8. mjp

    mjp

    Glad you tracked down the problem.
     
  9. Hi,

    May I know how to remove Basic Authentication?

    I had the same problem with my WCF application. It showed a HTTP Error 500.19 when I accessed it from the browser, with the message:

    Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'BasicAuthenticationModule'


    I had the problem even when it was hosted locally, but I solved it using these steps. (Step 1) I disabled Basic Authentication in IIS, and it still had the problem. (Step 2) Then I removed Basic Authentication completely from IIS using

    Start->Control Panel->Uninstall or change a program->Turn Windows Features on or off

    and restarted the computer. This solved the problem on my localhost.

    However, now that I've moved my application to discountASP.NET, I can only login to the server using IIS Manager and disable Basic Authentication. I did that and restarted the server through discountASP's control panel: IIS Tools->Stop/Start Web, but it still gave me the same error.

    I'm thinking I need to perform Step 2 as well, but I don't know how to do it here.

    Can anyone let me know how they solved this issue, or how to perform Step 2? Thanks.

    James
     

Share This Page