0

When I set up wildcard application maps so that asp.net handles requests (setting executable path to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll) LOGON_USER is blank when I access a page via site.com/directory/ - site.com/directory/default.aspx returns the correct LOGON_USER value.

How can I fix this without needing to take off application maps?

Simple test:

<%# Request.ServerVariables["LOGON_USER"] %>

Results in DOMAIN\UserName when application maps not set up, but a blank string when they are.

Edit:

The site uses Forms authentication for administration, but I need to do LDAP queries based on the currently logged in user (and to search Active Directory) - anonymous access is turned off and Windows Integrated Authentication turned on.

SamWM
  • 5,196
  • 12
  • 56
  • 85

1 Answers1

0

I've never seen that before, and I almost always wildcard map, but is there any reason you're not using Request.User (or the Page's User helper property) instead of the string-based variable? I'm not sure if that'll help, but it is at least more safe from typoes.

Paul
  • 35,689
  • 11
  • 93
  • 122
  • No typos, it just doesn't work with application mapping on. No such thing as Request.User... User.Identity.Name returns a blank string. – SamWM Nov 25 '09 at 12:54
  • Ok, sorry, cannot replicate your problem. – Paul Nov 27 '09 at 14:33