Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
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 
QuestionBest place to start? Pin
richforall30-Jun-09 18:57
richforall30-Jun-09 18:57 
AnswerRe: Best place to start? Pin
Niladri_Biswas30-Jun-09 20:34
Niladri_Biswas30-Jun-09 20:34 
AnswerRe: Best place to start? Pin
Blikkies30-Jun-09 22:41
professionalBlikkies30-Jun-09 22:41 
GeneralRe: Best place to start? Pin
PIEBALDconsult1-Jul-09 5:21
mvePIEBALDconsult1-Jul-09 5:21 
Questiondisplay a form inside a web browser Pin
tanweer30-Jun-09 17:28
tanweer30-Jun-09 17:28 
AnswerRe: display a form inside a web browser Pin
Christian Graus30-Jun-09 18:33
protectorChristian Graus30-Jun-09 18:33 
AnswerRe: display a form inside a web browser Pin
dojohansen30-Jun-09 23:31
dojohansen30-Jun-09 23:31 
Questionfree faling picture box Pin
tanweer30-Jun-09 17:16
tanweer30-Jun-09 17:16 
AnswerRe: free faling picture box Pin
Christian Graus30-Jun-09 18:33
protectorChristian Graus30-Jun-09 18:33 

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.