|
Indeed; this is what I explained, but thanks for the disassembly to prove it.
Just one tip: Wrap your code in <pre></pre> tags and it will make a world of difference for readability!
|
|
|
|
|
|
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();
}
|
|
|
|
|
HTTP Error 503 means that the server is unable to handle the requests for some reason. This might be overloading or just an internal server setting that automatically refuses requests after a certain amount of requests in a certain timespan...
Maybe you should place some delay between your requests? Just an idea..
Phil
I won’t not use no double negatives.
|
|
|
|
|
I agree. I think the server is protecting itself against what could be deniel of service attacks as the requests are comming in so fast from the same IP.
I had similar issues a while back, when I was making a program to mine player stats from Blizzards Armory, and some delay did the trick for me.
|
|
|
|
|
Because I am using a Foreach loop and the flood control starts to happen while in my first foreach, how would you go about adding a delay?
I was toying with this thought last night and the best I could come up with was to create some type of a counter and then use the timer to call the web service, stepping through the the counter while I do that.
|
|
|
|
|
Thread.Sleep(yourInterval) after each loop for example...
I won’t not use no double negatives.
|
|
|
|
|
Hi
I am creating an Windows Application (C# Visual studio 2005) for Billing System
in that i want to enter the fields(Product name,price,unit price, total) in GridView Control.... Please guide me how to enter the data in Gridview control
Thanks in advance
|
|
|
|
|
Show the grid view with one blank row and then add one by one row if user press enter key in last one column of last row
For validation use onEdit and OnEndEdit events...
Best Regards,
Chetan Patel
|
|
|
|
|
Do you mean you want to bind the grid to some datasource?
If this is the case, then get the source of the data and bind to the grid.
e.g.
Say I have a datatable(dtBilling) as my datasource and my gridview name is dgBilling.
DataTable dtBilling = new DataTable();
dtBilling.Columns.Add("Product Name");
dtBilling.Columns.Add("Price");
dtBilling.Columns.Add("Unit Price");
dtBilling.Columns.Add("Total");
dtBilling.Rows.Add("Prod1", "100", "2.50", "250");
dtBilling.Rows.Add("Prod1", "200", "3.50", "3250");
dtBilling.Rows.Add("Prod1", "300", "4.50", "450");
dtBilling.Rows.Add("Prod1", "400", "5.50", "550");
if (dtBilling.Rows.Count > 0)
{
dgBilling.DataSource = dtBilling;
}
Hope this helps.
But to be honest, the question does not seem to be very clear to me.
Please let me know placidly, if you are looking a solution for this kind of problem or different!
Niladri Biswas
|
|
|
|
|
Hello,
I have registered one com dll and use it in my program.
When i create object of the class in com dll it shows one installation window and takes few times. still it works ok. but i want to shop showing the installation window.
I want to know the reason why this window is shown when it creates an object.
Best Regards,
Chetan Patel
|
|
|
|
|
Im intersted in teaching myself programing. Ive heard that c# is a good place to start. although everything ive read is way over my head. I need a first steping stone. Any help would be greatly appreciated. thank you
|
|
|
|
|
I believe that programming is something that can be learnt by practicing at least at the beginning .
Obviously, you need stuff to learn the new syntaxes, then the best practice to be followed, the way of writing, but above all it's the practice that matters.
Pick up any good book, mainly meant for beginners, practice the exercise probs, solve variety of programs, get a good grasp on the basic features like loop, switch, ternary operator, arrays, files, datastructures(list, dictionaries etc.)etc.,
Try to solve questions in the CodeProject forums and keep on till you feel comfortable in the basic levels.
Then move on to the next level.
Hope you will be comfortable within a time span of 6 months from now.
Niladri Biswas
|
|
|
|
|
Hey
C# is not a bad language to start with but i think vb would be much easier for beginners.
|
|
|
|
|
Blikkies wrote: vb would be much easier
But it leaves them stunted. Avoid the "easy" route.
|
|
|
|
|
hello to all
i m trying to display a windows form inside a web browser placed in a form
how it will possible to me
please help me
thanks
|
|
|
|
|
You can display a form anywhere you like. If you want your form to be limited to show inside your web browser control, write a form that is given screen bounds and does not allow itself to be moved outside them.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Just out of curiosity: What inspired this winform in a browser in a winform design decision?
|
|
|
|
|
hello to all
i m a BS final year student i m having a problem with my project
i m unable to free fall the picture box from top to bottomm of the windows form i m using C#
can please anybody help me ?
|
|
|
|
|
Final year you say ? This is pretty trivial. I'd say that I would not use a picture box for this, but you can. Just set a timer, and modify the top property on the control, so that it moves down the form.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
i have QR barcode decoder.the barcode string will be the computer user password. i need to replace my application with windows login form. how can i do that....any one just guide me please.....
A S E L A
|
|
|
|
|
You want the barcode code that you are finding impossible to make work, to be how people log in to your machine ?
From memory, gina.dll is the file that you need to replace to change how windows logs in. but, you should google for more info. I doubt it can be written in C#, probably only C++
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
actually happening is i got user & password form. so username take from windows. for the password user going to scan the barcode.so the barcode string pass as the password. once password tbx got a string application need to compair password and user name with windows username and password. if match user will able to login.
so how can i pass username and password to the windows and compair with windows password & username...??
i tried so many on google. all only to read user logon username or replace user logon username and password...
any guide for this pleae....
and how can i run the application befor logon....i mean replace with windows logon.
A S E L A
|
|
|
|
|
how can access variables in WebService..throw the object that created from it..
|
|
|
|
|
alex, Post the code here... thats so much!!!
|
|
|
|