Click here to Skip to main content
15,897,273 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Please help me Urgent Pin
Scott Dorman8-Oct-07 8:46
professionalScott Dorman8-Oct-07 8:46 
AnswerRe: Please help me Urgent Pin
Christian Graus8-Oct-07 13:47
protectorChristian Graus8-Oct-07 13:47 
QuestionDisplay no image binary data Pin
c#ivan8-Oct-07 4:10
c#ivan8-Oct-07 4:10 
AnswerRe: Display no image binary data Pin
Pete O'Hanlon8-Oct-07 9:59
mvePete O'Hanlon8-Oct-07 9:59 
GeneralRe: Display no image binary data Pin
c#ivan8-Oct-07 11:00
c#ivan8-Oct-07 11:00 
AnswerRe: Display no image binary data Pin
Guffa8-Oct-07 12:28
Guffa8-Oct-07 12:28 
GeneralRe: Display no image binary data Pin
c#ivan8-Oct-07 21:22
c#ivan8-Oct-07 21:22 
QuestionFailed to createa a new WinHttpRequest Pin
DKScherpy8-Oct-07 4:08
DKScherpy8-Oct-07 4:08 
I'm stuck and hoping someone else can help.
I'm working on an ASP.NET app (C#). At one point, I need to create an WinHttpRequest object that uploads a file. Here is the code:
<br />
try<br />
{<br />
	WinHttpRequest whr = new WinHttpRequest();<br />
	whr.SetTimeouts( 0, 0, SendTimeout, ConnectTimeout );<br />
	whr.Open( "POST", (( this.IsProduction ) ? LIVE_URL : DEV_URL), false );<br />
	whr.SetRequestHeader( "ENCTYPE", "multipart/form-data" );<br />
	whr.SetRequestHeader( "Name", "FileUpload);<br />
	whr.Send( this.UploadFile.ToString() ); // create the content request<br />
	whr.WaitForResponse( ResponseTimeout );<br />
	ResponseText = whr.ResponseText;<br />
        this.UploadFile.Uploaded = ( ResponseText != null && ResponseText.ToUpper().IndexOf( "SUCCESS" ) != -1 ) ? true : false;<br />
}<br />
catch ( Exception ex )<br />
{<br />
	ResponseText = ex.Message;<br />
} // try/catch<br />


But for some reason the code just halts and doesn't come back after the line:
WinHttpRequest whr = new WinHttpRequest();

I've put code in before and after the line to log what is happening and the code up to that point works fine, and then it goes into the new WinHttpRequest and then nothing.

Oh, and it works _some_ of the time in this app and works consistently when the same code is used in other apps.

I am making a lot of new WinHttpRequest objects throughout the code, could that be a problem?

Any ideas or leads would be very helpful. Thanks in advance.
QuestionPbm: sqlexpress Pin
Priya S8-Oct-07 3:49
Priya S8-Oct-07 3:49 
AnswerRe: Pbm: sqlexpress Pin
Dhyanga13-Oct-07 20:32
Dhyanga13-Oct-07 20:32 
QuestionForce page to refresh every time Pin
Sohaib_pak8-Oct-07 3:44
Sohaib_pak8-Oct-07 3:44 
QuestionItem Template Data Item Pin
mpavas8-Oct-07 2:43
mpavas8-Oct-07 2:43 
AnswerRe: Item Template Data Item Pin
pmarfleet8-Oct-07 10:46
pmarfleet8-Oct-07 10:46 
Questionhow can i get selected text portion from textarea using Javascript Pin
koolprasad20038-Oct-07 2:27
professionalkoolprasad20038-Oct-07 2:27 
AnswerRe: how can i get selected text portion from textarea using Javascript Pin
mpavas8-Oct-07 2:47
mpavas8-Oct-07 2:47 
Questione-mail Pin
venky4568-Oct-07 2:00
venky4568-Oct-07 2:00 
QuestionRe: e-mail Pin
Eduard Keilholz8-Oct-07 2:18
Eduard Keilholz8-Oct-07 2:18 
AnswerRe: e-mail Pin
venky4568-Oct-07 4:15
venky4568-Oct-07 4:15 
QuestionRe: e-mail Pin
Vasudevan Deepak Kumar8-Oct-07 2:45
Vasudevan Deepak Kumar8-Oct-07 2:45 
AnswerRe: e-mail Pin
venky4568-Oct-07 4:01
venky4568-Oct-07 4:01 
QuestionRegarding Crystal Report Pin
karthiBalu8-Oct-07 1:13
karthiBalu8-Oct-07 1:13 
QuestionDeploying An Application Pin
bhanu123458-Oct-07 1:10
bhanu123458-Oct-07 1:10 
QuestionDropdown in Gridview Pin
Ballita8-Oct-07 0:51
Ballita8-Oct-07 0:51 
AnswerRe: Dropdown in Gridview Pin
Imran Khan Pathan8-Oct-07 1:29
Imran Khan Pathan8-Oct-07 1:29 
GeneralRe: Dropdown in Gridview Pin
Ballita8-Oct-07 1:36
Ballita8-Oct-07 1:36 

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.