Description: An
unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Access is denied.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
You for sure have Crystal Reports installed on your web server? If so, is it possible that the account your app is using doesn't have the correct permissions to the folder on your web server where the report is stored?
Description: An
error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 14: <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 15: <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
Line 16: <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
Line 17: <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 18: <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
Right click the Microsoft.ReportViewer.Common reference in solution explorer and set copyLocal=true. This will make sure that this dll is copied when the project is built succesfully. If this resolves your error, ideal thing to do would be finding out why
it is missing on the web server. If you do not want to opt for this trial-and-error approach, try installing Microsoft Report Viewer runtime on the webserver.
But, version number is 11.0.3412.0. So, you have to make sure that you install this one on your local machine as well and update the reference to the latest one.
Microsoft Report Viewer Runtime installed after downloading it from your link.
Solved the problem with the web.config making copyLocal= true (I though the dll was already copied... silly me).
The real problem still there:
Server Error in '/' Application.
Unknown error 0x80040200
Description: An
unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Member
1 Points
11 Posts
Crystal Reports and Visual Studio when deploying
Apr 03, 2014 03:57 PM|palmanal|LINK
Hello,
I´ve been searching for this problem for a while with no luck. I've already tried many things.
The thing is that I'm not able to make work any report when deploying (Windows Server 2012). Everything works fine when I try on my local machine.
I have Visual Studio 2012 and I've installed CRforVS_13_0_8.
This is my code:
ReportDocument myCrystalReport;
myCrystalReport = new ReportDocument();
myCrystalReport.Load(Server.MapPath("~/Reports/report2.rpt"));
CrystalReportViewer1.ReportSource = myCrystalReport;
CrystalReportViewer1.RefreshReport();
I've pasted the error below:
Server Error in '/' Application.
Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Access is denied.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
I'd really appreciate any help.
Many thanks.
0x80004005 asp.net CrystalReports AccessisDenied
Member
180 Points
57 Posts
Re: Crystal Reports and Visual Studio when deploying
Apr 03, 2014 04:13 PM|batman1482|LINK
You for sure have Crystal Reports installed on your web server? If so, is it possible that the account your app is using doesn't have the correct permissions to the folder on your web server where the report is stored?
0x80004005 asp.net CrystalReports AccessisDenied
Contributor
5590 Points
1297 Posts
Re: Crystal Reports and Visual Studio when deploying
Apr 03, 2014 04:20 PM|dotnetzoom|LINK
Error message suggests that there is some read/write access issue. Did you give IIS_IUSRS read access to the reports folder?
0x80004005 asp.net CrystalReports AccessisDenied
Member
1 Points
11 Posts
Re: Crystal Reports and Visual Studio when deploying
Apr 03, 2014 04:36 PM|palmanal|LINK
Thanks a lot for your replies.
I see this error now after update the web.config:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 14: <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> Line 15: <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/> Line 16: <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/> Line 17: <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> Line 18: <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
Source File: C:\Inetpub\vhosts\mmn.com\httpdocs\web.config Line: 16
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' could not be loaded.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
Thanks for helping.
0x80004005 asp.net CrystalReports AccessisDenied
Contributor
5590 Points
1297 Posts
Re: Crystal Reports and Visual Studio when deploying
Apr 03, 2014 04:42 PM|dotnetzoom|LINK
Right click the Microsoft.ReportViewer.Common reference in solution explorer and set copyLocal=true. This will make sure that this dll is copied when the project is built succesfully. If this resolves your error, ideal thing to do would be finding out why it is missing on the web server. If you do not want to opt for this trial-and-error approach, try installing Microsoft Report Viewer runtime on the webserver.
But, version number is 11.0.3412.0. So, you have to make sure that you install this one on your local machine as well and update the reference to the latest one.
0x80004005 asp.net CrystalReports AccessisDenied
Member
1 Points
11 Posts
Re: Crystal Reports and Visual Studio when deploying
Apr 03, 2014 04:57 PM|palmanal|LINK
Server Error in '/' Application.
Unknown error 0x80040200
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Unknown error 0x80040200
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
Any idea?
Thank you!
0x80004005 asp.net CrystalReports AccessisDenied
Contributor
5590 Points
1297 Posts
Re: Crystal Reports and Visual Studio when deploying
Apr 03, 2014 05:07 PM|dotnetzoom|LINK
It is advisable to dispose COM resources after binding report viewer. Try loading reportviewer this way
Then, recycle application pool and open the website again.
0x80004005 asp.net CrystalReports AccessisDenied
Member
1 Points
11 Posts
Re: Crystal Reports and Visual Studio when deploying
Apr 03, 2014 05:18 PM|palmanal|LINK
That code throws a Null Object Reference Exception in local an throws the same error on the server
0x80004005 asp.net CrystalReports AccessisDenied