Ado.net access to SqlServer via http xml

  • Thread starter Thread starter Cybertof
  • Start date Start date
C

Cybertof

Hello,

Is it possible to use ADO.NET to connect to a SQL Server and get back a
DatSet as an XML result through HTTP (so the application can pass
through firewalls) ?

If yes, how to do it ? (specifying port 80 for input/output
request/result, specifying XML required format, etc...)

Thanks,
Cybertof.
 
no, ...you can't do exactly as you described.

There are options.
1. configure SQL server to listen on port 80 for SQL's protocol. Then
you use ADO.NET, and in the connection string you wouldneed to specify port
80 (rather than the default port 1433). This is not what you asked for
because the protocol is SQL, not HTTP.

2. configure SQL Server and SQLXML. This is an ISAPI that plugs into IIS
and forwards queries to SQL server. It uses port 80 and HTTP. Your app
would just send HTTP GETs. This means you won't use ADO.NET. Instead you
will invoke the queries via URL, and get XML in response. And, since you
are not using ADO.NET, you have to do some work to get the returned XML to
look like an ADO.NET Dataset.

3. configure the firewall to properly allow SQL traffic on whatever port
you need.

I am sure there are other options as well.
 
Back
Top