Crystal Reports for VS 2005 Error on Print

G

Guest

I created a page in Visual Studio 2005 with a Crystal Reports web viewer
attached to a report. The report previews fine, but clicking the embedded
Print button produces an error:

"HTTP 403.1 Forbidden: Execute Access Forbidden
Internet Information Services"

"You have attempted to execute a CGI, ISAPI, or other executable program
from a directory that does not allow programs to be executed."

Impersonation is set to true in the web.config with a machine userid and
password for the web server. Seems like Crystal needs to be able to write to
a temp directory on the server and users don't have access to this with their
Windows domain accounts.

The Page Load event for the page with the viewer looks like:

crReportDocument.Load(Server.MapPath("Summary.rpt"));

crConnectionInfo.ServerName = "MyServer";
crConnectionInfo.DatabaseName = "DatabaseName";
crConnectionInfo.UserID = "****";
crConnectionInfo.Password = "****";

crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;

//Loop through all tables in the report and apply the
//connection information for each table.
for (int i = 0; i < crTables.Count; i++)
{
crTable = crTables ;
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);

CrystalReportViewer1.ReportSource = crReportDocument;

If anyone could shed light on this problem for me I would be very grateful.
All necessary permissions have been applied to the virtual directory in IIS.

Thanks,

Steve
 
G

GAZ

First off I would suggest to check the actual security on each of the
directories on your web server. Usually, processes run as network services
and as such do not have required rights to write on the drive. Same goes for
the ASP process as well.

Second, I'd suggest you move to Reporting Services. Much more user friendly
and many more options plus tons of third party addons.

BR,

GAZ
 
G

Guest

Thanks for the reply. Unfortunately Reporting Services won't work because I
need a 3D funnel chart. I will continue diagnosing the problem with Crystal
Reports Viewer.

Steve

GAZ said:
First off I would suggest to check the actual security on each of the
directories on your web server. Usually, processes run as network services
and as such do not have required rights to write on the drive. Same goes for
the ASP process as well.

Second, I'd suggest you move to Reporting Services. Much more user friendly
and many more options plus tons of third party addons.

BR,

GAZ

Steve McVey said:
I created a page in Visual Studio 2005 with a Crystal Reports web viewer
attached to a report. The report previews fine, but clicking the embedded
Print button produces an error:

"HTTP 403.1 Forbidden: Execute Access Forbidden
Internet Information Services"

"You have attempted to execute a CGI, ISAPI, or other executable program
from a directory that does not allow programs to be executed."

Impersonation is set to true in the web.config with a machine userid and
password for the web server. Seems like Crystal needs to be able to write
to
a temp directory on the server and users don't have access to this with
their
Windows domain accounts.

The Page Load event for the page with the viewer looks like:

crReportDocument.Load(Server.MapPath("Summary.rpt"));

crConnectionInfo.ServerName = "MyServer";
crConnectionInfo.DatabaseName = "DatabaseName";
crConnectionInfo.UserID = "****";
crConnectionInfo.Password = "****";

crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;

//Loop through all tables in the report and apply the
//connection information for each table.
for (int i = 0; i < crTables.Count; i++)
{
crTable = crTables ;
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);

CrystalReportViewer1.ReportSource = crReportDocument;

If anyone could shed light on this problem for me I would be very
grateful.
All necessary permissions have been applied to the virtual directory in
IIS.

Thanks,

Steve

 

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

Top