Skip to content

Commit

Permalink
Further enhancements to the logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyts committed Mar 18, 2022
1 parent 3eb0da2 commit 83afa83
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SelfServiceSessionReset/App_Data/SelfServiceSessionReset.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions SelfServiceSessionReset/Controllers/CtxSessionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,18 @@ private string GetADUserProperties()
return (displayName);
}

/// <summary>
/// Get the Application Pool name and identity name for this web application.
/// This data is only used to assist with troubleshooting the installation.
/// </summary>
/// <returns></returns>
private string GetIISApplicationPoolDetails()
{
var AppPoolName = HttpContext.Current.Request.ServerVariables["APP_POOL_ID"];
var IdentityName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
return ("This Web Application is using the Application Pool " + AppPoolName + " running under the " + IdentityName + " identity");
}

/// <summary>
/// Get the Site XDCredentials settings from the App_Data/CtxSites.xml file,
/// set the Credentials and Authenticate.
Expand Down Expand Up @@ -672,6 +684,7 @@ private List<CtxSession> GetCurrentSessions(string SiteName, string AdminAddress
if (e.Message.IndexOf("Insufficient administrative privilege", StringComparison.CurrentCultureIgnoreCase) >= 0)
{
Log.Information("Insufficient administrative privilege to run the Get-BrokerSession cmdlet");
Log.Information(GetIISApplicationPoolDetails());
}
// These are errors caused by the Citrix Remote PowerShell SDK if the project is not built with the Platform target set to x64 instead of Any CPU.
// - Citrix.Broker.Admin.SDK.SdkOperationException: Invalid admin server version '0' () - should be '2'
Expand Down

0 comments on commit 83afa83

Please sign in to comment.