Crystal Report Access Denied

  • Thread starter Chuck Yeager via DotNetMonster.com
  • Start date
C

Chuck Yeager via DotNetMonster.com

I think I am giong to die, this is driving us nuts.

Here is the error we are getting when trying to use CrystalReportViewer:

OS: XP SP1 and another machine XP SP2 (same errors)
IDE: VS .NET 2003


ERROR MESSAGE
-----------------------------------
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 File: C:\Inetpub\wwwroot\homie\ar15.aspx.cs Line: 30

Stack Trace:


[COMException (0x80004005): Access is denied.
]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open
(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open
(Object& DocumentPath, Int32 Options) +72
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened
() +218

[Exception: Load report failed.]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened
() +269
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String
filename, OpenReportMethod openMethod, Int16 parentJob) +739
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String
filename) +52
Homie.mbrCrystalReport.Page_Load(Object sender, EventArgs e) in c:\
Inetpub\wwwroot\homie\ar15.aspx.cs:30
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750



------------------------------------


ERROR CODE
------------------------------------
CrystalDecisions.CrystalReports.Engine.ReportDocument crReportDocument =
new CrystalDecisions.CrystalReports.Engine.ReportDocument();
crReportDocument.Load(@"C:\Inetpub\wwwroot\homie\ar15.rpt");
-------------------------------------

We have tried the temp directory permissions with the ASPNET account option
and it did not work.

What is going on, anyone outhere know?
 
E

Elton Wang

Hi Chuck,

When a CR is being created in ASP.NET, the .NET will
create a report file in a temp folder, e.g. C:\Documents
and Settings\UserName\ASPNET\Local Settings\Temp. You can
try to give ASPNET permission for this folder.

HTH

Elton Wang
(e-mail address removed)

-----Original Message-----
I think I am giong to die, this is driving us nuts.

Here is the error we are getting when trying to use CrystalReportViewer:

OS: XP SP1 and another machine XP SP2 (same errors)
IDE: VS .NET 2003


ERROR MESSAGE
-----------------------------------
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 File: C:\Inetpub\wwwroot\homie\ar15.aspx.cs Line: 30

Stack Trace:


[COMException (0x80004005): Access is denied.
]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocu
mentClass.Open
(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrappe
r.Open
(Object& DocumentPath, Int32 Options) +72
CrystalDecisions.ReportAppServer.ReportClientDocumentWrappe
r.EnsureDocumentIsOpened
() +218

[Exception: Load report failed.]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrappe
r.EnsureDocumentIsOpened
() +269
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load
(String
filename, OpenReportMethod openMethod, Int16 parentJob) +739CrystalDecisions.CrystalReports.Engine.ReportDocument.Load
(String
filename) +52
Homie.mbrCrystalReport.Page_Load(Object sender, EventArgs e) in c:\
Inetpub\wwwroot\homie\ar15.aspx.cs:30
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750



------------------------------------


ERROR CODE
------------------------------------
CrystalDecisions.CrystalReports.Engine.ReportDocument crReportDocument =
new CrystalDecisions.CrystalReports.Engine.ReportDocument ();
crReportDocument.Load
(@"C:\Inetpub\wwwroot\homie\ar15.rpt");
-------------------------------------

We have tried the temp directory permissions with the ASPNET account option
and it did not work.

What is going on, anyone outhere know?
 
C

Chuck Yeager via DotNetMonster.com

Thanks for your feedback gentlemen,

Steve,

I have tried Steve's option and the error is gone, but I do not want to
hard code the username and password.


Elton,

I have tried that and access denied still occurs.


I will probably stumble accross the answer while sitting on the pot tonight
just before I go to bed. :)

But, just in case any other ideas would be greatly appreciated
 
C

Chuck Yeager via DotNetMonster.com

I put in the web config the following and it works like a charm!

<authentication mode="Windows" />

<identity impersonate="true" userName="domainname\username"
password="mypassword" />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top