Re: Crystal Reports .NET: Exporting to PDF
- From: "Norman Yuan" <NotReal@xxxxxxxxxxx>
- Date: Wed, 13 Jun 2007 10:21:43 -0700
1. you need to make it clear to yourself: whcih user account is configured
to run the ASP.NET app on the web server. ASP.NET app con be configure to
run underdifferent user account, local or domain. You can do it with
web.config. If you use Win2003, you can also configure IIS to run this
ASP.NET app with different application pool, and then configure a domain
account to run the applocation pool.
To make sure you really know which user account is used to run the ASP.NET
app, you could place following code to chek it out:
private void Page_Load(...)
{
if (!Page.IsPostBack)
{
Label1.Text=Contract.User.Identity.Name + " is running the
application!"
}
}
2. After you clearly know which user account is running the app, then give
it necessary permision to the saving folder (local or network share.
<btysgtmajor@xxxxxxxxx> wrote in message
news:1181749727.639597.285520@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ok, I just tried setting the "identity" element in the web.config file
to a domain account that has the appropriate permissions. No dice.
I don't understand it because I use my ASP.NET app to create files
elsewhere in the application (non-Crystal related though).
On Jun 13, 11:37 am, btysgtma...@xxxxxxxxx wrote:
Actually, sorry, I need clarification: Do I need to configure the
web.config (or whatever) for impersonation? Or the IIS settings?
Because I've tried the IIS settings thing (as mentioned in my last
post).
On Jun 13, 10:36 am, "Norman Yuan" <NotR...@xxxxxxxxxxx> wrote:
OK, in this case, where the ASP.NET app files are located does not
matter,
the ASP.NET app runs on the web server.
It has nothing to do with Crystal Report, as you have already known
that the
report is generated correctly. It is simply an authorization/permission
issue.
It is obviuos that the ASP.NET app is run under a user account local to
the
web server (as you metioned in previous post, "NT Authority\Network
Service"
of the web server). So, that is what it is: a local account has no
access to
other computer's resources. You need to configure your ASP.NET app to
run
under a domain account that has write-permission to the folder where
you
want to save the PDF.
<btysgtma...@xxxxxxxxx> wrote in message
news:1181742008.279655.193140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Actually I did say that I was saving it back to the fileserver (not
the webserver), but to be perfectly clear, yes, I'm trying to save
the
PDF back to the fileserver which is a remote machine to the
webserver.
The ASP.NET app itself is located on the fileserver, but the
webserver
is the one running/calling the app from the fileserver. It's a
classic IIS setup where you select the option under "Home Directory"
as being a share on a remote computer.
Thanks again.
On Jun 12, 7:30 pm, "Norman Yuan" <NotR...@xxxxxxxxxxx> wrote:
Are you trying to save the report (as *.pdf) to a different computer
other
than the web server where the ASP.NET app runs (could not tell from
your
description)?
<btysgtma...@xxxxxxxxx> wrote in message
news:1181683611.065692.300540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
Ok, here's my situation: I have a Win2k3 webserver that's
accessing
a UNC path on a fileserver containing the files for my website.
Now,
I have an ASP.NET app deployed and it works well, except for one
thing...
I have the bundled version of CR.NET (am using Visual Studio .NET
2003 with .NET v1.1). I have code that creates a report and
exports
it to PDF. Now, this works fine if I setup the ASP.NET app
locally to
the webserver. However, the second I put it onto the fileserver
and
access it as described above, it doesn't export. I've used
ProcMon
and have verified that the report itself is created (using Crystal
DLLs on the webserver), but once it tries to save the PDF back to
the
fileserver, it says "Access Denied" in ProcMon (the path is UNC).
What's more, in the "Access Denied" event, it doesn't say which
user
the process is trying to impersonate, leading me to believe that
Crystal is using some credentials local to the webserver and
trying to
use them with the fileserver.
I can see that NT AUTHORITY\NETWORK SERVICE is the "user" for the
"Access Denied" event on the webserver, so I tried granting
NETWORK
SERVICE (as well as ASPNET, etc.) full control permissions, but to
no
avail.
Has anyone run into this before? Is there a solution? Thanks
for
any help in advance!- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
.
- Follow-Ups:
- Re: Crystal Reports .NET: Exporting to PDF
- From: btysgtmajor
- Re: Crystal Reports .NET: Exporting to PDF
- References:
- Crystal Reports .NET: Exporting to PDF
- From: btysgtmajor
- Re: Crystal Reports .NET: Exporting to PDF
- From: Norman Yuan
- Re: Crystal Reports .NET: Exporting to PDF
- From: btysgtmajor
- Re: Crystal Reports .NET: Exporting to PDF
- From: Norman Yuan
- Re: Crystal Reports .NET: Exporting to PDF
- From: btysgtmajor
- Re: Crystal Reports .NET: Exporting to PDF
- From: btysgtmajor
- Crystal Reports .NET: Exporting to PDF
- Prev by Date: Re: Crystal Reports .NET: Exporting to PDF
- Next by Date: Re: Attaching Style ***
- Previous by thread: Re: Crystal Reports .NET: Exporting to PDF
- Next by thread: Re: Crystal Reports .NET: Exporting to PDF
- Index(es):