Click here to Skip to main content
15,901,666 members
Home / Discussions / C#
   

C#

 
GeneralRe: When the finally code is executed? Pin
dojohansen30-Jun-09 22:54
dojohansen30-Jun-09 22:54 
GeneralRe: When the finally code is executed? Pin
musefan30-Jun-09 23:08
musefan30-Jun-09 23:08 
GeneralRe: When the finally code is executed? Pin
dojohansen30-Jun-09 23:26
dojohansen30-Jun-09 23:26 
GeneralRe: When the finally code is executed? Pin
J4amieC30-Jun-09 23:45
J4amieC30-Jun-09 23:45 
GeneralRe: When the finally code is executed? Pin
dojohansen1-Jul-09 0:40
dojohansen1-Jul-09 0:40 
GeneralRe: When the finally code is executed? Pin
musefan1-Jul-09 0:55
musefan1-Jul-09 0:55 
GeneralRe: When the finally code is executed? Pin
musefan1-Jul-09 2:08
musefan1-Jul-09 2:08 
GeneralRe: When the finally code is executed? Pin
J4amieC1-Jul-09 2:12
J4amieC1-Jul-09 2:12 
GeneralRe: When the finally code is executed? Pin
musefan1-Jul-09 2:19
musefan1-Jul-09 2:19 
GeneralRe: When the finally code is executed? Pin
dojohansen1-Jul-09 5:44
dojohansen1-Jul-09 5:44 
GeneralRe: When the finally code is executed? Pin
dojohansen1-Jul-09 5:37
dojohansen1-Jul-09 5:37 
GeneralRe: When the finally code is executed? Pin
dojohansen1-Jul-09 5:59
dojohansen1-Jul-09 5:59 
AnswerRe: When the finally code is executed? Pin
dojohansen30-Jun-09 22:25
dojohansen30-Jun-09 22:25 
AnswerRe: When the finally code is executed? Pin
Fired.Fish.Gmail1-Jul-09 0:39
Fired.Fish.Gmail1-Jul-09 0:39 
GeneralRe: When the finally code is executed? Pin
dojohansen1-Jul-09 0:43
dojohansen1-Jul-09 0:43 
GeneralRe: When the finally code is executed? Pin
Fired.Fish.Gmail1-Jul-09 0:46
Fired.Fish.Gmail1-Jul-09 0:46 
QuestionTrouble with making multiple httpWebRequest "Get"'s to a webservice in a short time Pin
nineismine30-Jun-09 20:39
nineismine30-Jun-09 20:39 
I have the following code set up to iterate through an array making an http get request on each loop. The trouble I am having is that after about the 9th queue I start to get 503 : Errors from the server. Am I doing something wrong? This currently runs on a timer than runs every 5 seconds. I did alot of reading on this over the last couple days and it appears that I am properly reusing the objects, doing a netstat -an from my machine shows only one connection to the server, but I am essentially doing 17 http Gets every 5 seconds.


foreach (Queue queue in Queues)
        {
            try
            {

                string uri = "myProvider/com.broadsoft.xsi-actions/v1.0/user/" + queue.Number + "/queue";
                XmlDocument xmlDoc = new XmlDocument();
                HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri);
                webRequest.Credentials = new NetworkCredential("MyUser", "MyPass");

                webRequest.Timeout = 5000;
                webRequest.UserAgent = ".NET Framework Test Client";

                HttpWebResponse wResponse = (HttpWebResponse)webRequest.GetResponse();

                using (StreamReader responseStream = new StreamReader(wResponse.GetResponseStream()))
                {

                    xmlDoc.Load(responseStream);
                    StringBuilder aHttpCallXmlOutL = new StringBuilder();
                    string tempString;
                    while ((tempString = responseStream.ReadLine()) != null) { aHttpCallXmlOutL.Append(tempString + "\r\n"); }
                    responseStream.Close();
                    wResponse.Close();
                }

AnswerRe: Trouble with making multiple httpWebRequest "Get"'s to a webservice in a short time Pin
Philip.F30-Jun-09 20:49
Philip.F30-Jun-09 20:49 
GeneralRe: Trouble with making multiple httpWebRequest "Get"'s to a webservice in a short time Pin
kstls30-Jun-09 22:50
kstls30-Jun-09 22:50 
GeneralRe: Trouble with making multiple httpWebRequest "Get"'s to a webservice in a short time Pin
nineismine1-Jul-09 2:29
nineismine1-Jul-09 2:29 
GeneralRe: Trouble with making multiple httpWebRequest "Get"'s to a webservice in a short time Pin
Philip.F1-Jul-09 3:18
Philip.F1-Jul-09 3:18 
QuestionData Entry in GridView Control Pin
Mads11530-Jun-09 20:08
Mads11530-Jun-09 20:08 
AnswerRe: Data Entry in GridView Control Pin
Chetan Patel30-Jun-09 20:15
Chetan Patel30-Jun-09 20:15 
AnswerRe: Data Entry in GridView Control Pin
Niladri_Biswas30-Jun-09 20:23
Niladri_Biswas30-Jun-09 20:23 
QuestionError occure while creating Object of COM dll Pin
Chetan Patel30-Jun-09 19:55
Chetan Patel30-Jun-09 19:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.