0

The line var request = WebRequest.Create(reqURI); freezes my application on some computers, but not on all (the application works perfectly fine on all dev machines). The CPU load rises and the application starts to allocate more and more memory (I stopped it on one test machine, where it grew from 10MB to over 12GB in one hour). Has anyone of you ever experienced something like this? I do not get any kind of error message and I do not have any way to debug this line. reqURI is of type string.

Any ideas welcome!

string reqURI = "http://my.local.net/my/resource";
WebRequest request;

try
{
    MessageBox.Show("Before Create", "DEBUG", MessageBoxButtons.OK, MessageBoxIcon.Information); // This message box will be shown!
    request = WebRequest.Create(reqURI);
}
catch (Exception err)
{
    MessageBox.Show(err.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); // Unfortunately, no error seems to be thrown
    return;
}

MessageBox.Show("After Create", "DEBUG", MessageBoxButtons.OK, MessageBoxIcon.Information); // This message box will not be shown!
Maru
  • 894
  • 1
  • 12
  • 29
  • Have you profiled to find out the memory related issue? – Sarvesh Mishra Aug 30 '16 at 11:17
  • Profile how and what? As soon as I install Visual Studio, the bug disappears. But we cannot install VS on 70 computers just for one little application to work – Maru Aug 30 '16 at 11:18
  • 1
    http://stackoverflow.com/questions/3927/what-are-some-good-net-profilers Install a trial on one of them and profile it. – Sarvesh Mishra Aug 30 '16 at 11:24

0 Answers0