Click here to Skip to main content
15,903,201 members
Home / Discussions / C#
   

C#

 
GeneralRe: fast write txt file Pin
Dave Kreskowiak23-Feb-10 6:55
mveDave Kreskowiak23-Feb-10 6:55 
GeneralRe: fast write txt file Pin
AlexB4723-Feb-10 21:02
AlexB4723-Feb-10 21:02 
GeneralRe: fast write txt file Pin
Thomas Krojer23-Feb-10 21:59
Thomas Krojer23-Feb-10 21:59 
GeneralRe: fast write txt file Pin
Dave Kreskowiak24-Feb-10 2:07
mveDave Kreskowiak24-Feb-10 2:07 
AnswerRe: fast write txt file Pin
Eddy Vluggen23-Feb-10 6:39
professionalEddy Vluggen23-Feb-10 6:39 
GeneralRe: fast write txt file Pin
OriginalGriff23-Feb-10 8:31
mveOriginalGriff23-Feb-10 8:31 
GeneralRe: fast write txt file Pin
AspDotNetDev23-Feb-10 12:20
protectorAspDotNetDev23-Feb-10 12:20 
QuestionSelecting outgoing addredd in HttpWebRequest [SOLVED] Pin
Dimitri Witkowski23-Feb-10 2:36
Dimitri Witkowski23-Feb-10 2:36 
Hello to everyone!

I'm trying to implement selection of outgoing IP address in HttpWebRequest.. I've found this piece of code:
C#
  HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
  request.ServicePoint.BindIPEndPointDelegate = new BindIPEndPoint(Bind);

static IPEndPoint Bind(ServicePoint servicePoint, IPEndPoint remoteEndPoint, int retryCount) {
    IPAddress address = IPAddress.Parse("192.168.1.6");
    return new IPEndPoint(address, 8888);
}


Everything is ok but only for the first time. When I create the second HttpWebRequest to the same uri, Bind(...) is not called. Is there any workaround?

Thanks in advance.

== update ==
I have solved it. If anyone is interested, you need to add the code:
request.KeepAlive = false;
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
modified on Tuesday, February 23, 2010 9:24 AM

Questiontext to speech Pin
Aillish23-Feb-10 2:11
Aillish23-Feb-10 2:11 
AnswerRe: text to speech Pin
Dave Kreskowiak23-Feb-10 3:57
mveDave Kreskowiak23-Feb-10 3:57 
GeneralRe: text to speech Pin
Aillish23-Feb-10 16:13
Aillish23-Feb-10 16:13 
GeneralRe: text to speech Pin
Dave Kreskowiak24-Feb-10 2:05
mveDave Kreskowiak24-Feb-10 2:05 
AnswerRe: text to speech Pin
Abhinav S23-Feb-10 7:57
Abhinav S23-Feb-10 7:57 
AnswerRe: text to speech Pin
Ravi Bhavnani24-Feb-10 7:49
professionalRavi Bhavnani24-Feb-10 7:49 
Questionimage path problem Pin
Mogamboo_Khush_Hua23-Feb-10 0:09
Mogamboo_Khush_Hua23-Feb-10 0:09 
AnswerRe: image path problem Pin
Richard MacCutchan23-Feb-10 1:21
mveRichard MacCutchan23-Feb-10 1:21 
GeneralRe: image path problem Pin
Mogamboo_Khush_Hua23-Feb-10 2:11
Mogamboo_Khush_Hua23-Feb-10 2:11 
GeneralRe: image path problem Pin
Richard MacCutchan23-Feb-10 6:18
mveRichard MacCutchan23-Feb-10 6:18 
AnswerRe: image path problem Pin
kevinnicol23-Feb-10 2:20
kevinnicol23-Feb-10 2:20 
GeneralRe: image path problem Pin
Mogamboo_Khush_Hua23-Feb-10 2:59
Mogamboo_Khush_Hua23-Feb-10 2:59 
GeneralRe: image path problem Pin
kevinnicol23-Feb-10 3:20
kevinnicol23-Feb-10 3:20 
GeneralRe: image path problem Pin
Mogamboo_Khush_Hua23-Feb-10 4:30
Mogamboo_Khush_Hua23-Feb-10 4:30 
GeneralRe: image path problem Pin
kevinnicol23-Feb-10 5:03
kevinnicol23-Feb-10 5:03 
Questionvb.net convert to csharp.net Pin
mostafa hamzeh22-Feb-10 23:46
mostafa hamzeh22-Feb-10 23:46 
AnswerRe: vb.net convert to csharp.net Pin
Richard MacCutchan23-Feb-10 0:12
mveRichard MacCutchan23-Feb-10 0:12 

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.