views:

404

answers:

1

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.

A: 

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
No typos, it just doesn't work with application mapping on. No such thing as Request.User... User.Identity.Name returns a blank string.
Sam
Ok, sorry, cannot replicate your problem.
Paul