Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 22nd, 2008, 05:31 PM
Posts: n/a
Default Interface between web app and win app

I have a windows application . which needs some data from one of our other web application which is very secured.
Say I have a page in my WinApp which asks for employeeID after I put the employee ID and click the "go" button , It should bring up the emp details web page[ Say for eg:Empdetails.aspx]. Can you give me any clue as to how I can work this out???

Old November 22nd, 2008, 08:59 PM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

You could clearly force a browser to come up from a WinApp, but I certainly don't see how that helps you IN THE LEAST to get any value from the Web app. They will be running in separate process spaces (I don't think you can ask the win app to bring up a browser in the same process....but I could be wrong about that) and so won't have access to each other's memory spaces.

A *much* better way to do this is to have the web app provide a web service that you can invoke from the win app. That is, design ahead of time for this situation.

Failing that, you could have your win app *pretend* that it is a browser (that is, it could make an HTTP request of the server, passing the appropriate credentials and request information). How hard or easy that is depends on how the web app's security is handled. Having done this, you'd still have to "screen scrape" the HTML returned from the web app looking for the relevant data.
Old November 23rd, 2008, 12:37 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Secure web services is definitely a very good first approach.

In response to Old Pedant: You can embed a web browser into a winforms app. It does run as a separate process (Internet Explorer) but you can wire up the browser object to the windows form such that java script on the page can talk to the hosting container through the "document.external" object and similarly the hosting container can talk to the browser document object model through a property on the browser control. I just finished an application that uses this with great success.

Old November 23rd, 2008, 04:57 PM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

Fascinating. And what about security??? If the browser talks to the host via HTTPS, is it then NOT considered a security hole for the app to be able to scrape content???

Seems to me like this would be a great way for hackers to start grabbing user names and passwords and whatever. Convince a few idiots to install this wonderful new "improved high security browser!" and you have any info you want. Ehh...I guess it's no worse than a browser plugin that does the same thing. Let the naive users of the world beware.
Old August 4th, 2009, 09:29 AM
Registered User
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


do you have an example of how to get from the webpage to the winapp? I can get from the winapp to the webpage

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert a VB.Net app to a web app? furjaw VB.NET 3 September 24th, 2007 12:27 PM
WebService for Intranet Win app through HTTP ? hendyhanusin .NET Web Services 3 July 31st, 2007 06:44 AM
Java desktop app with Win XP look alt7 Java Basics 0 February 8th, 2006 09:42 AM
Deploying Crystal Reports in for Win App (URGENT) melvik Crystal Reports 9 January 12th, 2005 12:36 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.