|
-
Aug 2nd, 2004, 10:56 AM
#1
webbrowser control [UNRESOLVED]
I have been looking for an answer to this for a long time, but I still have yet to come up with any solution.
My application has a webbrowser control in it. This control is used to get information from our website to give to the end user. The end user never actually sees the data in the webbrowser control because it is on a hidden form. For example, this program needs to be activated on our server for them to use it. When they put the cd key in, it sends it as a parameter on a url to our website which validates it and returns a good or bad response. the response is read in and if good they continue, if not it haults the application.
so my problem is that people with firewalls seem to be having trouble getting this to work. I would think since this is the webbrowser control, that if they can get out to the internet with internet explorer, then my app should be able to do the same, but for whatever reason, this is not the case. I tried installing zonealarm to replicate the problem, and when i get the popup authorizing access, it tells me the destination IP is 127.0.0.1 with a different port number each time. Why it is using this IP is odd to me, and why its not working is a bigger mystery.
Is there a better method I can use to navigate to webpages? Why wont this work in my app?
Last edited by kleinma; Aug 2nd, 2004 at 03:56 PM.
-
Aug 2nd, 2004, 03:23 PM
#2
Not sure whats causing that but you could try running an ASP script on the server and connect directly to a database on your server using ADO.
-
Aug 2nd, 2004, 03:24 PM
#3
I don't know what you mean?
The problem is that the internet explorer webbrowser control can't connect to our website on some of the users systems. What does this have to do with ADO, or ASP script?
-
Aug 2nd, 2004, 03:29 PM
#4
Was just a suggestion, you asked for a different way to connect to your server.
Say you build a db of cd keys well you can connect to that db using ADO and ASP and validate the keys as required.
-
Aug 2nd, 2004, 03:55 PM
#5
thats exactly what it does. My app that is on the clients computer simply reads the text that is output by the asp code in plain HTML
the problem is that the webbrowser control isn't even able to connect to the web page at all... its like its being blocked from internet access
-
Aug 2nd, 2004, 04:56 PM
#6
Yup i know what your saying and i cant see how this would make a difference but you never know, for example you could,
VB Code:
Dim rs As New ADODB.Recordset
Dim url As String
url = "http://www.yoursite.com/"
rs.Open url & "get.asp?ID=" & Val(txtID) & ""
and communicate to the server like that.
-
Aug 2nd, 2004, 06:20 PM
#7
Fanatic Member
HOW ABOUT A BETTER SOLUTION THAT I KNOW WORKS!
BTW, the webbrowser control has problems with the firewall. Try the following code.
VB Code:
'REFERENCE MICROSOFT INTERNET CONTROLS
'Declarations:
'----------------
Public Declare Function GetTickCount Lib "kernel32" () As Long
Public IE As InternetExplorer
'Form Code:
'--------------
Dim StartTime As Long
Dim RetryCount As Long
Set IE = New InternetExplorer 'Start a new IE session
IE.Visible = False 'Make the browser invisible to the user
Retry:
RetryCount = RetryCount + 1 'The number of times we tried to access the page
If RetryCount > 3 Then 'If we retried more than 3 times, exit the sub
IE.Quit 'Close the browser
Set IE = Nothing
Exit Sub
End If
IE.Navigate "http://yahoo.com" 'Navigate to the given URL
StartTime = GetTickCount() 'Store the current time
While IE.ReadyState <> 4 'Wait while the browser is busy
If (StartTime + 3000) < GetTickCount Then GoTo Retry 'Give it 3 seconds before retrying
DoEvents
Wend
Msgbox IE.Document.documentElement.OuterHTML
IE.QUit
Set IE = nothing
Last edited by VIP3R; Aug 2nd, 2004 at 06:26 PM.
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Aug 2nd, 2004, 06:25 PM
#8
Fanatic Member
Just to tell you, that code has passed many fire alarms. I know that it bypasses mine (Crappy WinXP firewall) and my friend's firewall (Norton "i think"). However, I haven't heard of any problems from anyone with a firewall but I can't say I've tested it with all firewalls.
I hope my post didn't go to waste and that I have solved your problem.
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Aug 2nd, 2004, 08:55 PM
#9
ill check it out tomorrow when i am at work.
I will impliement that code and upload it to the client having troubles. Then I will let you know the result.
Thanks for the post
-
Aug 2nd, 2004, 10:49 PM
#10
Hyperactive Member
It works bypassed ZoneAlarm Pro i have 
Good code there
Born to help others
(If I've been helpful then please rate my post. Thanks)
call me EJ or be slapped! 
-
Aug 2nd, 2004, 11:50 PM
#11
Originally posted by EJ12N
It works bypassed ZoneAlarm Pro i have 
Good code there
well i guess its not bypassing, its using permissions already given to internet explorer
-
Aug 3rd, 2004, 12:24 AM
#12
Frenzied Member
i use inet...to download a page n search the data to see if program is enabled or not. Havent had any problems so far and people with firewalls havent complained ( other than when i disable the program )
but my method is farely simple .. as i have a page say test.html on my server and i have the program check it to see if it contains a word " disable " or sumthin...then go from there
ice
:::`DISCLAIMER`:::
Do NOT take anything i have posted to be truthful in any way, shape or form.
Thank You!
--------------------------------
"Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
"Finaly I can look as gay as I want..." - NoteMe
Languages: VB6, BASIC, Java, C#. C++
-
Aug 3rd, 2004, 09:01 AM
#13
is there anyway to use the IE object instead of the webbrowser object but still have it inside an application instead of being a seperate window?
-
Aug 3rd, 2004, 03:03 PM
#14
Originally posted by kleinma
is there anyway to use the IE object instead of the webbrowser object but still have it inside an application instead of being a seperate window?
I used a combination of SetWindowLong, SetWindowPos, and SetParent APIs to achieve this
-
Aug 3rd, 2004, 06:45 PM
#15
Fanatic Member
lol Just pointing out some of my typing mistakes:
Just to tell you, that code has passed many fire alarms.
I didn't notice it until now :P. It's good to know that my code doesn't set off the fire alarm!
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Aug 3rd, 2004, 10:03 PM
#16
Originally posted by VIP3R
lol Just pointing out some of my typing mistakes:
I didn't notice it until now :P. It's good to know that my code doesn't set off the fire alarm!
lol i guess i didnt really notice because i knew what you meant
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
|