|
-
Sep 12th, 2009, 07:46 AM
#1
Thread Starter
New Member
General Advice
Hello. I am still new to vb.net 2008 so bare with me please. I am trying to create an application that will login our company's intranet portal via a webpage. The webpage has a single frame in it that loads a secure(https) login form. After logging in, the application will need to read and send xml to and from the portal. I have been digging around and have seen a few different ways of submitting the login information from the program to the site, however, I have not gotten any of them to work. From what I can tell it is difficult to change the values of input boxes that are inside a frame. Am I accurate on this? There will be a large amount of data transfer between the app and the portal so I will need something lightweight but I have enough room that I would rather not reinvent the http/web-browser wheel if at all possible. The reason I say that is because I have read that some objects that handle web pages are very resource hungry. I have no preference on the .net frameworks as this is the area of VB thats kinda confusing. What I am looking for is either a point or violent shove in the right direction. Thank you.
If I left out any needed information let me know.
-
Sep 12th, 2009, 07:55 AM
#2
Re: General Advice
Hey,
Have you looked into using the HttpWebRequest Class:
http://msdn.microsoft.com/en-us/libr...ebrequest.aspx
This allows you to both GET and POST information to a URL, which would allow you to log in and retrieve the data that you want. This doesn't have a UI as such though, so it depends on what exactly you are wanting to do.
You might also want to take a look at Kleinma's Code Bank Submission here:
http://www.vbforums.com/showthread.php?t=416275
As it covers exactly what you are wanting to do, using a WebBrowser control.
Hope that helps!!
Gary
-
Sep 12th, 2009, 08:16 AM
#3
Thread Starter
New Member
Re: General Advice
The HttpWebRequest was what I used on my initial attempt since I only need to work with the XML data and don't need to load all the prettys of the actual page. It looked as tho I would have to write a bunch of code to handle the cookies and JavaScript/ajax from the webpage so I turned away from it. I also experimented with Kleinma's code for the better part of yesterday but was unable to access the input values inside the frame with his examples. He also mentions having issues with frames on page 2 of that post. I'm not sure whether it was because it was written in a previous version of VB.net and was converted to 2008 or if it is just extremely difficult to access those elements since they are inside of a frame. Also after converting his pre 2008 code over, some of the keywords he used did not show up in intellisense.
EDIT: To clarify I am talking about Kleinma's post titled Manipulate/Change/Form Fill data in webpages using the Webbrowser control
Last edited by natepizzle; Sep 12th, 2009 at 08:23 AM.
Reason: Clarification
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|