tycomo / ngx-ssrs-reportviewer

Simple Angular report viewer component for SQL Server Reporting Services
MIT License
52 stars 22 forks source link

Authentication : Help wanted #14

Open pateldips opened 5 years ago

pateldips commented 5 years ago

how to retrieve this report through web api? I wanted to put Authentication through web api and rendered it to Angular page/component.

Can you please help me?

AhmedGaberAhmed commented 4 years ago

Did you find any solution to your problem? I am stuck in same issue.

pateldips commented 4 years ago

No. I moved to different direction. We are using SSRS internally so no issue on accessing it, if request comes from client then user WebAPI and render the report as PDF then show it. I used URL access for it. below is the link for it.

https://docs.microsoft.com/en-us/sql/reporting-services/url-access-ssrs?view=sql-server-ver15

AhmedGaberAhmed commented 4 years ago

reportServer: string = 'static ip/reportserver'; reportUrl: string = 'report path'; what ur meaning

JohnrFinney commented 4 years ago

Morning Ahmed,

I apologise for the late response. We did find a solution.

What specific issue are you having and what is it you want to do?

Regards John.


From: AhmedGaberAhmed notifications@github.com Sent: 29 May 2020 12:32 To: tycomo/ngx-ssrs-reportviewer ngx-ssrs-reportviewer@noreply.github.com Cc: JohnrFinney john.r.finney@hotmail.com; Manual manual@noreply.github.com Subject: Re: [tycomo/ngx-ssrs-reportviewer] Authentication : Help wanted (#14)

Did you find any solution to your problem? I am stuck in same issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/tycomo/ngx-ssrs-reportviewer/issues/14#issuecomment-635923585, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANJJZQMH5XS57HQOCZSTHQLRT6MN3ANCNFSM4HWURPUA.

AhmedGaberAhmed commented 4 years ago

Goodnight JohnrFinney when open my report appear alert to enter username and password what is Attributes for ssrs-reportviewer to pass username and password for ssrs or any way to exceed this alert

Regards Ahmed

JohnrFinney commented 4 years ago

Hi Ahmed,

What do you want to do with the reports? Do you want other users to see reports on the report web site? Do you want to get programmatic access to the reports and send it to users through an API?

Regards John.


From: AhmedGaberAhmed notifications@github.com Sent: 30 May 2020 18:55 To: tycomo/ngx-ssrs-reportviewer ngx-ssrs-reportviewer@noreply.github.com Cc: JohnrFinney john.r.finney@hotmail.com; Manual manual@noreply.github.com Subject: Re: [tycomo/ngx-ssrs-reportviewer] Authentication : Help wanted (#14)

Good night JohnrFinney when open my report appear alert to enter username and password what is Attributes for ssrs-reportviewer to pass username and password for ssrs or any way to exceed this alert

Regards Ahmed

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/tycomo/ngx-ssrs-reportviewer/issues/14#issuecomment-636363756, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANJJZQO76757E6JS3XQ35OTRUFCAZANCNFSM4HWURPUA.

AhmedGaberAhmed commented 4 years ago

hi JohnrFinney i used this Attributes [reportserver]="reportServer" [reporturl]="reportUrl" want to get programmatic access to the reports , when run with angular appear alert to enter username and password what is Attributes for ssrs-reportviewer to pass username and password for ssrs or any way to exceed this alert

Regards Ahmed

JohnrFinney commented 4 years ago

Morning Ahmed,

Please excuse the below info as I would rather provide too much than not enough. The way I got this to work is as follows:

Our configuration:

SQL Server 2017 and SSRS 14.0.7116.41940 on a VM "viewable" from within the Azure network from the below, .NET core 3.1 API Angular 7.2 client ("ng2-pdfjs-viewer": "^0.2.29") - azure app service public facing .NET core > 3.1 API - azure app service private and viewable from above client. WCF Service > NET framework 4.6.2 (used to simply import the ReportExecutionService.asmx and render (i.e. svc.Render(...)) a report and return it to the .NET core 3.1 API to stream the byte array to the client/pdfjs viewer control). This service resides on the same VM as the report server (SSRS ).

So above is the architecture and we still use the default NTLM authentication in report server config file so no change there.

Create a new domain user account dedicated as the administrator on the report server and set that account as admin (see below):

[cid:234d5139-88cb-4347-ae5c-033a98492020]

Create WCF service and deploy to same reporting server machine hosted within IIS. Store the credentials for the above reporting server administrator in the WCF service and this will be passed to the report server .asmx when executing.... WCF web.config below: [cid:091d4574-e582-4744-9174-6cdd79e63714]

The code in the WCF service simply executes the report (with optional render format, "PDF", "OPENXMLEXCEL", etc...) and returns the byte array to the .NET core API

[cid:117c8e05-c5b6-451c-a121-4e0ce1626d23]

The .NET core API creates the client and makes the call and passes the result back...

[cid:220fc494-28a7-45b0-9d6b-e9dd4db1f531]

... and the controller passes data back as encoded base64 string

[cid:49681ff8-9206-48c3-9dc0-e557ad054647]

.......and the client renders like below... [cid:582f83a6-c1a4-4e50-ab0c-95013aaa7815]

I hope this helps you Ahmed.

Regards John.


From: AhmedGaberAhmed notifications@github.com Sent: 30 May 2020 20:27 To: tycomo/ngx-ssrs-reportviewer ngx-ssrs-reportviewer@noreply.github.com Cc: JohnrFinney john.r.finney@hotmail.com; Manual manual@noreply.github.com Subject: Re: [tycomo/ngx-ssrs-reportviewer] Authentication : Help wanted (#14)

hi JohnrFinney i used this Attributes [reportserver]="reportServer" [reporturl]="reportUrl" want to get programmatic access to the reports , when run with angular appear alert to enter username and password what is Attributes for ssrs-reportviewer to pass username and password for ssrs or any way to exceed this alert

Regards Ahmed

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/tycomo/ngx-ssrs-reportviewer/issues/14#issuecomment-636373779, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANJJZQNTJFJ2KXDOI2AI2PDRUFMYTANCNFSM4HWURPUA.

AhmedGaberAhmed commented 4 years ago

Morning John, u have complete example demo for that ,please help me Regards Ahmed.

piyushdp333 commented 3 years ago

Hi, I am using ngx-report-viewer in angular so i am facing problem like when i am rendering report from reportServer URL then prompts will opened and it will asking for username and password is there any solution or any parameter passing in URL as a username and password for report view without prompts??

Description: ->I am using SSRS report service and ngx-report-viewer in angular

pateldips commented 3 years ago

I have implemented two different way.

If user is internal user and using the local report server then I asked my network administrator to assign report server link as Local Intranet Site in Internet Options to all users computer.

https://xyz-00173.abcdomain.com

Without this settings it may asks users to enter their windows credentials when they open new session.

if user is external then as JohnrFinney commented on May 31 explained above return PDF through the WebAPI.

brezimenko commented 3 years ago

So, if I understand correctly, there is no way of automatically authenticating with credentials from javascript (like fetching credentials from API and then automatically logging in the user)? That initial authentication call must always prompt the user for password / username?

EDIT: Assuming I want everything else to stay the same, i.e. I don't want to change the server-side of things.

jindovu commented 2 years ago

it to the .NET core 3.1 API to stream the byte array to the client/pdfjs viewer control). This service resides on the same VM as the report server (SSRS ).

I think your solution very good JohnrFinney, so how about if the service deploy render and SSRS reporting is difference? (should we need to verify network credential for that request)

JohnrFinney commented 2 years ago

Apologies for the delay in replying. Look up basic authentication because if it's enabled on the SSRS server, you can use username/password combo from another server (e.g. if the service is on that server); there might be networking policies at play as well so keep that in mind.


From: Jindo Vu @.> Sent: 13 September 2022 03:28 To: tycomo/ngx-ssrs-reportviewer @.> Cc: JohnrFinney @.>; Manual @.> Subject: Re: [tycomo/ngx-ssrs-reportviewer] Authentication : Help wanted (#14)

it to the .NET core 3.1 API to stream the byte array to the client/pdfjs viewer control). This service resides on the same VM as the report server (SSRS ). I think your solution very good JohnrFinney, so how about if the service deploy render and SSRS reporting is difference? (should we need to verify network credential for that request)

— Reply to this email directly, view it on GitHubhttps://github.com/tycomo/ngx-ssrs-reportviewer/issues/14#issuecomment-1244816550, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANJJZQJ3DDBM47NLN4VGO4LV57RDXANCNFSM4HWURPUA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

jindovu commented 2 years ago

Apologies for the delay in replying. Look up basic authentication because if it's enabled on the SSRS server, you can use username/password combo from another server (e.g. if the service is on that server); there might be networking policies at play as well so keep that in mind. ____ From: Jindo Vu @.> Sent: 13 September 2022 03:28 To: tycomo/ngx-ssrs-reportviewer @.> Cc: JohnrFinney @.>; Manual @.> Subject: Re: [tycomo/ngx-ssrs-reportviewer] Authentication : Help wanted (#14) it to the .NET core 3.1 API to stream the byte array to the client/pdfjs viewer control). This service resides on the same VM as the report server (SSRS ). I think your solution very good JohnrFinney, so how about if the service deploy render and SSRS reporting is difference? (should we need to verify network credential for that request) — Reply to this email directly, view it on GitHub<#14 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANJJZQJ3DDBM47NLN4VGO4LV57RDXANCNFSM4HWURPUA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Thanks for your response, I'm very appreciate that