|
Hello!
Is there anything something like HttpWebRequest.Close(), but in .NET 2.0?
What's it for? I need to close HttpWebRequest. I know that when I am creating new HttpWebRequest .NET keeps the connection, but is there any way to close it?
|
|
|
|
|
You may set Connection property = "Close"
Calin
|
|
|
|
|
Yes I can, but I get exception:
System.ArgumentException: Keep-Alive and Close may not be set with this property.
But I found this:
"The "ArgumentException" will be thrown if we directly set the Connection to "Close" or "Keep-Alive". And after some further dig into the HttpWebRequest's code, I think we should use the "KeepAlive" property instead of the "Connection" property to set the Connection header. For example:
use webrequest.KeepAlive = false;
use webrequest.KeepAlive = true;
And that's it!
I forgot that KeepAlive is set to 'true' as default So when I've changed it to 'false' the connection is closing while the request and response is handled
Thank you very much ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Yeah, KeepAlive solves the problem.
No problem.
Calin
|
|
|
|
|
I found another solution.
In fact it closes all connections that are in HttpWebRequest's connectionGroup but it is that what we are looking for
So, you can do it like this:
wreq.ServicePoint.CloseConnectionGroup(wreq.ConnectionGroupName);
I think you can use it instead setting KeppAlive to false
Of course we are talking about .NET 2.0. In 3.5 this is not a problem at all.
--
Greg Kozlowski
|
|
|
|
|
|
No-one can tell you, since there aren't any people here that can read your mind. What's the "handwriting interpret" library called?
Once you found this name, prepare to give answers to questions such as;
- Where's the code you tried on this library
- What error-description did the library return
- What color does an apple have?
I are troll
|
|
|
|
|
|
first the reason i sorta went with the one I posted the neural net is a little to complex for me as i am just a beginner.
second um theres not "handwriting interpet" lib its just whats on that site.
|
|
|
|
|
Mea culpa, I misread and have a bad temper. Bad excuse, I know
The Neural Network could easily be trained well, or read this[^] article about using the Office-component for OCR.
I are troll
|
|
|
|
|
Mea culpa, I misread and have a bad temper. Bad excuse, I know
The Neural Network could easily be trained well, or read this[^] article about using the Office-component for OCR.
I are troll
|
|
|
|
|
well i am not shure if that would work i am working on a program for a touch a tablet pc and instead of using a virtual keyboard i whant to beable to write on screen and it figure it out + i sorta dont have office
i think the problem with the 1 i posted is
private void pictureBox1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
is right there e doesnt seem to return any info.
|
|
|
|
|
Ronin114 wrote: e doesnt seem to return any info
So the picturebox does fire the event when you move the mouse? What do you mean by "no info", does e equal "null"?
I are troll
|
|
|
|
|
well win i move the mouse it does nothing i have hookd e.x and e.y to a textbox and they return 0
|
|
|
|
|
hi.. i need database design for 2way sms thru modem..please help me
|
|
|
|
|
It's useless to stand in a street and fill a sentence or two with keywords, waiting for an answer - unless you want to talk to God.
Back to your question; there isn't a default design for handling 2-way sms. In fact, you can send and receive messages without using a database. So, if your specs say that a database is needed, ask yourself "why".
What facts are you going to store in that database? Make a list, please - then search Google or CP for "normalization principles", and convert your list to a design.
I are troll
|
|
|
|
|
|
|
I have to add the facilities of adding water mark on video files.
I am developing my application in c#.
any body help me for the same.
Thanks In advance.
|
|
|
|
|
You need to reencode the video and overlay the watermark on it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Can u please elaborate on it?? ![Frown | :(](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_frown.gif)
|
|
|
|
|
Wow - this is an old question. You need to reprocess the video, and put the watermark on top. That's if you want a video file to contain a watermark, you need to put it there. If you just want to SHOW it with an overlay, you can play it using WPF.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Ya this is an old question.
I am actually new to this, so i don't know about reprocessing and putting some watermark on it...
If u can guide me on this with some example...it will be really helpful..
![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
As previously noted, I don't do anything close to this, any more. I'm sure there's ways of doing it now that did not exist when I was looking in to it, but I'd be googling for you, I'm sure you can do that.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|