Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to validate data - Error logging into the SSRS Portal #121

Closed
ravipunjwani opened this issue Nov 5, 2018 · 5 comments
Closed

Unable to validate data - Error logging into the SSRS Portal #121

ravipunjwani opened this issue Nov 5, 2018 · 5 comments

Comments

@ravipunjwani
Copy link

Hi guys,
I'm getting an error running the SSRS Portal after configuring CustomAuthentication (as per example provided in the repository) from
Reporting Services Custom Security Sample for Power BI Report Server and SQL Reporting Services 2017

The issue is regarding MachineKey as seen from the error logs. I'm following all the instructions given in the above sample but still no luck yet.

I'm running the SSRS 2017 on my Dev PC (Win 10 Pro).

The custom login works well (Register and Login) for the report server at: http://localhost/ReportServer_SSRS, but the portal (http://localhost/Reports) doesn't work after Login. It returns the 500 Internal Error message. Stack trace is given below:

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.<Invoke>d__0.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_562e4f17-7d98-45e0-b744-02509f01e0d8 

RsReportServer.config file is attached here for reference
rsreportserver.config.txt

Please suggest if there's anything wrong in the configuration, or I'm missing out on something. Or probably a bug in the operating environment?

Thanks in advance!

@manceelee
Copy link

having the same error when i do the scale out deployment
first, stop the server, check your machine key, the length of your machine key is very different from mine, please generate a new set from IIS and try again
If you still have the issue, goto encryption keys, backup the keys and delete encrypted content. try to use ravi.punjwani to login and create other users afterward.

@ravipunjwani
Copy link
Author

Thanks @manceelee for suggestion.

It actually worked by adding the following into rsportal.exe.config

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

I guess it should have imported the machine key from the reporting service instead of getting from own configuration file.

@TestO2015
Copy link

TestO2015 commented Nov 9, 2022

I'm facing the same error exactly however I can't get it to work by adding the machineKey to rsportal.exe.config or deleting encrypted content in the report server configuration manager. Any suggestions?

@n1LWeb
Copy link

n1LWeb commented Nov 9, 2022

The same is happening here. If I add the machine Key in rsportal.exe.config it is removed on startup.

@TestO2015
Copy link

TestO2015 commented Nov 10, 2022

Hi @n1LWeb, have you added your machineKey to rsReportServer.config under <configuration>?

Also make sure it's in the correct format otherwise it get's wiped for me.

<MachineKey ValidationKey="BE4663BB11C14E8C7C1DB0A48022D517CB668C65A46174B0C4CFF4D9B7CE2498EA998C4E5A8C15EE5262D5C297479349B2A9783700AB3C1C891B914D12691A0D" DecryptionKey="7121FD4D52F0035DBBB113B9E449ED4467CA01DDD26684FF" Validation="SHA1" Decryption="AES"/>

After this restart the Report Server and it should sync the machineKey to rsportal.exe.config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants