SSRS 2019: Anonymour authentication

Prashant Andhale 6 Reputation points
2021-05-06T11:50:20.87+00:00

Anonymous authentication was working goof in SQL server 2016 by following below procedure.
https://learn.microsoft.com/en-us/archive/blogs/jameswu/anonymous-access-in-sql-rs-2008

However now I upgraded to SQL server 2019 and SSRS 2019, here after making change as in above url , it says some error in report server, nothing is displayed in report server.

Does SSRS 2019 has different configuration for Anonymous Authentication?

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,065 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Prashant Andhale 6 Reputation points
    2021-05-12T10:45:35.94+00:00

    Article u shared is explaining Form authentication. However I am looking to pass anonymous authentication.

    1 person found this answer helpful.
    0 comments No comments

  2. Joyzhao-MSFT 15,636 Reputation points
    2021-05-07T03:15:46.817+00:00

    Hi @Anonymous ,
    Whenever possible, Anonymous Authentication should be disabled on all SQL Server Reporting Services instances. When Anonymous Authentication is enabled, anyone who connects to the reporting services instance will have access to the reports that are configured to be viewed by the account to which the Anonymous Authentication account is mapped.

    Regarding Anonymour authentication, for the versions after SSRS2016, the changes are not significant. You can refer to: Implementing Custom SSRS Authentication.

    It is worth mentioning that you could open LogFiles and view the error log. The default location is: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles.
    Please find out the error message corresponding to the time, so that we can judge whether it is a problem in the update process or a problem configured by Anonymour authentication.
    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Prashant Andhale 6 Reputation points
    2021-05-07T05:43:56.723+00:00

    Hello Joyzhao-MSFT,
    Thank for your reply.

    I have attached here log and procedure I followed for Anonymous authentication. Your support is appreciated.
    Log below:

    2021-05-07 13:35:28.5793|INFO|1|File Logger created: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles\RSPortal_2021_05_07_13_35_28.log - level Info, will roll at 32 Mb, process id 9200
    2021-05-07 13:35:28.6105|INFO|1|Provider name
    2021-05-07 13:35:28.6105|INFO|1|Container name Microsoft SQL Server Reporting Services Key Container 2010
    2021-05-07 13:35:28.6105|INFO|1|Setting Symmetric Key
    2021-05-07 13:35:28.6261|INFO|1|Setting up Hosted Process State
    2021-05-07 13:35:29.0793|INFO|1|Starting ReportServerWebApp
    2021-05-07 13:35:29.2824|INFO|1|Working directory : C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\Portal
    2021-05-07 13:35:29.2824|INFO|1|Report Server url: http://ykgwomdemo/ReportServer
    2021-05-07 13:35:29.2824|INFO|1|Report Server Web App virtual root: /Reports
    2021-05-07 13:35:29.2824|INFO|1|Web app url: http://+:80/Reports/
    2021-05-07 13:35:29.2824|INFO|1|Web app url: https://ykgwomdemo.southeastasia.cloudapp.azure.com:443/Reports/
    2021-05-07 13:35:29.2824|INFO|1|Authentication scheme(s): Anonymous
    2021-05-07 13:35:31.3137|ERROR|1|Error loading extension:
    System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Samples.ReportingServices.AnonymousSecurity' or one of its dependencies. The system cannot find the file specified.
    File name: 'Microsoft.Samples.ReportingServices.AnonymousSecurity'
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
    at Microsoft.BIServer.Owin.Common.Services.AuthExtensionProvider.LoadAssemblyFromFile(String name)
    at Microsoft.BIServer.Owin.Common.Services.AuthExtensionProvider.LoadAssembly(String name)
    at Microsoft.BIServer.Owin.Common.Services.AuthExtensionProvider.CreateExtensionObject(Extension extConfig, Boolean typeOnly)

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    2021-05-07 13:37:00.4336|INFO|6|Received request GET | RequestID = s_0695ed11-75b7-4e5d-8d41-074dbe1ce695
    2021-05-07 13:37:00.4804|ERROR|6|Error loading extension:
    | RequestID = s_0695ed11-75b7-4e5d-8d41-074dbe1ce695 System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Samples.ReportingServices.AnonymousSecurity' or one of its dependencies. The system cannot find the file specified.
    File name: 'Microsoft.Samples.ReportingServices.AnonymousSecurity'
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
    at Microsoft.BIServer.Owin.Common.Services.AuthExtensionProvider.LoadAssemblyFromFile(String name)
    at Microsoft.BIServer.Owin.Common.Services.AuthExtensionProvider.LoadAssembly(String name)
    at Microsoft.BIServer.Owin.Common.Services.AuthExtensionProvider.CreateExtensionObject(Extension extConfig, Boolean typeOnly)

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    2021-05-07 13:37:00.4804|ERROR|6|Error when calling GetUserInfo in the Custom Authentication Extension| RequestID = s_0695ed11-75b7-4e5d-8d41-074dbe1ce695 System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.BIServer.Owin.Common.Services.AuthenticationService.<>c__DisplayClass3_0.<GetUserInfo>b__0()
    at Microsoft.BIServer.Owin.Common.Services.AuthenticationService.WrapExtensionCallT
    2021-05-07 13:37:00.4804|ERROR|6| fe80::791a:5f2b:f744:5d47%5: GET - 0:00:00.0366273
    Exception: Microsoft.BIServer.Owin.Common.Exceptions.AuthenticationExtensionException: GetUserInfo ---> System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.BIServer.Owin.Common.Services.AuthenticationService.<>c__DisplayClass3_0.<GetUserInfo>b__0()
    at Microsoft.BIServer.Owin.Common.Services.AuthenticationService.WrapExtensionCallT
    --- End of inner exception stack trace ---
    at Microsoft.BIServer.Owin.Common.Services.AuthenticationService.WrapExtensionCallT
    at Microsoft.BIServer.Owin.Common.Middleware.CustomAuthenticationMiddleware.CreatePortalIdentity(IOwinContext context)
    at Microsoft.BIServer.Owin.Common.Middleware.CustomAuthenticationMiddleware.Invoke(IOwinContext context)
    at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.BIServer.Owin.Common.Middleware.RequestLoggingMiddleWare.<Invoke>d__2.MoveNext()| RequestID = s_0695ed11-75b7-4e5d-8d41-074dbe1ce695

    0 comments No comments

  4. Joyzhao-MSFT 15,636 Reputation points
    2021-05-07T07:55:36.36+00:00

    Hi @Anonymous ,

    Error loading extension:
    System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Samples.ReportingServices.AnonymousSecurity' or one of its dependencies. The system cannot find the file specified.
    File name: 'Microsoft.Samples.ReportingServices.AnonymousSecurity'

    From the error report, the specified file cannot be found. I think it may be that the content in the configuration file needs to be modified. From what I have found so far, the URL path in the configuration file has changed.
    94676-03.jpg
    The URL path in the original configuration file:
    Url="D:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll",
    This path has been changed in the 2019 version. Make sure to change the below path according to your ReportServer installation directory(Modify according to your installation path): Url="C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"/>

    You could refer to the following link for reconfiguration, which is likely to resolve the error, please check carefully: Reporting Services Custom Security Sample for Power BI Report Server and SQL Reporting Services 2017. This configuration is suitable for SSRS2019.
    Hope this helps.
    Best Regard,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  5. Joyzhao-MSFT 15,636 Reputation points
    2021-05-12T03:23:59.3+00:00

    Hi @Anonymous ,
    I saw the following screenshot in your configuration information:
    95778-01.jpg

    Note that you cannot use Custom with the RSWindows types. This may be the cause of the abnormality of the extension program.
    Please change to:

    <Authentication>  
     <AuthenticationTypes>   
     <Custom/>  
     </AuthenticationTypes>  
     <RSWindowsExtendedProtectionLevel>Off</RSWindowsExtendedProtectionLevel>  
     <RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>  
     <EnableAuthPersistence>true</EnableAuthPersistence>  
    </Authentication>  
    

    95736-02.jpg
    In the Web.config file, find the authentication mode and set it to Forms.

    <authentication mode = "Forms" />  
    

    Find identity impersonate and set it to False.

    <identity impersonate = "false" />  
    

    For more settings, please refer to:, please refer to: Configure Custom or Forms Authentication on the Report Server. Please check carefully.
    In addition, please refer to: Reporting Services Custom Security Sample for Power BI Report Server and SQL Reporting Services 2017. Please refer to the above link configuration. This should be the most detailed operation that can be found so far, and it is suitable for SSRS2019.
    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.