How to change message text about hitting file size limit for IIS7

Last post 09-09-2009, 9:08 AM by Mac117. 4 replies.
Sort Posts: Previous Next
  •  09-07-2009, 9:07 AM 55412

    How to change message text about hitting file size limit for IIS7

    Hello
     
    Is there a possibility  to change the message which appears when uploaded file size exceeds IIS limit. Currently I have to limit the file size to 100 Mb so sometimes users get the message
     
    You are probably hitting the file upload limit of IIS7.By default in IIS 7 requestFiltering  has the MaxAllowedContentLength property enabled.It specifies, in bytes, the maximum length of the content in a request. The default is 30MB.

    To change this value you must edit %windir%\System32\inetsrv\config\applicationHost.config file.
     
    How can I change it? FileTooLargeMsg property doesn't work in this case.
     
    Thanks in advance
  •  09-07-2009, 10:24 AM 55418 in reply to 55412

    Re: How to change message text about hitting file size limit for IIS7

    Mac117,
     
    The above message is for developers. Once you set up your IIS correctly, it will not show again.
     
     
    The above message cannot be changed.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-08-2009, 2:54 AM 55432 in reply to 55418

    Re: How to change message text about hitting file size limit for IIS7

    Hello, Adam
     
    I've changed settings in ApplicationHost as you pointed it before, but I'm getting the same message window.
    Please, describe which setting should I do to disable this message box and provide my own.
    The requirement are:
    if user uploads file size of which is greater than limit in IIS config user should get message with our text.

     
    Thank you
  •  09-09-2009, 8:20 AM 55475 in reply to 55432

    Re: How to change message text about hitting file size limit for IIS7

    Hi,
     
    You can use this way :
     
    <script>
     function CuteWebUI_AjaxUploader_OnError(msg)
     {
    if(msg&&msg.indexOf("applicationHost.config")!=-1)
    {
      alert(" OnError : "+msg)
      return false;
     }
    }
    </script>
  •  09-09-2009, 9:08 AM 55478 in reply to 55475

    Re: How to change message text about hitting file size limit for IIS7

    I have set IIS file size limit and set uploader MaxSizeKB smaller than IIS setting.

    In FileTooLargeMsg property I've specified my custom message.
     
    Everything works fine.
     
    Thanks
View as RSS news feed in XML