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!

permissions - logon fails

Status
Not open for further replies.

majordog

Programmer
Jul 8, 2002
222
CA

Hey All,

I continuously get Logon failed error messages when I attempt to run launch a crystal report from an asp.net web application. I suspect that the permissions for the asp user are not correct but am not sure where I can change this. The code I use to launch is:

Dim cil As New CrystalReport2
'Put user code to initialize the page here
Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
Dim myLogin As CrystalDecisions.Shared.TableLogOnInfo

For Each myTable In cil.Database.Tables
myLogin = myTable.LogOnInfo
myLogin.ConnectionInfo.Password = "mb"
myLogin.ConnectionInfo.UserID = "rgS"
myLogin.ConnectionInfo.DatabaseName = "ED"
myLogin.ReportName = "CrystalReport2"
myTable.ApplyLogOnInfo(myLogin)
Next

crystal.ReportSource = cil

Can anyone tell me what I should do to get this going?
 

I'd like to update this question if I could as I have narrowed down my problem - hoping someone can help me.. My problem is that the reports run under the default ASP account which is local to my computer when it tries to get the data to populate it's fields. (It tries to access a remote database for the crystal reports.) I've gone searcvhing and found a couple of different fixes that involve altering the machine.config file -the <processModel> by setting a username and password there. Except it will not work, giving an error message whenever I run saying: Error while trying to run project:Unable to start debugging on the web server. Server-side error occurred on sending debug HTTP request. ..
 
Help!!! I have been trying fix after fix and nothing seems to work. When I try and run the app, it returns the error message: Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. I can check the application event log on the database server and see the error message:
18452: login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

I am working with .Net 2003 v 1.1.4322.573. It is my understanding that the default user woudl be the ASPNET account - why is it passing null values to the database server?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top