August 26, 2023 at 9:34 am
Hi, I am upgrading SSRS 2014 to 2019 and custom form based authentication is implemented with SSRS 2014. I followed the steps https://github.com/microsoft/Reporting-Services/tree/master/CustomSecuritySample and implemented same for SSRS 2019. While Web Service URL works fine but while accessing Web Portal URL I am getting below error and the web page displays.
The service is not available.
An error occurred when invoking the authorization extension.
2023-08-26 02:48:02.5358|ERROR|42|OData exception occurred: Microsoft.ReportingServices.Diagnostics.Utilities.AuthorizationExtensionException: An error occurred when invoking the authorization extension. ---> System.NullReferenceException: Object reference not set to an instance of an object..| RequestID = s_d7104fbd-eb4b-4863-a453-788ed6c5760f
Any help would be appreciated.
August 27, 2023 at 10:10 am
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
September 1, 2023 at 8:14 pm
Reading the notes on the link you provided, it sounds like things changed with custom authentication in 2017 in that it no longer relies on the ASP.NET stuff and now relies on IRSRequestContext. I imagine that would require a pretty good rewrite/refactor of how you did it in 2014.
My guess on what you are doing is taking the 2014 code you have and trying to modify it to work with 2019. If so, there isn't much anyone here can do to help without seeing all of your code. Since you are getting a null object exception, you will need to do some digging to determine what object is null at that point in the application, and address it appropriately. MAYBE it is expected to be null and you just need to handle it better (try/catch block), or maybe it shouldn't be null and you need to check for that before doing any operations on it and handle the null scenario first.
That being said, I have never set up custom authentication before - I always use AD authentication. I've not found a need for any other forms of authentication. BUT I have done C# development and am aware of what a null object exception is and what causes it - you are performing an operation on an object that is null.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
September 2, 2023 at 7:40 am
Thanks Brian!
You prediction about migrating from the 2014 to 2019 and using same asp.net code is correct. I did implemented the new method as per of IAithenticationExtension2 but it was now working. Long story short, I manage to debug the code and identified that httpcontext.current.user is null for web portal with ssrs 2019 and therefore exception was thrown. I changed the logic to use username which is available with public method and code works fine.
thanks for your reply.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply