0

I am trying to upload a file to an application i have built using the AsyncFileUpload part of the AjaxToolKit. The file is a 50mb ZIP file, when uploading i receive the following popup:

enter image description here

When i click OK i get the following box

enter image description here

If i then go into Developer tools i get the following error message in the console tab of chrome

The value for Content Security Policy directive 'object-src' contains an invalid character

The value for Content Security Policy directive 'object-src' contains an invalid character

Any help would be appreciated

ccStars
  • 817
  • 2
  • 11
  • 34
  • you didn't show any code but I'd guess maybe your filename contains non-ASCII characters, and is being passed on the querystring, and wasn't URL-encoded before sending it. – ADyson Jan 10 '18 at 10:53
  • The Filename is Berlingo.zip – ccStars Jan 10 '18 at 10:56
  • Check to be sure you're not passing any invalid hidden characters or something like that. Maybe there are other things you need to test too, I don't know. There's nothing anyone here can do to help you debug since you didn't provide any code or data. – ADyson Jan 10 '18 at 11:08
  • Can you check please the attribute value of `object-src` right before the uploading? – MikhailTymchukDX Jan 10 '18 at 12:29
  • @MikhailTymchukDX i had a look in developer tools but i am not sure where i can find if the object-src attribute is being set – ccStars Jan 10 '18 at 13:29
  • When I made the zips files smaller in size to around 25mbs the files uploaded, has anyone got any ideas why I get this error when the file is 50mbs is it to do with the request size – ccStars Jan 11 '18 at 07:54
  • 1
    @ccStars I successfully uploaded a 67Mb zip file simply by modifying Web.config: https://stackoverflow.com/a/3853785/644496 – MikhailTymchukDX Jan 11 '18 at 14:21
  • @MikhailTymchukDX you last post was the answer could you repost and ill mark it as correct – ccStars Jan 11 '18 at 14:46

1 Answers1

1

It looks like you need to modify your Web.config like in this answer:

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="1048576" />
    </system.web>
</configuration>

or for IIS 7 or later:

 <system.webServer>
   <security>
      <requestFiltering>
         <requestLimits maxAllowedContentLength="1073741824" />
      </requestFiltering>
   </security>
 </system.webServer>