file size upload limitation in ASP.NET MVC: more than 1 maxRequestLength setting in web.config(s)

前端 未结 1 970
有刺的猬
有刺的猬 2020-12-30 04:28

I\'d like to have more than 1 setting for maxRequestLength - file size upload limitation (e.g. one for File/New, other for Picture/New). All of my Actions take additional pa

1条回答
  •  时光说笑
    2020-12-30 04:47

    I believe the Path attribute shouldn't start or end with a "/" - so you should have:

    
      
        
      
    
    
      
        
      
    
    

    Your virtual or physical directory–level Web.config's shouldn't have the elements.

    That should sort you out.

    The docs for the Location element even have this very example:

    The following code example demonstrates how to set the uploaded file size limit to 128 KB for only the page specified.

    
      
        
          
        
      
    
    

    0 讨论(0)
提交回复
热议问题