2

My application run on a citrix server and the port 80 is close.

In the application, the first time i try to read a setting or a resources, two HTTP request start, since the port is close, it take 30 seconds before the application continue. After that i can read setting without any request.

These are the two request akamai-112.120.cache.videotron.ca and akamai-144.120.cache.videotron.ca

Exemple code:

System.IO.StreamWriter file = new System.IO.StreamWriter("c:\\test.txt");
file.WriteLine("Before Properties: " + DateTime.Now.ToString());

var chemin = Properties.Settings.Default.workingdirectory;

file.WriteLine("After Properties: "  + dateTime.Now.ToString());
file.Close();

In test.txt, there's 30 secondes between BEFORE and AFTER. I have no idea what cause that.

Anybody have a clue?

Thanks!

dsh
  • 12,037
  • 3
  • 33
  • 51
  • Did you try to use a progiler and step into `workingDirectory` to see what makes it slower? If it shows you just `clr` or something in the profiler try to use `procmon` on this process and see what is it doing when this line occurs. – Tamir Vered Sep 24 '15 at 17:30
  • Hi Some1Pr0, workingDirectory is a variable in the settings. I just read a string value. – Steve Dufresne Sep 24 '15 at 17:34
  • I know but if it is a property it has a getter and than maybe it gets it from a file which might be locks/i dont know what, but you say that like takes 30 seconds so something else happens there. – Tamir Vered Sep 24 '15 at 17:48
  • I've find the getter and it just return the value. Thanks. – Steve Dufresne Sep 24 '15 at 18:32
  • If you are debugging at the assembly level is there any instruction ehich takes really long? – Tamir Vered Sep 24 '15 at 18:33

1 Answers1

0

I've found the reason here

i've add in my app.config, in the runtime section

generatePublisherEvidence enabled="false"

It stop making http request.

Community
  • 1
  • 1