0

We migrated a SQL SSRS server from one machine to another. In order to make it so that everyone's shortcuts and favorites to specific reports still work, I shut down the old SSRS server and created an IIS site on that server that uses URL rewrite to redirect the request to the new server. It works great.

Now we want to, over time, contact the users who have not replaced their shortcuts and favorites with new ones on the new server and get them to do it so that we can shut this old server off.

I thought it would be as easy as making it so that the only authentication method available was "Windows Authentication" (which is how this specific site was set up to begin with) and then look in the log files. But all of the log file lines have no username... which makes me believe that the URL rewrite is taking place BEFORE the authentication.

Anyone have a workaround that would force the authentication to the old server to work, so I can get usernames in the log files?

Glenn Sullivan
  • 1,368
  • 9
  • 17
  • User Name (cs-username): the name of the authenticated user who accessed your server. Anonymous users are indicated by a hyphen. Are you using Advanced Logging? https://docs.microsoft.com/en-us/iis/extensions/advanced-logging-module/advanced-logging-for-iis-custom-logging If you are getting hyphens in your request where username should be, it is likely that you are redirecting before an actual resource is touched and doesn't engage the authentication. Let it touch a blank html file resource and use a meta refresh or if there are other custom url paths an ASP.NET page to redirect maybe? – George Dec 21 '18 at 19:37
  • @George, yeah I thought of that, but the problem is that there are thousands of reports, each with their own URI, and the URI often contains query strings. I could have it hit an ASP page with the URI and query string passed to it, and then do the redirect on the ASP page, but that seems unnecessarily complicated. I think I'm just going to write a bit of code that will match the timestamp of the log entry on the first server to the log entry on the second server and get the username from the log on the second server. Thanks for responding. – Glenn Sullivan Dec 21 '18 at 20:02
  • On server 2, check if you can add the Referrer - cs(Referrer) -The site that the user last visited. to your logs. – George Dec 21 '18 at 20:21
  • Instead of redirecting such users to the target page, you can redirect them to a warning page in the middle, and then let that warning page redirect them again to the target page (which requires a little bit coding). With such a proxy page, you can easily insert whatever message you like to show to urge them updating their shortcuts, or record whoever has been redirected. – Lex Li Dec 21 '18 at 22:38

0 Answers0