Troubleshooting replacement of HtmlINputFile with InputFile

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Troubleshooting replacement of HtmlINputFile with InputFile

Larry Brindise

I have a project that was using the standard .NET HtmlInputFile control.  It works great except for the obvious file size/memory limitations.  It is on a form that has a couple drop-down listboxes that post back to the server on a change event.  There are also validation controls, etc.

I replaced the HtmlInputFile control with the InputFile (v1.0.13) as instructed in the install doc.  I think I did everything correctly as the demo.aspx works.  I also referenced both dll's in my project as I mentioned in a previous post.

Now, when the user navigates to my form, "newfile.aspx", the browser stays white and never draws any of the controls.  CPU utilization is 0%, so I don't know what it's waiting for.  In order to debug this, I removed the httpModules entry in web.config to find where the problem is.  The results are different, but still not as desired...

Now, when a postback occurs due to the selection of an entry in one of the drop-down lists or clicking the image button

(which incidentally is rendered as:

<input type="image" name="NewAttachBtn" onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " language="javascript" id="NewAttachBtn" title="Click to upload file." ONMOUSEOUT="this.src='Images/accept.gif'" ONMOUSEOVER="this.src='images_ovr/accept.gif'" src="Images/accept.gif" alt="Upload File" border="0" />

...I don't know if this is a problem since it's not a hyperlink, but it's not an input type="submit", either...it does a postback to the page, so I think it should be ok...)

the form immediately returns with "Cannot find server" in the browser title, and the world-famously-helpful "The page cannot be displayed" message in the browser window.

It doesn't appear that the InputFile is a direct replacement for HtmlInputFile even if the UploaHttpModule is removed from web.config.

Anyway, I will greatly appreciate any input.  Please be verbose<G>!

Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting replacement of HtmlINputFile with InputFile

Dean Brettle
Administrator
Regarding the first problem, upgrading the latest development snapshot might help since you are doing form validation.  Regarding the "Cannot find server / page cannot be displayed" error, I'm wondering whether the problem is somewhere else on the page or perhaps with your network connectivity.  If you're confident it isn't a connectivity issue, can you send me (dean at brettle dot com) the aspx and aspx.cs files for the page?

--Dean
Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting replacement of HtmlINputFile with InputFile

Larry Brindise

I don't know what hosed-up my machine at that time, but I found a couple external web sites acting strangely like that too.  So I concluded there was something messed in my ip stack (?) so I rebooted.  After reboot, the problem continued to happen until I re-entered:


 <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule,Brettle.Web.NeatUpload"/>

in web.config.  Then, it magically worked...I don't know why...

I have since implemented the 116 update and have not tested it yet because I am in the middle of a bunch of other changes in the same project.  Don't worry, I'll let you know if I have a problem ;)