cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report 2020 runtime (SP32) for .NET framework: Forms authentication failed for the request.

joseph_wong_hkbn
Explorer
0 Kudos

I was using Crystal Report 2020 runtime (SP31) for .NET framework in ASP .NET application to export crystal report to PDF and view crystal report in crystal report web viewer.

But after I installed Crystal Report 2020 runtime (SP32), everytime export crystal report to PDF or view crystal report in crystal report web viewer, my web session was lost and needed to login the application again. The following error was captured in Windows application event log:

Event code: 4005

Event message: Forms authentication failed for the request. Reason: The ticket supplied was invalid.

Event time: 15/10/2022 08:33:06

Event time (UTC): 15/10/2022 00:33:06

Event ID: cc7f8d41a6ae4604a1c56c46b3658353

Event sequence: 2

Event occurrence: 1

Event detail code: 50201

Application information:

Application domain: /LM/W3SVC/1/ROOT-1-133102675840717869

Trust level: Full

Application Virtual Path: /

Application Path: D:\Web_Apps\

Machine name: HKG999APS99

Process information:

Process ID: 4712

Process name: w3wp.exe

Account name: DOMAIN\AppUser

Request information:

Request URL: http://HKG999APS99/Admin/LSRPTRST.aspx

Request path: /Admin/LSRPTRST.aspx

User host address: 192.168.220.210

User:

Is authenticated: False

Authentication Type:

Thread account name: DOMAIN\AppUser

joseph_wong_hkbn
Explorer
0 Kudos

Anyone can help?

DellSC
Active Contributor
0 Kudos

I changed the tag on your question to "SAP Crystal Reports, version for Visual Studio" which is the correct tag for questions about using the .NET SDK. The "SAP Crystal Reports" tag is for questions about general report design or using the Crystal Reports desktop software.

-Dell

Accepted Solutions (1)

Accepted Solutions (1)

joseph_wong_hkbn
Explorer
0 Kudos

After reinstalling the whole OS windows and run the same set of programs with Crytal Report Runtime SP32, no error now.

Answers (6)

Answers (6)

Did you rebuild your application using SP 32 and redeploy?

Changes in SP's always require rebuilding....

See my blog to help upgrade:

https://blogs.sap.com/2020/10/30/upgrading-a-visual-studio-2008-2019-.net-project-with-the-latest-cr...

And you MUST set all CR runtime Copy Local to FALSE, likely cause is you are mixing versions.

joseph_wong_hkbn
Explorer
0 Kudos

Thanks William.

The application is ASP .net website, so no need to rebuild. Any other clues?

0 Kudos

Does your app use PostBack to keep the session in scope?

Use Google and search for this KBA:

1215387 - Clicking next page button on Web Forms Viewer returns empty page in VS .NET

0 Kudos

SP 32 now loads the assemblies from C:\Windows\Microsoft.NET\assembly\GAC_MSIL

Something MS changed so we moved them there.

Did you browse to the assemblies or add them from the Extensions tree?

Blog explains this, and be sure to set Copy Local to false and delete any CR dll's from your \bin folder

joseph_wong_hkbn
Explorer
0 Kudos

>> SP 32 now loads the assemblies from C:\Windows\Microsoft.NET\assembly\GAC_MSIL

I also expect loads from GAC_MSIL, however, process monitor shows it firstly tried to load from GAC_32, but it didn't try to find in GAC_MSIL when not found in GAC_32

>> Did you browse to the assemblies or add them from the Extensions tree?

Extension tree

>> Blog explains this, and be sure to set Copy Local to false and delete any CR dll's from your \bin folder

Set to false

0 Kudos

Set Copy local to false, all explained in the Blog when upgrading.

Don't browse to the assemblies, always add them from the Exensions tree.

https://blogs.sap.com/2020/10/30/upgrading-a-visual-studio-2008-2019-.net-project-with-the-latest-cr.../

joseph_wong_hkbn
Explorer
0 Kudos

Followed but the error is the same failed.

I used process monitor to monitor crystal report library loaded in IIS server machine, if using SP31, system load crystal report libraries from assembly\GAC_MSIL\Crystal* that is no issue because crystal report libraries actually are there. However, if using SP32, system does not try to load the crystal report libraries from assembly\GAC_MSIL\Crystal*, instead it load them from assembly\GAC_32\Crystal*, and cause path not fould error. How to make it to load them from assembly\GAC_MSIL\Crystal* when using SP32?

0 Kudos

Yes there is a need to rebuilt it, Set all CR Assemblies Copy Local to false, clear the \bin folder and rebuild the project and deploy.

joseph_wong_hkbn
Explorer
0 Kudos

I double checked CR assemblies copy local to false, rebuilded, and also clear Temporary ASP .NET folder to force it to recompile pages. However, the same error occurs.

Any idea?

Thanks

joseph_wong_hkbn
Explorer
0 Kudos

I started File Monitor and captured there were some PATH NOT FOUND errors as below (Machine1). Then I used the same set of programs and Crystal Runtime (SP32) on another machine (Machine2), there was no error.

Why Machine1 had such error?

DellSC
Active Contributor
0 Kudos

Please see the sample code that the wiki links to. There are things you need to do in your code to keep the session in scope when you run a report and move from page to page.

-Dell

joseph_wong_hkbn
Explorer
0 Kudos

I mean the application is working fine when using SP31, no session issue.

But after installed SP32, the error occurred