Server Variables (Logon_user and remote_user)RSS

1 reply

Last post Oct 26, 2018 05:41 AM by Brando Zhang

  • Server Variables (Logon_user and remote_user)

    Oct 25, 2018 03:28 PM|pfeif4|LINK

    I have set up ARR and URL Rewrite to redirect based on a certain pattern.  However, I am not able to properly set a server variable with the logged on user name.  I redirect to an aspx page and it knows the logged in user.  However, I want to set a new server variable with the same value.  

    I have added the server variable name and set it in the inbound rule.   Is the user name not populated at the time of the rule?  

    Any ideas on where I should look? 



  • Re: Server Variables (Logon_user and remote_user)

    Oct 26, 2018 05:41 AM|Brando Zhang|LINK

    Hi pfeif4,

    As far as I know, URL rewriter runs before any authentication happens in IIS, so the AUTH_USER server variables are not set and hence cannot be used in rewrite rules.

    We couldn't modify the user by using the url rewrite rules.

    You may want to try other third party rewriting components or implement an ASP.NET module that will do the redirection. Here is an example of how to do it: 

    Best Regards,