Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to access database within ASP using UltiDev Cassini
Guest
#1 Posted : Saturday, September 2, 2006 6:30:54 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278


Hi there...

I just downloaded UltiDev Cassini server for .Net 2.0, I'm using Visual Studio 2005 Express to create some pages. It works fine.. However, if I include database access, an error occurs and won't proceed with the display:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

What configurations do I still need to do to access the DB?

There's no problem when running the pages in the built-in ASP .Net development server within Visual Studio Express.. thanks.
Ultidev Team
#2 Posted : Sunday, September 3, 2006 6:41:52 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

The problem like this may occur if you use integrated auth for your database access from ASP.NET application. MS built-in web server runs under interactive (logged in) user account. Therefore, if DB connection string specifies integrated auth, you will access DB as current interactive user. When you use UltiDev Cassini, which runs under “LOCAL SYSTEM”, the application talks to the DB as under LOCAL SYSTEM login.

To resolve this you may do one of the few things:
- Create a new user-login mapping in the SQL Server for “LOCAL SYSTEM” (a.k.a. “NT AUTHORITY\SYSTEM”);
- Or create a low-privilege windows user especially for DB access and either run Cassini under such account, or create a Serviced Component (COM+ object) running under the account;
- Or run UltiDev Cassini under your current user account (not recommended for security reasons);
- Use mixed auth model with SQL Server and add username and password to SQL connection string in web.config. This option is not the best from security stand point, but can be used behind firewalls in small organizations.

For more information refer to MSDN’s topics that talk about different ways to connect to the DB from an ASP.NET applications/.

Regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.