Neat Upload Code Not Firing

Aug 27, 2013 at 7:20 PM
I'm having an issue with NeatUpload working when placed on a server. Locally I can run the web app and get uploads to work. If I place it on the server and run the app locally (with IIS) uploads will also work. However, if I try to upload files to the server from my local machine, it doesn't work. More so, it doesn't even look like the method that contains the NeatUpload statements is even being called, as none of the debugging statements I've placed in that method are ever called. Web.Config and page code-behind below:

Web.Config
 <?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="Brettle.Web.NeatUpload, Version=1.3.4034.20191, Culture=neutral, PublicKeyToken=DD134EA1C3727369"/>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
      </assemblies>
    </compilation>
    
    <httpRuntime maxRequestLength="1048576"/>
    
    <httpModules>
      <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload" />
    </httpModules>
    
  </system.web>
  
  <system.webServer>
    <modules>
      <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload" preCondition="managedHandler"/>
    </modules>
    
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="1073741824"></requestLimits>
      </requestFiltering>
    </security>

    <validation validateIntegratedModeConfiguration="false"/>
    
  </system.webServer>
</configuration>
Code-Behind
 protected void Page_Load(object sender, EventArgs e)
        {
             uploadBtn.Click += new System.EventHandler(this.uploadBtn_Click);
        }

        protected void uploadBtn_Click(object sender, EventArgs e) //This is the method that doesn't seem to fire.
        {
            errorLbl.Text = "HELLO!";
            if (IsValid && fileHandle.HasFile)
            {

                try
                {
                    string[] split = fileHandle.FileName.Split('.');
                    string extension = "." + split[split.Length - 1];
                    fileHandle.MoveTo(Path.Combine(
                    Request.PhysicalApplicationPath + 
                    "\\Uploads", Guid.NewGuid().ToString()) +
                    extension, MoveToOptions.Overwrite);  
                }
                catch (Exception ex)
                {
                    errorLbl.Text = ex.ToString();
                }
            }
        }
Aug 30, 2013 at 4:46 PM
Problem solved by making a new project and transferring logic over. The auto-wiring must have failed or something.