When a Gen application window is generated for ASP.NET, the User Interface is not picking up either the User_ID field or the Client_User_ID field, both are showing as "USERID" in the Diagram Trace Utility (DTU).
Gen ASP.NET Application
User ID is one of the security related system attributes that are used to identify a user session in a web environment. Depending on user security setup and application design there may be different ways to populate those system attributes. The User ID in an ASP.NET application could be the same as the Windows logon user, but it could also be different. Therefore Gen .NET runtime lets the user decide how they want their system attributes to be populated. For this purpose Gen provides a user exit to do that job.
Basically, you need to modify the UserID property of the SessionIdExit.cs to populate the User ID for ASP.NET application.
Following is an example of how to populate the ASP.NET application USER_ID with Windows logon user id.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<directoryBrowse enabled="true" />
</system.webServer>
<system.web>
<!-- <authentication mode="Windows" />
<authorization>
<allow users="*" />
</authorization>
-->
<authentication mode=Windows />
:
</system.web>
</configuration>
using System.web;
public static string UserId
{
get {
String currentUser=System.Web.HttpContext.Current.User.Identity.Name.
ToString();
int index = currentUser.IndexOf('\\');
return currentUser.Substring(index+1);
}
}
This documentation section includes ASP.NET client user exits like SessionIdExit.cs: Gen™ 8.6 > Distributed Processing > Working with .NET Servers > .NET Server User Exits