Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 22nd, 2008, 05:31 PM
alienaheart
Guest
 
Posts: n/a
Default Interface between web app and win app

Hi,
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???


Alienaheart
  #2 (permalink)  
Old November 22nd, 2008, 08:59 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,652
Thanks: 3
Thanked 141 Times in 140 Posts
Default

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.
  #3 (permalink)  
Old November 23rd, 2008, 12:37 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,413
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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.

-Peter
compiledthoughts.com
  #4 (permalink)  
Old November 23rd, 2008, 04:57 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,652
Thanks: 3
Thanked 141 Times in 140 Posts
Default

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.
  #5 (permalink)  
Old August 4th, 2009, 10:29 AM
Registered User
 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

planoie,

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


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01:27 PM
WebService for Intranet Win app through HTTP ? hendyhanusin .NET Web Services 3 July 31st, 2007 07: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



All times are GMT -4. The time now is 04:18 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.