App cant connect to Internet when running on a network - Is this a proxy or Firewall?
Hi, one of my clients is running my exe app from a network PC and its throwing an error showing no internet connection
Could a proxy server be blocking it or is this more likely the companies firewall?
When my software starts it checks if there is an internet connection using the following:
Code:
Public Function IsConnectionAvailable(ByVal site As String) As Boolean
If site = "Y" Then
site = "http://www.mysite.com"
End If
Dim objUrl As New System.Uri(site)
Dim objWebReq As System.Net.WebRequest
objWebReq = System.Net.WebRequest.Create(objUrl)
Dim objResp As System.Net.WebResponse
Try
objResp = objWebReq.GetResponse
objResp.Close()
objWebReq = Nothing
Return True
Catch ex As Exception
objWebReq = Nothing
Return False
End Try
End Function
Re: App cant connect to Internet when running on a network - Is this a proxy or Firew
Well, it's not a proxy! It could well be the firewall in which case you'll need to get the network administrator involved or it could be some entirely unrelated security measures in which case you'll need to get the network administrator involved. In other words its very unlikely to be anything over which you have any control so I'd get the .... well, you can fill in the rest.
Re: App cant connect to Internet when running on a network - Is this a proxy or Firew
thanks for the info - was thinking i'd have to modify the webrequest for proxy use
Re: App cant connect to Internet when running on a network - Is this a proxy or Firew
No that would only be the case if you wanted to connect exclusively through a proxy of your choice. At this level an internet connection is an internet connection is an internet connection. You couldn't possibly take account of every possible proxy that every possible user might happen to use.
Re: App cant connect to Internet when running on a network - Is this a proxy or Firew
it's something to discuss with the network admin... if a single person is having this issue, and no one else on the same network is... then it could be something with the client (host file springs to mind) ... or if everyone on the same network has the problem, then it could be the firewall... it's possible, depending on the environment that the network admin has to whitelist sites before anyone can visit them (yes, such draconian measures do exist) if the site you are trying to access isn't on the approved whitelist, any requests for it are not going to go anywhere.
-tg
Re: App cant connect to Internet when running on a network - Is this a proxy or Firew
Are all of the devices on one network?
Re: App cant connect to Internet when running on a network - Is this a proxy or Firew
This is a new customer - first PC they have tried to run the software on
They've asked for the website IP the software connects to so they can add it to their firewall
I'm now awaiting their reply
Re: App cant connect to Internet when running on a network - Is this a proxy or Firew
I had the client change the LAN settings to disable the proxy settings and set it to Automatically Detect Settings
The app now trys to connect but shows the following:
http://i48.tinypic.com/umyk9.jpg
I'm still wondering if i should change my webrequest to detect proxy settings or does this confirm it is the firewall?
Re: App cant connect to Internet when running on a network - Is this a proxy or Firew
Neither. This is Windows telling you that it would prefer you to use a secure connection if you're sending passwords or other sensitive details. It's a warning rather than a forbiddance (is that a word, doesn't look right, oh well, you know what I mean).