ASP.NET account trying to access SQLServer

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
 
G

Guest

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!
***************************
 
A

Andreas Schubert

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
 

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

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top