ADODB.connection safety settings error

S

Steven Baeten

Hi All,


I'm running a webpage-application where, in a aspx-page,a udl is called in
vbscript
in an xsl-stylesheet to access a database. When I want to execute this, I
receive
following error

ADODB.Connection Safety settings on this computer prohibit accessing a data
source on
another domain.

There is nothing wrong with the udl cause "test connection" succeeded.
Also the vbscript-code I use to call the udl works.

I've tried to use Windows Authentication and SQL Server Authentication for
the connection
and it doesn't work.

I've also put <identity impersonate="true"> in my web.config to make sure
that I was running
the application and not the ASP.NET client


Could anyone please help me?


Thanks in advance


Steven Baeten
 
M

Mary Chipman

Instead of using a UDL, you can place your connection string in the
Web.config file using the
System.Configuration.ConfigurationSettings.AppSettings property. The
web.config section looks like this:

<configuration>
<appSettings>
<add key="ConnectionString" value="connection string here" />
</appSettings>
</configuration>

The code looks like this:

Dim str as String = _
ConfigurationSettings.AppSettings("ConnectionString")

--Mary
 

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,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top