microsoft / Reporting-Services

Git repo for SQL Server Reporting Services and Power BI paginated report samples, and community projects
MIT License
425 stars 361 forks source link

AuthenticationExtension.cs methods not run by SSRS #242

Open r-coursera1 opened 2 years ago

r-coursera1 commented 2 years ago

I have an almost working implementation for forms authentication SSRS. The only issue is that none of the methods implemented by AuthenticationExtension.cs are getting called by SSRS

I tried to log it using Nlog but the interface functions (and the property) implemented in AuthenticationExtension.cs don't seem to get run by the SSRS !


public class AuthenticationExtension : IAuthenticationExtension2, IExtension
 {
 // .... other stuff

  Logger _logger;

public AuthenticationExtension()
{
   _logger = LogManager.GetCurrentClassLogger();
}

LocalizedName 
{ 
 get 
   {
    _logger.Info("LocalizedName"); 
    return null;
 } 
}

public bool LogonUser(string userName, string password, string authority)
{
    _logger.Info("LogonUser");
    return true;
}

public bool IsValidPrincipalName(string principalName)
{
  _logger.Info("IsValidPrincipalName");
  return true;
}

// other stuff
}

NLog logging works perfectly in Login.aspx.cs
But, no NLog logs for these 3 methods!
r-coursera1 commented 2 years ago

As per https://github.com/microsoft/Reporting-Services/issues/237#issuecomment-1125958610, I attached my debugger to the running processes

ReportingServicesService.exe RSPortal.exe

but the breakpoints set at the beginning of LogonUser(),LocalizedName, IsValidPrincipalName() are still not hit.