Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

John Bailey

John Bailey JBailey In an infinite universe, all things are possible

Niner since 2009

  • Client Application Services with Visual Studio 2008

    It looks like the issue I was having was related to the automatic cookie detection at the server.  I added the following to the web.config for the web service:
      <authentication mode="Forms">
           <forms cookieless="UseCookies" />
      </authentication>

    The default is to autodetect.  Client Application Services does not work without cookies and for some reason the autodetect must be determining that cookies are not supported.  It works when I force cookie support at the server.

  • Client Application Services with Visual Studio 2008

    If I set the connectivity status explicitly to online ( I had originally just commented out the code where it was set to offline), the demo authenticates, but then I get the same results as in my custom providers.  I changed the load button method to the following:

    private void btnLoad_Click(object sender, EventArgs e)
    {
        if (Thread.CurrentPrincipal.Identity.IsAuthenticated)
        {
            txtLow.Text = Settings.Default.lowValue.ToString();
            txtHigh.Text = Settings.Default.highValue.ToString();
        }
    }


    and I get the following error when I select the Load button:

    Error status code returned by the Web Service: InternalServerError. Error details from service: {"Message":"You must log on to call this method.","StackTrace":"   at System.Web.ApplicationServices.ApplicationServiceHelper.EnsureAuthenticated(HttpContext context)\r\n   at System.Web.Profile.ProfileService.GetPropertiesForCurrentUser(IEnumerable`1 properties, Boolean authenticatedUserOnly)","ExceptionType":"System.Web.HttpException"}

    Again, I'm not sure what would cause the roles and profile to fail, but it looks like these services do not think the user is logged in even though the IsAuthenticated property on the principal is true.

    Any help or suggestions would be appreciated.
  • Client Application Services with Visual Studio 2008

    I've been struggling with CAS for a while and was happy to see your demo.  Unfortunately your demo gives me poorer results than my own efforts. 

    I am running Vista Ultimate SP1 and Visual Studio 2008 Professional SP1.  I have .Net 3.5 sp1 installed.  SQL Server 2005 Express is at SP3.  I loaded the demo and tried to authenticate with boss666!/boss666! and got a failed authentication.  I added a user of my own using the ASP.Net manager tool just in case it was an issue with the id and password and tried it and again got a failed authentication.  I have tried it on both my laptop and desktop development machines with the same result.

    With my custom providers the authentication works, but no roles or settings are available.  When trying to access the settings it gives an error stating that you have to be authenticated to call the function.  Checking the IsAuthenticated property of the identity before hand gives a true response, but I still get the error.

    I'm not really sure what could be the issue here.  When debugging my custom providers, I see the authentication service called, but the role service it is never called.  I can't really debug your demo as there isn't any real code in the server side.

    I appear to be one of many who are having issues.  Does anyone have a clue what could be the issue or is CAS just too buggy to use in any kind of a real environment?