HttpContext.Current.User.Identity.Name is blank ?

  • I have implemented the forms authentication method using  MSDN web site

    http://msdn2.microsoft.com/en-us/library/ms160724.aspx

    and now i want to modify that code

    so when i used

    Dim UserName as string =HttpContext.Current.User.Identity.Name

    from the vb.net code behind

    it gives me ss as blank balue ?

    but the same code i used from the normal web site its gives me the

    "MHA\Administrator" value for that string(current user)

    so my problem is why is that code not working for the report server sample project ,which

    microsoft provided ?

    do i have to change any configuration settings ?

    please help me .......i am in trouble ?

    regards

    sujithf

     

     

  • This was removed by the editor as SPAM

  • The HTTPContext object will contain a value based on cookie that is set. For forms authentication, unless u set a cookie, the HTTP context object will return an empty.

  • Hi,

    I recently implemented FormsAuthentication for RS successfully.

    The problem you are having is because of the Cookie not being set properly.

    Report server issues you a cookie when the logon credentials are verified successfully. The domain name of this cooke and the domain name of your website/URL should be the same.

    So in this case, if you are using http://localhost/Reportserver to access the reports it may not work. The cookie will be lost. So try using http://yourreportsservername/Reports.

    The domain name for the cookie (forms authentication cookie ) should match the URL that you are trying to access.

    I hope this helps.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply