Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security issues running Cryst Reports in ASP.NET

Status
Not open for further replies.

aolb

Programmer
Apr 16, 2002
180
GB
I have written a web application which embeds crystal reports into ASP.NET (1.1 framework).

I have no issues running the reports on my development machine where all the SQL Server 2000 db is located but when I deploy to the test and live servers where the SQL Server db is located on a different box I get various errors which all point to security issues.

[Database Vendor Code: 4060 ]

To connect the reports to the data source I am using odbc and a SQL Server logon and password.

any thoughts?
 
are you pushing (using enumerators or datasets) or pulling (have crystal query the db directly) data for the reports?
are you using stored procs to populate?
does the account connecting to the db have permission on the server to execute the sql statement?

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Crystal is pulling the data for the reports.

I am not using stored procedures to populate the report with data.

does the account connecting to the db have permission on the server to execute the sql statement?

I have set up a SQL user am logging onto the db using that.
The reports that are failing to run using the .NET Crystal viewer can be run using Crystal Reports.

I think it is some security configuration issues between the .net box and the db box.
 
can you query db from server to db on a webform?
Code:
//on load event
using(IDbConnection cnn = new SqlConnection(...){ cnn.Open(); }
if this fails the problem is a .net issue not a crystal issue.

how are you settings the login information for the viewer to query the db?
if you're not setting it, then maybe it's trying to query dev, not prod.

also, please post your current markup/code as this may give some clues to the issue?


Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Jason is right. The problem is you have to connect the viewer in code to make the db connections. BusinessObjects has many examples on line to help with .NET issues.
 
can you query db from server to db on a webform? yes


crTableLogOnInfo = crTable.LogOnInfo;
// get correct password

crTableLogOnInfo.ConnectionInfo.Password = ODBCPassword(crTableLogOnInfo.ConnectionInfo.ServerName.ToString());

crTableLogOnInfo.ConnectionInfo.UserID = ODBCLogon(crTableLogOnInfo.ConnectionInfo.ServerName.ToString());

crTable.ApplyLogOnInfo(crTableLogOnInfo);

ODBCLogon and ODBCPassword are global functions I wrote to return the password and logon


logon and password to dev and teaining are the sane, the only difference is the ODBC connections on the test box are pointing to a sql server db on another box.

I've come across the term "double hop" which maybe something to do with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top