Database server not found when using IIS -
01-31-2011
, 07:29 AM
Hi,
i have a new web site written in ASP.NET that access a SQL Anywhere
database. The problem is that everything works fine when I run the web
site in the integrated webserver that comes with Visual Studio, but
when I try to run the same site via IIS i get an error message saying
that it can't find the database.
I have tried a number of different connection strings including using
an odbc-connection. They all work with the development web server but
not with IIS. I am have also checked that the connection string is
identical independent of which webserver I use.
Current Connectionstring in Web.config:
<add
connectionString="UID=dba;PWD=*****;ENG=quickng;LI NKS=ShMem,TCPIP{IP=192.168.1.100;PORT=2638;VERIFY= no;DOBROAD=none}"
name="csQuickNG" providerName="iAnywhere.Data.SQLAnywhere" />
Error message (from simple test script):
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: iAnywhere.Data.SQLAnywhere.SAException: Database
server not found
Line 18: cmd.Connection = conn;
Line 19: cmd.CommandText = "SELECT FIRSTNAME, LASTNAME
FROM CUSTOMERS WHERE LASTNAME = 'ERICSSON'";
Line 20: conn.Open(); <-- ERROR HERE!!!!
Line 21: iAnywhere.Data.SQLAnywhere.SADataReader
drCustomer = cmd.ExecuteReader();
Line 22: drCustomer.Read();
Stack Trace:
[SAException (0x80004005): Database server not found]
iAnywhere.Data.SQLAnywhere.SAConnection.Open() +984
mdoffert.dbTest.Page_Load(Object sender, EventArgs e) in C:\Users
\Richard\Documents\Visual Studio 2010\Projects\mdoffert\mdoffert
\dbTest.aspx.cs:20
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp,
Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object
sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+2207
I don't know if this is a problem with SQL Anywhere or IIS
configuration. Plz advice and thanks in advance. |