Re: can .net activex communicate with database using ASP.net/ADO



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@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
We 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

.



Relevant Pages

  • Re: Security and encryption
    ... > I have this idea of delivering an intranet app with the lawyers database ... > inhouse but with security control done with an ActiveX control on the ... > client side thus forcing clients to use MSIE browser. ... > as communication between clients and a server controlled by me. ...
    (microsoft.public.sqlserver.security)
  • Re: .ocx with ASP.NET
    ... An ActiveX Control is an application running on the client. ... there are some tricks you can do on the server side to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: find instance of IE for server socket in activex component
    ... "I have a server listing to port ... in the activex" does not ... "The activex control creates a server port on the client's machine, ...
    (microsoft.public.vc.mfc)
  • Re: how to access ActiveX Control frm VC
    ... I can not include the ActiveX Control in my application. ... ActiveX i am developing is available in the server side. ... access ActiveX) to access ActiveX Control to delete the component ...
    (comp.programming)
  • Re: Problems with TS Web Access in Server 2008
    ... server using ordenary RDP, but I can't get the Aplication page in the TS Web ... Access page (Working from the server). ... The Terminal Services ActiveX Client control is not available. ... install this ActiveX control before you can access RemoteApp programs ...
    (microsoft.public.windows.terminal_services)