PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

Crystal Report Access Denied

 
 
Chuck Yeager via DotNetMonster.com
Guest
Posts: n/a
 
      7th Apr 2005
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?

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      7th Apr 2005
As a test, you can use impersonation to have ASP.NET run under a different
user account. (Perhaps your user account since you know you have the
necessary permissions.)

For example, you can add a line similar to this to your web.config file:
<identity impersonate="true" userName="domain\MyUserName">
password="password"/>

Here's more info on impersonation:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Chuck Yeager via DotNetMonster.com" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
>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?
>
> --
> Message posted via http://www.dotnetmonster.com



 
Reply With Quote
 
Elton Wang
Guest
Posts: n/a
 
      7th Apr 2005
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 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)

+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?
>
>--
>Message posted via http://www.dotnetmonster.com
>.
>

 
Reply With Quote
 
Chuck Yeager via DotNetMonster.com
Guest
Posts: n/a
 
      7th Apr 2005
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

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      7th Apr 2005
Putting values in a web.config is not the same as hardcoding.
Web.Config values can be easily changed at any time without recompiling.

However, if you're determined to find another solution I'd suggest you start
by searching the Crystal Reports knowledge base:
http://support.businessobjects.com/s...exq3=&indexq4=

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



"Chuck Yeager via DotNetMonster.com" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> 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
>
> --
> Message posted via http://www.dotnetmonster.com



 
Reply With Quote
 
Chuck Yeager via DotNetMonster.com
Guest
Posts: n/a
 
      7th Apr 2005
Thanks Steve!

I will look at that

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
Chuck Yeager via DotNetMonster.com
Guest
Posts: n/a
 
      11th Apr 2005
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" />

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
New Member
Join Date: Nov 2011
Posts: 2
 
      30th Nov 2011
go to webconfig file and off <!--<identity impersonate="true"/>--> or false impersonate
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to have access to the fields in the crystal report using VB.NET (outside the design of the crystal report) with SQL statements? amiga500@gmail.com Microsoft Dot NET 0 24th Oct 2007 04:38 PM
Sending Crystal Report to Network Print Mailbox While Bypassing Crystal Report Viewer. John Smith Microsoft VB .NET 0 17th Jan 2007 04:17 PM
Crystal - Access denied - deployment =?Utf-8?B?TWFyYyBDYXN0cmVjaGluaQ==?= Microsoft ASP .NET 1 14th Jul 2006 08:43 AM
Getting an access is denied error against a Crystal Reports for VS.NET report Rod Microsoft ASP .NET 3 30th Sep 2004 07:41 AM
Access to Crystal Reports\\Viewers\\dynamic_images" is denied. =?Utf-8?B?X0RvdWc=?= Microsoft Dot NET 0 10th Aug 2004 04:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:38 AM.