Silverlight and Window Authentication

Silverlight and Window Authentication

by JBrooks 4. June 2013 08:38

I deployed my Silverlight application with Windows Authentication.  I then set IIS to only use Windows Authentication. When I navigated to the web site I would get the error:

“Load operation failed for query ‘GetUser’. The remote server returned an error: NotFound.”

getusererror

The fix that worked for me was to edit the file MyProject.Web/Services/AuthenticationService.cs.  I just changed this one method.

public class AuthenticationService : AuthenticationBase<User> {

    protected override User GetAuthenticatedUser(System.Security.Principal.IPrincipal principal)
    {
        User newUser = new User();
        newUser.Name = principal.Identity.Name;

        return newUser;
    }
}

This makes sense if you think about it, but the base class AuthenticationBase should have detected the authentication used and changed based on that.

Tags:

Development | Silverlight

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

One Script

OneScript Continuous Integration for you database Scripts in version control are automatically combined into a release script.

RecentPosts