0

How to allow ASP.NET 4.0 query Sybase Database on IIS 5.1?

I've been running my website on Debug mode and all works fine, when I publish the website and I add a virtual directory in the IIS 5.1 with it, the query is not running.

Do I've to put some permission or anything of that kind in my website or in IIS to allow database querying?

aF.
  • 64,980
  • 43
  • 135
  • 198
  • You are aware that IIS doesn't run with your current user? You will have to grant access to the IIS user(pool) to query your database (I don't have experience with sybase, but at least that's something you have to do with SQLServer). – Styxxy May 28 '12 at 12:23
  • @Styxxy I connect to the database through ODBC and I provide the user and password on the code. It all works fine when running in Debug mode, just doesn't work when I publish the web site.. – aF. May 28 '12 at 12:31

1 Answers1

0

I've discover that the Exception was "no DSN found", so I had to define the ODBC Server at System level and not User level:

Control Panel -> Administrative Tools -> ODBC ... -> User vs System

aF.
  • 64,980
  • 43
  • 135
  • 198