ASP.NET account trying to access SQLServer

  • Thread starter Thread starter Andreas Schubert
  • Start date Start date
A

Andreas Schubert

Hello newsgroup,

I've got an issue here, which I cannot resolve. Please help.
I created a small ASP.Net application with a crystal report. When I try to
view the report, I get the
CrystalDecisions.CrystalReports.Engine.LogOnException -error.

I first thought that it is a problem like in
http://support.microsoft.com/default.aspx?scid=kb;en;319264&sd=msdn stated

and changed my page accordingly. But to no avail, I still get this error
message.
Now I did a trace on the SQLServer and it showed, that the ASP.NET account
is trying to access the database, not the user I defined.
What's wrong there and how can this be solved?

Thanks for your help

Andy
 
WHat type of authentication? Windows or SQL?

By design, web apps are anonymous unless you specify otherwise (forcing a
login). If you head this direction, you can impersonate the user and SQL
access will be based on their credentials.

If you need a specific user, you must have it specified in the connection
string (UID and PWD).

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Thanks for the reply,

SQL Server is working in mixed mode.
User credentials are explicitely set by:
crConnectionInfo.ServerName = "MyServer"
crConnectionInfo.DatabaseName = "MyDB"
crConnectionInfo.UserID = "sa"
crConnectionInfo.Password = ""
crDatabase = crReportDocument.Database
crTables = crDatabase.Tables
For Each crTable As CrystalDecisions.CrystalReports.Engine.Table In crTables
crTableLogonInfo = crTable.LogOnInfo
crTableLogonInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next
CrystalReportViewer1.ReportSource() = crReportDocument

and still... the user trying to connect is "ASP.NET"

Any ideas?

Andy

"Cowboy (Gregory A. Beamer) - MVP" <[email protected]>
schrieb im Newsbeitrag
 
Back
Top