I am having this problem…: I have an application that uses System.Net.WebClient class in order to fetch data from a remote location. When I am running the application as standalone, having it as trusted in both firewall & defence+, it works fine. However when I am trying to debug it via Visual Studio 2010, as soon as I am trying to use WebClient class, the whole system hangs and I have to terminate the processes. I tried to disable both fw & d+, but unfortunately I had the same results…
The code where it hangs is the code below:
Dim MyWebClient As WebClient = New WebClient()
Dim ur As New Uri("http://my.testserver.com/")
With .Headers <-- IT HANGS IN THIS LINE!!!!
.Add("Connection", "keep - alive")
AddHandler .DownloadDataCompleted, AddressOf DownloadDataCallback
edit: I have to add that both VS2010 and the debugging process (devenv.exe & IntelliTrace.exe) are trusted files in both fw & d+
Try giving both files the Installer/Updater policy in D+.
Nope… Unfortunately I have the same behavior… :-\
No… I put both folders of the applications (VS2010 & my project) in the Buffer Overflow exclusion list, but the behavior remains the same.
ps. your link points to this thread, I had to search for “App. is not working correctly” to find the thread
Thx for pointing out. Fixed the url.
It may be worth a bug report. But I have been away for a couple of weeks and don’t know if anything similar has already been posted.
I’m not understanding what you mean by running it ‘standalone’. You mean running the executable directly? The problem is when you load the solution and begin debugging?
The WebClient object is going to need DNS/RPC accesss name privilege, and then the WebClient is going to need UDP access to DNS via port 53, subsequently it’ll need TCP access via port 80. The former being D+ the latter firewall rules. Moreover, it may need additional D+ rules, i.e., either COM or Pseudo-COM access name access rights.
Since you’re in debug mode there are several differnt components of the VS debugger that are instantiated. I believe if you set the global part of the VS debugger per my explanation in the bug report, a signifiant source of alerts should be mitigated. I think what’s happening is a resource contention, i.e., IP access attempts simultaneously w/CIS alerts. Unfortunately the IP connection attempt is taking priority and until it times out the CIS alerts are stuck in the windows messaging buffer.
If the exe runs by itself, it sounds like the VSHOST for the project needs to have aforementioned privleges.