Re: can .net activex communicate with database using ASP.net/ADO
- From: "Alvin Bruney [ASP.NET MVP]" <vapor dan using hot male spam filter>
- Date: Wed, 9 Jul 2008 22:52:17 -0400
ActiveX controls in .NET don't exist. But your approach is workable. Another approach would be to write a web service sitting on the server that does the query to the database. The activex control can query the webserice using xmlhttp or something similar. That approach is safer because the activex doesn't know about the database. The webservice handles the 'forwarding' and is hosted on your secure server.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------
"George" <noemail@xxxxxxxxxxx> wrote in message news:u3thCaj4IHA.4696@xxxxxxxxxxxxxxxxxxxxxxx
Probably the easiest way is to build custom Stub/Proxy.
So lets say you have GetData.aspx which takes parameter SQL that is just run agains SQL database.
And this GetData.aspx does something like DataTabe.WriteXml(Response.OutputStream)
On client side if you have your ActiveX written on .NET you could
HttpWebRequest req = WebRequest.Create("http://www.myserver.com/GetData.aspx?SQL" )
.....
Stream st = req.GetResponse().GEtResponse.Stream();
DataTable.ReadXml(stream)
...
I hope you got an idea....
You will need to somehow make is secure though, so people could not delete your database (by accident :)
George.
"tuvman" <tuvman@xxxxxxxxx> wrote in message news:0745895b-3077-4ca9-953c-29f20454d23e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWe are developing a web application. Our web app is a heavy client-
our existing .net app exposed as an activex control running in IE. We
need the activex to be able to access our remote database server when
hosted within a browser from anywhere.Originally we were planning on
using port forwarding...and having the externalip:databaseport forward
from the web server to the database server. But our customer's network
admin says this is not possible and everything must go through the web
server..port 80.
We have dozens of stored procedures and dozens of methods written
already which use ADO.NET. Is it possible to connect to ASP.NET using
ADO, execute a request on the database server, and then return the
results as an ADO.net resultset? If not how would you propose we have
the ActiveX communicate with the database without having to write a
lot of code on both the client and server side.
thanks,
Tuviah
- Follow-Ups:
- References:
- Prev by Date: Re: can .net activex communicate with database using ASP.net/ADO
- Next by Date: Re: Cannot load default.aspx
- Previous by thread: Re: can .net activex communicate with database using ASP.net/ADO
- Next by thread: Re: can .net activex communicate with database using ASP.net/ADO
- Index(es):
Relevant Pages
|