Como corrigir erro de upload de arquivo grande 404 no IIS | Guia passo a passo. The following error occurs when uploading large files to the website.
Server Error
404 – File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
To enable uploading large files you have to change a setting in IIS.
OBSERVAÇÃO: The limit is approximately 28,6 MB because the limit of maxAllowedContent Length is 30000000 bytes.
To change the maximum upload setting, named “maxAllowedContent Length”, faça o seguinte:
1. Log on to the server that holds the IIS website, e depois cliqueComeçar, cliquePrograms, cliqueAdministrative Tools, cliqueInternet Information Services (IIS) Manager;
2. Expand the website that you want to increase the maxAllowedContent Length;
3. Clique duas vezes noRequest Filtering icon in the main window
OBSERVAÇÃO: if you don’t have the Request Filtering icon, you need to install it through theAdd Roles opção. Get the instructions below.
4. Clique noHidden SegmentAba;
5. Right-click web.config e cliqueEdit Feature Setting;
6. A new window namedEdit Request Filtering Settings parece;
7. SobRequest Limitscabeçalho. enter a new larger value in theMaximum allowed content length (Bytes) box;
8. CliqueOK to apply the change.
Setup Request Filtering
The default installation of IIS 7 and later includes the Request Filtering role service or feature. If the Request Filtering role service or feature is uninstalled, you can reinstall it using the following steps.
Windows Server 2012 R2
1. On the taskbar, clique Gerenciador do Servidor.
2. Em Gerenciador do Servidor, Clique no Gerenciar menu and then click Adicionar funções e recursos.
3. No Adicionar funções e recursos wizard, clique Próximo. Select the installation type and click Próximo. Select the destination server and click Próximo.
4. No Funções do Servidor página, expandir Web Server (IIS), expandir Web Server, expandir Segurança, e então selecione Request Filtering. Clique Próximo.
5. No Select features página, clique Próximo.
6. No Confirm installation selections página, clique Instalar.
7. No Resultados página, clique Fechar.
How To
Note for IIS 7.0 Usuários: Some of the steps in this section may require that you install the Microsoft Administration Pack for IIS 7.0, which includes a user interface for request filtering. To install the Microsoft Administration Pack for IIS 7.0, please see the following URL iis.net/expand/AdministrationPack
How to add a hidden segment
- Abrir Internet Information Services (IIS) Manager:
- If you are using Windows Server 2012 or Windows Server 2012 R2:
- On the taskbar, clique Gerenciador do Servidor, clique Tools, e depois clique Internet Information Services (IIS) Manager.
- If you are using Windows 8 or Windows 8.1:
- Hold down the janelas chave, press the letter x, e depois clique Painel de controle.
- Clique Administrative Tools, and then double-click Internet Information Services (IIS) Manager.
- If you are using Windows Server 2008 or Windows Server 2008 R2:
- On the taskbar, clique Começar, point to Administrative Tools, e depois clique Internet Information Services (IIS) Manager.
- If you are using Windows Vista or Windows 7:
- On the taskbar, clique Começar, e depois clique Painel de controle.
- Double-click Administrative Tools, and then double-click Internet Information Services (IIS) Manager.
- If you are using Windows Server 2012 or Windows Server 2012 R2:
- No Connections pane, go to the connection, site, application, or directory for which you want to modify your request filtering settings.
- No Lar pane, double-click Request Filtering.
- No Request Filtering pane, Clique no Hidden Segments aba, e depois clique Add Hidden Segment… no Ações pane.
- No Add Hidden Segment caixa de diálogo, enter the relative path that you want to hide, e depois clique OK.