This is a migrated thread and some comments may be shown as answers.

Upload not working on prod

1 Answer 133 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Davide
Top achievements
Rank 1
Davide asked on 31 May 2017, 10:24 AM

Hello,

We developed a simple upload functionality which works correctly on test environment but not in prod.

The expected behavior is whenever clicked on "browse", the file being uploaded and written into the RadUploadTemp. Once clicked on "upload" button, the code behind is raised but UpladedFiles collection is empty.

Note that RadUploadTemp has been created automatically and even the zero bytes file name: RadUploadTestFile

The only apparent difference between test and prod seems to be that into prod's web.config this section is missed: 

<configSections>
  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
      <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
        <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
      </sectionGroup>
    </sectionGroup>
  </sectionGroup>
</configSections>

ASPX:

<%-- uploader --%>
<div id="divUploader" runat="server" class="divUploader" visible=' <%# DataBinder.Eval(((IDataItemContainer)Container).DataItem, "uploadervisible") %>'>
    <span class="spText">Restituzione Documentazione</span>
    <a runat="server" class="tooltip" href="javascript:void(0);"
        visible='<%# DataBinder.Eval(((IDataItemContainer)Container).DataItem, "tooltipvisible") %>'
        title='<%# DataBinder.Eval(((IDataItemContainer)Container).DataItem, "tooltiptext") %>'>
        <asp:Image ImageUrl="~/images/icoTooltip.png" runat="server" />
    </a>
    <telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" CssClass="async-attachment" ID="FileUpload"
            HideFileInput="false"  MaxFileInputsCount="1" MultipleFileSelection="Disabled"  CommandName="Upload" CommandArgument='<%# DataBinder.Eval(((IDataItemContainer)Container).DataItem, "iPtAcq") %>'
            AllowedFileExtensions=".pdf"  ControlObjectsVisibility="None">                                     
            <Localization Select="Sfoglia..." />
            <Localization Remove="" />
    </telerik:RadAsyncUpload>
    <asp:Button ID="btnFileUpload" runat="server" CssClass="btnOrangeUpload" Text="Carica" CommandName="Upload" CommandArgument='<%# DataBinder.Eval(((IDataItemContainer)Container).DataItem, "iPtAcq") %>' />
    <%--<asp:FileUpload ID="FileUpload" runat="server" class="file" />--%>
</div>

 

 

Can anyone give a clue how can I check in order to fix this?

Feel free to ask me more details if needed...

Regards.

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 05 Jun 2017, 11:33 AM
Hello Davide,

I am afraid that the provided information is insufficient to determine what is preventing the proper upload of the files. 

Please find attached a sample project that we used to recreate the scenario and is uploading as expected. 

Also, I would recommend reviewing the web.config Settings Overview article to better understand the web.config and the required configurations and handler registrations. 

If the issue is not replicated in the attached project, would you please modify it so that it demonstrates the problem and send it back to us in an official support ticket? Thus, we would be able to investigate locally and help you more efficiently.  

Meanwhile, would you please check if there are any JavaScript errors in the browser console and if there are any failing requests to the server? 

Another thing you could check is if the production project has all the necessary permissions. 

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
AsyncUpload
Asked by
Davide
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or