Giter VIP home page Giter VIP logo

reporting-services's Introduction

Reporting Services

Git repo for SQL Server Reporting Services samples and community projects

Reporting Services PowerShell Tools

In order to provide a better install experience the PowerShell scripts have been moved to https://github.com/Microsoft/ReportingServicesTools

Reporting Services Custom Security Sample

This project will help you to get started with how to deploy a custom security extension to SQL Reporting Services. For more details please check out the read me document in this folder CustomSecuritySample.

Reporting Load Test

Contains a Visual Studio Load Test 2015 solution to execute synthetic load for SQL Server Reporting Services 2016 https://github.com/Microsoft/Reporting-Services-loadtest

Paginated Report Samples

Contains several sample Power BI paginated reports to download and explore. They demonstrate typical ways you can use paginated reports. For more details please check out this article Paginated Report Samples. This folder contains the following paginated report samples :

Code Of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

reporting-services's People

Contributors

dependabot[bot] avatar edugonz avatar gboreki avatar hanlims avatar jingtong avatar jtarquino avatar mgmeyer avatar microsoft-github-policy-service[bot] avatar msftgits avatar parthsha avatar rgernha avatar rhysschmidtke avatar swgupt avatar talhajunaidd avatar tankas1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reporting-services's Issues

Logon.aspx logo image not displaying

Hi Guys,

We like to show company logo on custom landing page; used below code but the image is not displayed on the page.

  protected System.Web.UI.WebControls.Image ImgLogo;

  private void Page_Load(object sender, System.EventArgs e)
  {
        //Stream fs = FileUpload1.PostedFile.InputStream;
        //BinaryReader br = new BinaryReader(fs);
        //Byte[] bytes = br.ReadBytes((Int32)fs.Length);
        //string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);

        byte[] imageData = null;
        FileInfo fileInfo = new FileInfo("cdrivepath");
        long imageFileLength = fileInfo.Length;
        FileStream fs = new FileStream("cdrivepath", FileMode.Open, FileAccess.Read);
        BinaryReader br = new BinaryReader(fs);
        imageData = br.ReadBytes((int)imageFileLength);
        string base64String = Convert.ToBase64String(imageData, 0, imageData.Length);


        ImgLogo.ImageUrl = "data:image/png;base64," + base64String;

    }

Code works fine on empty page; and other web app projects.

Regards,

Navin

System.NotSupportedException: PortalIdentity is not supported

Hi,
I am using Power BI Report Server - 14.0.600.301
I can see RDL reports (http://localhost/reports/report/Test) while using custom security extension, but when I try to open a power bi report (http://localhost/reports/powerbi/MyUserReport), I get an exception like “System.NotSupportedException: PortalIdentity is not supported”.

RSPowerBI.log

2017-08-03 11:35:16.8710|ERROR|90|Failure in conceptualschema| RequestID = 5a55046e-0305-361b-e214-71fd8b0d79ff ClientSessionID = 3aee7b14-c24b-d6ac-237d-38809550b1bb System.NotSupportedException: PortalIdentity is not supported.
at Microsoft.PowerBI.ReportServer.ExploreHost.UserIdentityConnectionImpersonatorFactory.CreateImpersonator(IIdentity identity)
at Microsoft.PowerBI.ReportServer.ExploreHost.RSPowerViewHandler.GetModelInfo(String id)
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at Microsoft.PowerBI.ReportServer.ExploreHost.RSModelCache.GetOrAddModel(ModelKey key, Func`1 modelInfoFunc)
at Microsoft.PowerBI.ReportServer.ExploreHost.RSPowerViewHandler.EnsureSession(String modelId)
at Microsoft.PowerBI.ExploreHost.ExploreClientHandlerBaseFlow.b__8_0()
at System.Threading.Tasks.Task.Execute()
--- 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.PowerBI.ExploreHost.ExploreClient.d__10.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.PowerBI.ReportServer.ExploreHost.RSExploreHost.d__4.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.PowerBI.ReportServer.WebApi.PbiApi.PbiApiController.d__6.MoveNext()

Report Viewer 2016 for WebForms do not open PDFs in Chrome

I am trying to implement SSRS Report Viewer 2016 control on my Webpage I did install package Microsoft.ReportingServices.ReportViewerControl.WebForms -Pre it is now on version 140.1.291.2731477-rc When I open page whit report-viewer it looks all right . When I try to print on chrome I get Print dialog for Page orientation and page size. After click on print, nothing happens. On chrome developer tools in console screen get message:

Resource interpreted as Document : 
Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=14.0.1.291&Name=Microsoft.Reporting.Web…
but transferred with MIME type application/pdf: http://localhost:54071/Reserved.ReportViewerWebControl.axd?ReportSession

image

If I try to print in EDGE i get print screen dialog without problems.(PDF get opened)
If I try on Firefox I get PDF opened inside Dialog Window.

Can this issue be caused because report viewer control rendering report hosted on SSRS2012 services. (Control is 2016 version but it render remotely hosted SSRS2012 reports).

I did also try to instal Adobe PDF extension for CHROME but nothing again
Same message no PDF get oppened

Can't upload PBIX File.

I configured custom authentication in Power BI Report Server.
But when i upload .pbix file, it throws an error.
( .rdl files and excel files can be uploaded successfully)

The log file (RSPowerBI.log) contains the following information.

2017-07-18 03:36:34.9195|ERROR|7|Unhandled Exception in the owin pipeline ExceptionSystem.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.BIServer.Owin.Common.Services.AuthenticationService.GetUserInfo(RsRequestContext requestContext)
   at Microsoft.BIServer.Owin.Common.CustomAuthenticationMiddleware.Invoke(IOwinContext context)
   at Microsoft.BIServer.Owin.Common.GlobalExceptionHandlerMiddleware.<Invoke>d__0.MoveNext()
2017-07-18 03:36:45.6086|INFO|7|Dump result: External dump process return code 0x20000001.
External dump process returned no errors.
.

Does this extension work with Power BI Desktop (June 2017) Optimized for PBIRS?

Are these custom auth extensions compatible with Power BI Desktop? I had setup a PBIRS server, using IWA auth, confirmed it was working with Power BI Desktop , but after applying the security extensions (which work fine from the web portal), the desktop program no longer recognizes the PBIRS server as being valid. The error message is "We couldn't find a Power BI Report Server at that address". This is from the Power BI Report Server options under "File", "Open" or "File", "Save As". I am using the Power BI Desktop program released June 2017.

I realize this question may be out of scope for this project, but just wondering if anyone has encountered similar.

Report name mismatch and Could not load Authorization extension

I have implemented Custom Security following the guide in https://github.com/Microsoft/Reporting-Services/tree/master/CustomSecuritySample.
I am able to register a user and login but once the page for the portal starts to load I get en error message:
The service is not available.
The report server has encountered a configuration error.
Learn more

In the log file i found this:

RSPortal!extensionfactory!RSPortal.exe!7!11/17/2017-14:30:22:: e ERROR: Exception caught instantiating Forms report server extension: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Samples.ReportingServices.CustomSecurity.Authorization' threw an exception. ---> System.Exception: Report name mismatch
   at Microsoft.Samples.ReportingServices.CustomSecurity.Authorization.InitializeMaps() in C:\Users\mala56\OneDrive - Landstinget i Värmland\Portalen\Autentisering\CustomSecuritySample\Authorization.cs:line 576
   at Microsoft.Samples.ReportingServices.CustomSecurity.Authorization..cctor() in C:\Users\mala56\OneDrive - Landstinget i Värmland\Portalen\Autentisering\CustomSecuritySample\Authorization.cs:line 42
   --- End of inner exception stack trace ---
   at Microsoft.Samples.ReportingServices.CustomSecurity.Authorization..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.<>c__DisplayClass2.<CreateExtensionObject>b__0()
   at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass1.<Run>b__0(Object state)
   at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
   at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.Run(ContextBody callback)
   at Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.CreateExtensionObject(Extension extConfig, Boolean typeOnly).
RSPortal!library!RSPortal.exe!7!11/17/2017-14:30:22:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: Could not load Authorization extension, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. ;
RSPortal!reportserverwebapp!RSPortal.exe!7!11/17/2017-14:30:23:: e ERROR: OData exception occurred: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. 
   at Microsoft.ReportingServices.Library.Security.get_AuthorizationExtension()
   at Microsoft.ReportingServices.Library.Security.<>c__DisplayClassd.<GetSystemPermissions>b__b()
   at Microsoft.ReportingServices.Diagnostics.ExtensionBoundary.Invoke(Method m)
   at Microsoft.ReportingServices.Library.Security.GetSystemPermissions()
   at Microsoft.ReportingServices.Library.GetSystemPermissionsAction.PerformActionNow()
   at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute()
   at Microsoft.ReportingServices.Portal.Repositories.SystemService.GetAllowedSystemActions(IPrincipal userPrincipal)
   at Microsoft.ReportingServices.Portal.ODataWebApi.V2.Controllers.UnboundFunctionController.ServiceState()
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext(). | RequestID = s_407cc314-12e8-4449-b080-3ed81b84826c

I am positive that I have not made any mistakes in the configuration and the code is unchanged.

sample database code issue

this sample has code that grants permsssions to 'NT AUTHORITY\NETWORK SERVICE'

but on a windows 10 developer pc that is not the account that the reporting services uses so the database can not be opened.
readme and sample code should discus what account is used and how to handle the virtual service accounts used by sql server 2016

Not redirect long inactive user to logon.aspx

Hello.
If the user is inactive for longer than specified in the parameter and then try click on the report of folder it does not redirect to logon.aspx. Portal try load logon.aspx with XMLHTTPRequest into current page.

Anonymous logon exception when creating new data source, uploading file, etc

Custom security extension implemented as instructed in readme and is "working". I am able to login and create folders with the admin account entered in the config file and registered into DB. When I attempt to create a new data source; the following error shows up in the log file:

ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: , Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: The Authentication Extension threw an unexpected exception or returned a value that is not valid: . ---> System.NullReferenceException: Anonymous logon is not configured. userIdentity should not be null!
   at Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationExtension.GetUserInfo(IIdentity& userIdentity, IntPtr& userId)
   at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
   --- End of inner exception stack trace ---;

For reference; exception is thrown from this code:

public void GetUserInfo(out IIdentity userIdentity, out IntPtr userId)
       {
           // If the current user identity is not null,
           // set the userIdentity parameter to that of the current user 
           if (HttpContext.Current != null
                 && HttpContext.Current.User != null)
           {
               userIdentity = HttpContext.Current.User.Identity;
           }
           else
           // The current user identity is null. This happens when the user attempts an anonymous logon.
           // Although it is ok to return userIdentity as a null reference, it is best to throw an appropriate
           // exception for debugging purposes.
           // To configure for anonymous logon, return a Gener
           {
               //System.Diagnostics.Debug.Assert(false, "Warning: userIdentity is null! Modify your code if you wish to support anonymous logon.");
               throw new NullReferenceException("Anonymous logon is not configured. userIdentity should not be null!");
           }
           // initialize a pointer to the current user id to zero
           userId = IntPtr.Zero;
       }

My understanding is that we have already logged in and authenticated and thus should NOT have an anonymous logon situation. I am not sure I want to modify the code to "handle" anonymous access -- as everyone should be authenticated; especially those creating/modifying report objects. If it matters; this is to provide external reporting through a custom web application.

I have replicated the same issue in a development VM running Windows 10; but the server details are below.

  • Windows Server 2016 Standard
  • SQL Server Standard v13.0.1601.5, Default Instance. Running under Network Service account.
  • SSRS configured for HTTPS

SQL Connect issue

Every attempt to register a user gets this error:

An error occurred while attempting to add the account. Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I've tried many configurations. Also downloaded the project afresh and started over. Also changed the connection string in the sample application to use a specific SQL user account which has necessary permissions. And every time the login page returns the above. Also added specific user and PowerBiReportServer account to the table and stored procedure. Also successfully set up on Server 2012 machine. This server is Server 2016 and same settings don't seem to produce same result.

StackOverflow users suggest changing the trust settings of the application but as this is a class library application it doesn't have those settings at least not in the usual location.

Any suggestions? Thanks in advance.

tool bar, and undesired area

I am on the latest preview 10/4/2016, installed in my project Visual Studio 2015, I have NuGet the latest preview and installed into the GAC of SQL Server 2016(backing up the older files first as this is a preview)

I also previous to all of this installed SQL2016 cumulative update 2

chrome gives me this error

/Reserved.ReportViewerWebControl.axd?OpType=BackImag…1.5&Color=%23ECE9D8&Name=Microsoft.Reporting.WebForms.Icons.toolbar_bk.png Failed to load resource: the server responded with a status of 404 (Not Found)

Also i get an undesired area

http://i.stack.imgur.com/7aG0D.png

This is my only issue left is this undesired area. Here is my code.

'<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DKNYWeb.Default" %>

'<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

    '<!DOCTYPE html>

     html xmlns="http://www.w3.org/1999/xhtml"
     head runat="server"
      meta http-equiv="X-UA-Compatible" content="IE=edge" 
      title title
      /head
      body
       form id="form2" runat="server"
        asp:ScriptManager ID="ScriptManager1" runat="server"

        asp:ScriptManager
                 rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote" Width="100%" <!--if i do not put Width the report parameter area is very very small-->
                ServerReport ReportPath="/Reports_2016Prod/DatacaptureReport_DKO_Revised_V2" ReportServerUrl="http://sql2016a.intranet.com/ReportServer_SQL2016" /
                /rsweb:ReportViewer
         form
        body
        html'

the web.config is verbatim on this site. I also have the most updated AjaxControlTookit possible

Add image to login page from URL (without SSL warning)?

I modified the login page to make it pretty with a background image via URL. I tried placing my background image in ReportServer folder(s) but no relative path seems to get it picked up. So I had to serve this image from IIS on same domain, but the non-SSL port 80 site as the port 443 SSL is bound to ReportServer_PBI . Regardless of where I put the image, the user receives an "insecure" warning because the image is not coming from the SSL port 443 PBI SRS site.

Is there an URL that will do that on the SRS PBI?

Thank you,

far to many dependancies on windows users and ad auth

SSRS needs some re-working to make it work with modern auth systems that are not based on a windows user account or asking the user for a password. Oauth, Open ID connect, JSON Web Tokens need to be pluggable to SSRS.

Unable to connect to SQL Server

When i click register user got below error:

An error occurred while attempting to add the account. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) SQL Server Reporting Services Sample

Changed in App.Config; build and copied latest dll and pdb files
Named pipes is enabled;
Server Name: xyz\sql2016

Server=xyz\SQL2016; Integrated Security=SSPI;database=UserAccounts

Its on same Server.

In CustomSecuritySample2016

In CustomSecuritySample2016
Step 3.
If I followed this
default

I can only use one user
And How can I dynamic UserName ??
And How can I more UserName ??

IIS Redirect and URL rewrite to this SRS possible - from SSL site?

I've tried unsuccessfully to implement an IIS "front-end" site to SRS when in forms auth mode. The goal is to have a site which authenticates using Oauth2 (Azure AD) and then hands the authenticated user through to this sample. Two layers of security.

So I installed URL Rewrite 2.1 and HTTP Redirect. No combination of their features with SRS seems to accomplish the goal.

I want traffic to continue to route through to SRS on another IP address. I have SSL Offloading enabled, and also have tried without. Each time the session gets handed off from IIS the best I can do is get the user to SRS on an internal IP - but not on a public IP with SSL.

Happy to explain further if this is not clear. Is there something inherent to SRS (maybe that it's not an IIS site) which will forever prevent my objective?

Thanks in advance.

Works with mobile reports?

I configured an SSRS 2016 instance using the custom auth extension as described here; however, when I try to view datasets using the report portal, the portal throws the "misconfigured" exception as described here:
https://connect.microsoft.com/SQLServer/feedback/details/3118953/cannot-load-dataset-data-in-report-portal-with-custom-security-extensions-for-report-services-2016

Further, I cannot load mobile reports that have been configured to use the datasets, as described here:
https://connect.microsoft.com/SQLServer/feedback/details/3118953/cannot-load-dataset-data-in-report-portal-with-custom-security-extensions-for-report-services-2016

Have you had a chance to test the custom security using mobile reports?

Thanks!

Question for soap access

I am able to customized the project "CustomSecuritySample2016" that use Postgres DB for verifying username and password. And I can login to the SSRS on the login page.

Now I need to communicate to the SSRS from a JAVA application with the use of SOAP. And I have the following exception. Is it caused by the custom authentication?

com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 500: Server Error
	at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.createResponsePacket(HttpTransportPipe.java:266)
	at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:217)
	at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:130)
	at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:95)
	at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:1121)
	at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:1035)
	at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:1004)
	at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:862)
	at com.sun.xml.internal.ws.client.Stub.process(Stub.java:448)
	at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:178)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:93)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
	at com.sun.proxy.$Proxy215.getPermissions(Unknown Source)

Any Samples for SQL 2014

I am trying to implement custom forms authentication with SSRS 2014, but I can't find any samples.

OWIN cookie

Hi,
I've used this sample successfully in the past when consuming a forms authentication cookie. I'm trying to do the same thing, but consume a cookie that is generated by an app using OWIN middleware. I've tried to add an OWIN startup class but the code is never called. Do you know if what I'm trying to achieve is possible?

Nuget package library for interaction with SSRS Rest API not available

Please provide a nuget package for easy install SSRS Rest API interactions.

Right now the only option is Swagger.

But when using Swagger, how to keep library updated as Microsoft improves the swagger library?

In nuget you get package update notifications?

This requires setting up a whole big .NET project and compiling in our 100 applications by adding reference to that project.

Would be easier if just in package.config and it automatically restores on checkout.

Custom authentication extension issue

I seem to be having an issue with my custom extension after following the sample. The issue is that I can log into the report server but get an error 500: unable to validate data, when I try and view the portal (localhost/reports). I have include my config files in case i made a mistake within.

Logs and configs.zip

Instructions for adding MachineKey conflict with gen tool regarding casing

Here are the instructions for creating a machine key (as of 2017-08-31). The generator link produces lowercased attributes which are warned against in the text "Check the casing of the attributes, it should be Pascal Casing...."

Step 4: Generate Machine Keys

Using Forms authentication requires that all report server processes can access the authentication cookie. This involves configuring a machine key and decryption algorithm - a familiar step for those who had previously setup SSRS to work in scale-out environments.

Generate and add under in your RSReportServer.config file.

Check the casing of the attributes, it should be Pascal Casing as the example above

There is not need for a <system.web> entry

You should use a validation key specific for you deployment, there are several tools to generate the keys such as Internet Information Services Manager (IIS) and http://www.a2zmenu.com/utility/machine-key-generator.aspx.

After Logon on using custom security got below error

The service is not available.

The report server isn’t configured properly. Contact your system administrator to resolve the issue. System administrators: The report server can’t access or use the encryption key. You might need to add the server to the scale-out group, reimport encrypted content, or delete all encrypted content and generate a new encryption key.

Error on entering username/pwd on logon.aspx

I was able to land on logon.aspx page; which contains below interface
User Name : TextBox
Password: TextBox
Button for Register User
Button for Logon User
When i click on either button i end up with below error
'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

After set up, a new user gets RsAccessDenied - what am I missing?

Hi - I set up SRS FormsAuth on 2016 Enterprise and followed all instruction. When a new user registers by clicking RegisterUser that user is visible in the [UserAccounts].[dbo].[Users] table. So database connection is working. But then if the user attempts to log in they receive RsAccessDenied - this shows in the ReportServer\log files.

So I set up Power BI ReportServer. This produced the same result. I was clever enough to update the paths to Reflect install location or PowerBI ReportServer.

I've spent a lot of time on this. Same results or total breakage each time. I suspected a role issue, but once the reportserver is in FormsAuthentication mode I can't create roles as I can't connect. In SQL Management Studio 17.2 I was once able to connect to the ReportServer using the user I registered but that user had no privileges.

What am I missing? Thank in advance.

SSRS 2106 Custom authentication extension - sqlAuthCookie issue

HELLO :

We are following the instructions to implement a custom authentication provider for ssrs 2016 from the ssrs 2016 online doc and the sample application works fine.

https://github.com/Microsoft/Reporting-Services/tree/master/CustomSecuritySample

We have a created a ASP.NET HttpHandler and deployed in IIS and we are using the ReportService2010.asmx reporting service. We are doing this because we are injecting some custom JavaScript and css to meet some business requirements.

In the handlers ProcessRequest method we are making a Web request to the URL “http://xxxx/ ReportServer/logon.aspx?ReturnUrl=http://xxxx/Reports” and the custom login page is displayed.

In the custom Logon.aspx.cs under “ServerBtnLogon_Click” event we are not calling the FormsAutherntication.RedirectFromLoginPage method rather simply returning back to the handler, this response contains the “sqlAuthCookie”

After getting the response we are creating a new request and adding this “sqlAuthCookie” into the request object and making a new web request to this url “http://xxxx/Reports/browse”. The domain name doesn't contain any underscore.

We are getting the following error “e ERROR: [3je9vl7o]: XSRF Failed (NonceCookieNotFound)”.

Any help in this regard is really appreciated.

Only the built-in admin account or username-specific ACLs work to show the "Manage" option

I wanted first to THANK those that created and maintain this very helpful codebase. I have a working SSRS 2016 instance using the code, modified to point to my own custom user store database. I started with a clean ReportServer database with only the needed elements to test my feature.

I have also written a simple way to manage GROUPS so that I don't have to manage individual people in the SSRS ACLs but instead can assign permissions to "Accounting". My custom DB returns a list of groups matching the principalUser and then compares that to the ACL list. All good. My group settings are correctly controlling the folders and access.

However, I cannot see the "Manage" options on either a Folder or a report (clicking the "..." to show the popup of options) using the group setting. This ONLY works under the following conditions:
• I'm logged in as the special admin user who bypasses the CheckAccess() methods
• I have an ACL that specifies the exact username (vs. the group name e.g. "Accounting")

When comparing the activity for an ACL set with a specific username vs an ACL set with a group, I see that, when clicking the "..." on a report, CheckAccess() is called the same # of times and they both return true. And neither of them return false for any of the CheckAccess(). But only the use case where the ACL includes the exact username does it show the Manage options.

Is it possible that this project is omitting one of the signatures for CheckAccess() that is used to show the "Manage" option? I see 10 CheckAccess(), which matches the IAuthorizationExtension, so maybe not.

Any thoughts? Has anyone implemented group-based custom auth?

Custom Authentication for SSRS2017

Hi, I'm trying to configure a Custom Authentication for SSRS 2017. I followed the instructions on this sample for SSRS 2016. However It seem that it just doesn't work for SSRS 2017, this is the error it get when try to authenticate the user on Web Portal:

Microsoft SQL Server Reporting Services Version 14.0.600.451
en-US
Pacific Standard Time
C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles\RSPortal_2018_03_02_19_30_05.log
[MY_COMPUTER_NAME]
Microsoft Windows NT 6.2.9200.0
6.2.9200.0

RSPortal!reportserverwebapp!RSPortal.exe!1!03/02/2018-19:30:05:: i INFO: Starting ReportServerWebApp RSPortal!reportserverwebapp!RSPortal.exe!1!03/02/2018-19:30:05:: i INFO: Working directory : C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\Portal RSPortal!reportserverwebapp!RSPortal.exe!1!03/02/2018-19:30:05:: i INFO: Report Server url: http://[MY_COMPUTER_NAME]/ReportServer_SSRS RSPortal!reportserverwebapp!RSPortal.exe!1!03/02/2018-19:30:05:: i INFO: Report Server Web App virtual root: /Reports_SSRS RSPortal!reportserverwebapp!RSPortal.exe!1!03/02/2018-19:30:05:: i INFO: Web app url: http://+:80/Reports_SSRS/ RSPortal!reportserverwebapp!RSPortal.exe!1!03/02/2018-19:30:05:: i INFO: Authentication scheme(s): Anonymous RSPortal!crypto!RSPortal.exe!1!03/02/2018-19:30:07:: i INFO: Initializing crypto as user: NT SERVICE\SQLServerReportingServices RSPortal!crypto!RSPortal.exe!1!03/02/2018-19:30:07:: i INFO: Exporting public key RSPortal!crypto!RSPortal.exe!1!03/02/2018-19:30:07:: i INFO: Importing existing encryption key RSPortal!reportserverwebapp!RSPortal.exe!3!03/02/2018-19:30:12:: i INFO: Received request GET | RequestID = s_3c7ba74e-99bb-41cc-979c-6b482fb3e390 RSPortal!reportserverwebapp!RSPortal.exe!3!03/02/2018-19:30:12:: e ERROR: fe80::1c94:e697:e660:78b3%12: GET - 0:00:00.0548553 Exception: System.Web.HttpException (0x80004005): Unable to validate data. at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData) at System.Web.Security.FormsAuthentication.Decrypt(String encryptedTicket) at Microsoft.BIServer.Owin.Common.Middleware.CustomAuthenticationMiddleware.CreateRequestContextFromCookie(IOwinContext context) 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.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.BIServer.Owin.Common.Middleware.RequestLoggingMiddleWare.d__2.MoveNext() | RequestID = s_3c7ba74e-99bb-41cc-979c-6b482fb3e390

Any help would be appreciated.

CustomSecuritySample: Still Windows authentication after changes

I'm rather sure I have missed something but cannot figure it out and I have followed the guide step by step. The main difference is that I have SQL2016 as instance name but otherwise nothing special.

Expected result

I expected that after a restart of the services a logon screen should be provided when entering http://computername/Reports in the browser. But instead I still get an Windows authentication prompt. I think that I miss some final steps in the guide that needs to be done to make it work but cannot figure out what

Setup

Instance name: SQL2016
URL set in Reporting Services Configuration Manager: http://computername/Reports

Configuration steps taken

The following changes have been made where I followed the README:

RSReportServer.config:

Set AuthenticationTypes to Custom:

<AuthenticationTypes>
  <Custom/>
</AuthenticationTypes>

Replaced UI with new data:

<UI>
  <CustomAuthenticationUI>
    <loginUrl>/Pages/UILogon.aspx</loginUrl>
    <UseSSL>False</UseSSL>
    <PassThroughCookies>
      <PassThroughCookie>sqlAuthCookie</PassThroughCookie>
    </PassThroughCookies>
  </CustomAuthenticationUI>
  <ReportServerUrl>http://computername/Reports</ReportServerUrl>
  <PageCountMode>Estimate</PageCountMode>
</UI>

Replaced Security extension information with:

<Extension Name="Forms" 
  Type="Microsoft.Samples.ReportingServices.CustomSecurity.Authorization, Microsoft.Samples.ReportingServices.CustomSecurity" >
  <Configuration>
    <AdminConfiguration>
      <UserName>username</UserName>
    </AdminConfiguration>
  </Configuration>
</Extension>

Replaced Authentication extension with:

<Extension Name="Forms" Type="Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationExtension,Microsoft.Samples.ReportingServices.CustomSecurity" />

RSSrvPolicy.config:

Added a new code group:

<CodeGroup
  class="UnionCodeGroup"
  version="1"
  Name="SecurityExtensionCodeGroup"
  Description="Code group for the sample security extension"
  PermissionSetName="FullTrust">
  <IMembershipCondition
    class="UrlMembershipCondition"
    version="1"
    Url="C:\Program Files\Microsoft SQL Server\MSRS13.SQL2016\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"/>
</CodeGroup>

Web.config:

Added under system.web:

<machineKey validationKey="GENERATED_VALIDATION_KEY" decryptionKey="GENERATED_DECRYPTION_KEY" validation="AES" decryption="AES" />

Changed authentication mode from Windows to Forms and added authorization and identity impersonation:

<authentication mode="Forms">
      <forms loginUrl="logon.aspx" name="sqlAuthCookie" timeout="60" path="/"></forms>
</authentication>
<authorization>
  <deny users="?" />
</authorization>
<identity impersonate="false" />

RSWebApp/Microsoft.ReportingServices.Portal.WebHost.exe.config:

Added the same validation and decryption key as in Web.config for Reporting services

<system.web>
  <machineKey validationKey="GENERATED_VALIDATION_KEY" decryptionKey="GENERATED_DECRYPTION_KEY" validation="AES" decryption="AES" />
</system.web>

Copy files to right places

C:\Program Files\Microsoft SQL Server\MSRS13.SQL2016\Reporting Services\RSWebApp:

  • Copy Microsoft.ReportingServices.Portal.WebHost.exe.config

C:\Program Files\Microsoft SQL Server\MSRS13.SQL2016\Reporting Services\ReportServer:

  1. Copy the other three config files mentioned above
  2. Copy Login.aspx and .cs
  3. Copy Microsoft.Samples.ReportingServices.CustomSecurity.dll into /bin

Error while building the solution

I followed all the steps until this section from this link, but I tried to build the solution following the step Step 2: Building the Sample
I run into two errors:

Error CS0246 The type or namespace name 'IAuthenticationExtension2' could not be found (are you missing a using directive or an assembly reference?) CustomSecurity C:\TEMP\CustomSecuritySample2016\AuthenticationExtension.cs 35 Active

Error CS0246 The type or namespace name 'IRSRequestContext' could not be found (are you missing a using directive or an assembly reference?) CustomSecurity C:\TEMP\CustomSecuritySample2016\AuthenticationExtension.cs 112 Active

Can you help?
Thanks,
Rachida
2017-08-02_8-21-12

Web Portal not working

Hello,

The configurations and custom security is working properly for the Web Service, however, when using the Web Portal URL it throws an error. I'm using SQL Server Power BI Server.

How to build if SSRS is not in the default location?

Hi there, working my way through the setup (i'm not a coder) and my SSRS install isn't in the default install location as I installed it after installing SQL server. How can I change the default location in the solution to this location? Thanks.

Getting Error while trying to consume Reporting Service and getting list of Reports

Hi Tarquino,
I encountered a issue while I am trying to get list of all reports by creating object of Reporting Service proxy class. I had successfully implemented Custom Authentication. When I login from Browser, I can run all reports there but my requirement is to show a Treeview with all Reports Name (URL). When someone clicks of it, it will open the report in new tab. If I do so using Windows Authentication, everything works fine but when trying same with Custom/Forms Authentication I am getting error as attached below.
img_pwynzd

In my Logon.aspx page, If I write userIdentity = new GenericIdentity(WindowsIdentity.GetCurrent().Name); then it gives error User "" don't have permissions to view this. If I comment it, then It gives attached error. Can you shed some light on this?

Thanks,
Sameer

_public void GetUserInfo(out IIdentity userIdentity, out IntPtr userId)
{
// If the current user identity is not null,
// set the userIdentity parameter to that of the current user
if (HttpContext.Current != null
&& HttpContext.Current.User != null)
{
userIdentity = HttpContext.Current.User.Identity;
}
else
// The current user identity is null. This happens when the user attempts an anonymous logon.
// Although it is ok to return userIdentity as a null reference, it is best to throw an appropriate
// exception for debugging purposes.
// To configure for anonymous logon, return a Gener
{
//default the userIdentity
userIdentity = new GenericIdentity(WindowsIdentity.GetCurrent().Name);
//System.Diagnostics.Debug.Assert(false, "Warning: userIdentity is null! Modify your code if you wish to support anonymous logon.");
// throw new NullReferenceException("Anonymous logon is not configured. userIdentity should not be null!");
}

       // initialize a pointer to the current user id to zero
       userId = IntPtr.Zero;
   }_

Problem with permissions after signing in via Custom Auth extension

Hi, I followed the instructions for developing the code and deploying. I was able to login as expected, the only problem now is that I get a permissions error (rsAccessDenied) after I login

image

Any ideas how I set roles for my user stored in the "Users" table so I can get logged in and see my reports?

Load the login page

Hello,
I am trying to load the login page in my development machine (in Visual Studio 2015). But I just don't know how to do it.
Thanks,
Rachida

MachineKey instructions for PowerBI ReportServer

The instructions for adding the MachineKey reference items that do not exist in the PowerBI Report Server installation.

It seems possible, if unlikely, that the user should add the MachineKey to the ReportServer install AND to the applicable or available files in the PowerBI ReportServer Install.

It may be that PowerBI ReportServer Install differences should be highlighted in the instructions in some way.

Thank you,

SSRS API in C# not working

I have been trying to access the list of items available in folder using SSRS API provided in the below link
https://app.swaggerhub.com/apis/microsoft-rs/SSRS/2.0#/CatalogItems/GetCatalogItemContent

It works in Postman using NTLM Authentication but if i use the restsharp generated code in application it's says bad request. Below is the sample code snippet.

var client = new RestClient("https://xyz.com/Reports/api/v2.0/Folders");
var request = new RestRequest(Method.GET);
request.AddHeader("Postman-Token", "34c264d7-c5dd-4627-83c3-3ab0c9bd34d6");
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Authorization", "NTLM TlRMTVasdsdasdAAAGAAYAIoAAAAYABgAogAAAAAAAABIAAAAQgBCAEgAAAAAAAAAigAAAAAAAAC6AAAABYKIogUBKAoAAAAPYQBuAHUALgBuAGEAdABhAHIAYQBqAGEAbgBAAG0AYQBuAGQAcwBjAG8AbgBzAHUAbAB0AGkAbgBnAC4AYwBvAG0AjNGwxwPlD50AAAAAAAAAAAAAAAAAAAAACK3AYrd3VdOkQQxatGwQi2u3HRk6kexp");
IRestResponse response = client.Execute(request);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.