Problem with HtmlInputFile and proxy

I

ian

Hello,
I have a small test.aspx page with an HtmlInputFile class instance and
an imagebutton. When I run this on our proxy server and click the save
imagebutton I get the "Page cannot be displayed" error screen.
I'm not sure how to fix this because it doesn't happen all the time.
The weird thing is that if I make it a button instead of an image it
works fine. OR if I delete the image (/images/save.jpg) then it works
also.
It doesn't seem to work with the images and HtmlInputFile together on
the proxy server. Has anyone experienced this? How can I fix it to
work with the images?

Here is part of my web.config:
<system.web>
<httpRuntime maxRequestLength="40960" executionTimeout="900"/>
</system.web>


I enabled logging in IIS and here is part of the file:
#Software: Microsoft Internet Information Services 5.0
#Version: 1.0
#Date: 2005-10-26 20:36:06
2005-10-26 20:36:06 ... POST /eses/interface/test.aspx - 200 0 1022
1359 0 HTTP/1.0 ....
2005-10-26 20:36:11 ... POST /eses/interface/test.aspx - 200 0 1022
1198 0 HTTP/1.0 ....
2005-10-26 20:36:11 ... GET /images/save.jpg - 304 0 164 594 0 HTTP/1.0
.....


And here is my test code:
<%@ Page language="c#" Codebehind="test.aspx.cs"
AutoEventWireup="false" Inherits="eses.Interface.test" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Default</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Default" method="post" runat="server"
enctype="multipart/form-data">
<Input ID="FileUpload" type="file" runat="server">
<asp:ImageButton id="ibSave" runat="server"
ImageUrl="../../images/save.jpg"></asp:ImageButton>
</form>
</body>
</HTML>



using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace eses.Interface
{
/// <summary>
/// Summary description for test.
/// </summary>
public class test : System.Web.UI.Page
{
protected System.Web.UI.WebControls.ImageButton ibSave;
protected System.Web.UI.HtmlControls.HtmlInputFile FileUpload;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.ibSave.Click += new
System.Web.UI.ImageClickEventHandler(this.ibSave_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void ibSave_Click(object sender,
System.Web.UI.ImageClickEventArgs e)
{
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top