M
Michael S
I have an application where I'm using ODBC connection to query a
database via C#.
I'm sure my connection string and dsn information are correct because
the application works fine when
1) I run it from Visual Studio
2) I create a C# console application and give the .exe full trust
using the .NET configuration wizard.
If I create an ASP .NET web application using C# and the exact same
connection code I get the following error:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified
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: Microsoft.Data.Odbc.OdbcException: ERROR [IM002]
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data
source name not found and no default driver specified]
Microsoft.Data.Odbc.OdbcConnection.Open() +646
Overdue_Items.WebForm1.btnRunOverdueItemsReport_Click(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\overdue_items\webform1.aspx.cs:101
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1277
I'm assuming that it's a security issue since the console application
works fine but I can't figure out where I have to make the appropriate
security changes for the ASP .NET page to run.
I'm running on Windows Server 2003 with IIS 6.0.
Any advice?
Thanks,
Michael
database via C#.
I'm sure my connection string and dsn information are correct because
the application works fine when
1) I run it from Visual Studio
2) I create a C# console application and give the .exe full trust
using the .NET configuration wizard.
If I create an ASP .NET web application using C# and the exact same
connection code I get the following error:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified
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: Microsoft.Data.Odbc.OdbcException: ERROR [IM002]
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data
source name not found and no default driver specified]
Microsoft.Data.Odbc.OdbcConnection.Open() +646
Overdue_Items.WebForm1.btnRunOverdueItemsReport_Click(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\overdue_items\webform1.aspx.cs:101
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1277
I'm assuming that it's a security issue since the console application
works fine but I can't figure out where I have to make the appropriate
security changes for the ASP .NET page to run.
I'm running on Windows Server 2003 with IIS 6.0.
Any advice?
Thanks,
Michael