Click here to Skip to main content
15,915,172 members
Home / Discussions / C#
   

C#

 
GeneralRe: how can i got the version infomation about the sqlsever? Pin
lowiq7-May-04 21:17
lowiq7-May-04 21:17 
GeneralDynamic Event Handling Pin
DustinMiles7-May-04 18:56
DustinMiles7-May-04 18:56 
GeneralRe: Dynamic Event Handling Pin
CWIZO7-May-04 20:57
CWIZO7-May-04 20:57 
GeneralRe: Dynamic Event Handling Pin
kayhustle8-May-04 5:14
kayhustle8-May-04 5:14 
GeneralRe: Dynamic Event Handling Pin
DustinMiles8-May-04 10:58
DustinMiles8-May-04 10:58 
GeneralRe: Dynamic Event Handling Pin
Colin Angus Mackay10-Sep-04 11:55
Colin Angus Mackay10-Sep-04 11:55 
QuestionHow to set background image of treeview? Pin
kookai7-May-04 17:10
kookai7-May-04 17:10 
AnswerRe: How to set background image of treeview? Pin
Dave Kreskowiak7-May-04 17:58
mveDave Kreskowiak7-May-04 17:58 
GeneralRe: How to set background image of treeview? Pin
Heath Stewart8-May-04 19:53
protectorHeath Stewart8-May-04 19:53 
GeneralRe: How to set background image of treeview? Pin
Dave Kreskowiak9-May-04 4:05
mveDave Kreskowiak9-May-04 4:05 
Generalterrain transformation of a 2d image into a 3d Pin
shedid7-May-04 15:36
shedid7-May-04 15:36 
GeneralRe: terrain transformation of a 2d image into a 3d Pin
kayhustle7-May-04 18:00
kayhustle7-May-04 18:00 
GeneralRe: terrain transformation of a 2d image into a 3d Pin
shedid9-May-04 10:26
shedid9-May-04 10:26 
GeneralMS Office Add-In's: Need References... Pin
Tony Archer7-May-04 14:01
Tony Archer7-May-04 14:01 
General<kicks self in head> Pin
Tony Archer7-May-04 14:21
Tony Archer7-May-04 14:21 
GeneralArticles not on Office Add-Ins Pin
Tony Archer7-May-04 15:15
Tony Archer7-May-04 15:15 
GeneralRe: Articles not on Office Add-Ins Pin
Heath Stewart8-May-04 19:52
protectorHeath Stewart8-May-04 19:52 
GeneralRe: Articles not on Office Add-Ins Pin
Tony Archer9-May-04 9:07
Tony Archer9-May-04 9:07 
GeneralRe: Articles not on Office Add-Ins Pin
Heath Stewart9-May-04 9:30
protectorHeath Stewart9-May-04 9:30 
GeneralNullReference Exception in system.dll at System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback Pin
kayhustle7-May-04 13:48
kayhustle7-May-04 13:48 
GeneralRe: NullReference Exception in system.dll at System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback Pin
Heath Stewart8-May-04 19:48
protectorHeath Stewart8-May-04 19:48 
GeneralRe: NullReference Exception in system.dll at System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback Pin
kayhustle10-May-04 20:35
kayhustle10-May-04 20:35 
Well after about 20 hours of trying every possible combination, I found out a way around this. All my requests/responses are in the main thread and I close the HttpWebResponse and the response stream as soon as I get them and I am fine. I managed to first make an initial request which gives a webpage with about 50 links. I make the 50 requests/responses on these links and this works fine. I thought I was good until I tried to repeat the process and it gives me this exception. I dont' get it since I close all the streams and all the async calls return fine. All my HttpWebResponse/Request objects are local variables in a function so they are never reused. When looking at the threads when this exception is thrown I notice that there are two threads that are blocked waiting to read the response stream, ie.
private void ProcessResponse(System.IAsyncResult state){<br />
HttpWebResponse linkpage=(HttpWebResponse)((HttpWebRequest)state.AsyncState ).EndGetResponse(state);<br />
StreamReader stream = new StreamReader(response.GetResponseStream());<br />
string  info = stream.ReadtoEnd();//2 threads blocked here<br />
stream.Close()<br />
response.Close();

You said that getting them without checks is dangerous. What do you mean by a check?
GeneralRe: NullReference Exception in system.dll at System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback Pin
Heath Stewart11-May-04 2:59
protectorHeath Stewart11-May-04 2:59 
GeneralDisplaying long string in tab page label Pin
Flack7-May-04 13:15
Flack7-May-04 13:15 
GeneralRe: Displaying long string in tab page label Pin
leppie7-May-04 13:52
leppie7-May-04 13:52 

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.