Author Topic: Debugging in Visual Studio hangs  (Read 7521 times)

Offline Wizard!

  • Newbie
  • *
  • Posts: 11
Debugging in Visual Studio hangs
« on: November 15, 2010, 09:45:51 AM »
Hello everybody  :)

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:

Code: [Select]
           Dim MyWebClient As WebClient = New WebClient()
            Dim ur As New Uri("http://my.testserver.com/")

            With MyWebClient
                With .Headers <-- IT HANGS IN THIS LINE!!!!
                    .Add("Connection", "keep - alive")
                    .Add("Keep-Alive", "115")
                    .Add("Accept", "text/html,image/jpg")
                    .Add("Accept-Charset", "ISO-8859-1,utf-8;")
                    .Add("Accept-Encoding", "gzip,deflate")
                End With

                AddHandler .DownloadDataCompleted, AddressOf DownloadDataCallback
                .DownloadDataAsync(ur)
            End With

Any ideas?

edit: I have to add that both VS2010 and the debugging process (devenv.exe & IntelliTrace.exe) are trusted files in both fw & d+
« Last Edit: November 15, 2010, 09:52:52 AM by Wizard! »

Offline EricJH

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 19721
Re: Debugging in Visual Studio hangs
« Reply #1 on: November 15, 2010, 06:38:11 PM »
Try giving both files the Installer/Updater policy  in D+.

Offline Wizard!

  • Newbie
  • *
  • Posts: 11
Re: Debugging in Visual Studio hangs
« Reply #2 on: November 16, 2010, 03:18:30 AM »
Nope... Unfortunately I have the same behavior...  :-\

Offline EricJH

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 19721
Re: Debugging in Visual Studio hangs
« Reply #3 on: November 16, 2010, 11:13:45 AM »
« Last Edit: November 17, 2010, 11:59:03 AM by EricJH »

Offline Wizard!

  • Newbie
  • *
  • Posts: 11
Re: Debugging in Visual Studio hangs
« Reply #4 on: November 17, 2010, 04:44:34 AM »
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

Offline EricJH

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 19721
Re: Debugging in Visual Studio hangs
« Reply #5 on: November 17, 2010, 01:00:14 PM »
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.

Offline Wizard!

  • Newbie
  • *
  • Posts: 11
Re: Debugging in Visual Studio hangs
« Reply #6 on: November 18, 2010, 03:46:39 AM »

Offline WxMan1

  • Comodo's Hero
  • *****
  • Posts: 606
Re: Debugging in Visual Studio hangs
« Reply #7 on: November 19, 2010, 08:21:17 AM »
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.

 

Seo4Smf 2.0 © SmfMod.Com | Smf Destek