开发者

Accessing a windows application form from an ASPX page

开发者 https://www.devze.com 2023-01-09 16:29 出处:网络
I have an aspx page and I want to access an application on the client after seeking user permission. Both the windows application and the website are t开发者_StackOverflowo be made in VB.NET. Does any

I have an aspx page and I want to access an application on the client after seeking user permission. Both the windows application and the website are t开发者_StackOverflowo be made in VB.NET. Does any one have any idea as how to go about solving this problem? Thanks

EDIT: Here is the problem. From my .aspx webpage in vb.net, a visitor clicks on a link on my site, and if my winform is not already loaded on their desktop, it is then loaded with the users permission. This application should auto-load on the user's site at boot up time and always be in the background running. Make it an extremely thin client, taking the least cpu and bandwidth from the user, and running as a silent background process until needed.

Whenever the user visits one of my many websites, IN ANY BROWSER, somehow - the app running in the background communicates with the .aspx on one of my sites, and exchanges a silent username password identifying client winform app to the online .aspx app on my website.

Then the .aspx on my site PASSES a url such as "www.somewebsite.com" to the app running in the background, the background app then does a http request from the client's computer, not from my .aspx server, so the client's cookies and ip are visible to "www.somewebsite.com" server. The client collects the html for that page, stores it as a string, and also saves the ascii of that webpage as another string.

Both strings then are PASSED BACK to my .aspx website that the client is visiting, and the .aspx app then stores these results in a database.


I don't see anyway your web page can access/execute an executable from a client's hard drive. May be with RIA components (Silverlight, Flash, etc), but not sure. You could however register a protocol like myapp: on client when installing your windows app to that machine and invoke a url from the web using that protocol with appropriate data passed as arguments. Then it's up to the windows app to communicate to the server and get the things done. Here is an MSDN article to get you started.


The only somewhat similar thing I've done like this is launching and manipulating Outlook from within a webpage, by generating the necessary VbScript. This of course implies that your users will only use IE to access your website.

 Set olApp = GetObject(, "Outlook.Application")
 Set objFolder = olNs.GetDefaultFolder(oCalendarDefault)       
 Set MyItems = objFolder.Items

etc

0

精彩评论

暂无评论...
验证码 换一张
取 消