« Previous Next »

Thread: FPSE - Site upload - The Server Unexpectedly Closed the Connection

Last post 12-17-2008 3:54 PM by anilr. 10 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (11 items)

Sort Posts:

  • 10-30-2008, 8:09 AM

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    FPSE - Site upload - The Server Unexpectedly Closed the Connection

    Hi all

    Today's drama is about uploading a 33mb access db file via Expression Web to an FPSE-enabled IIS 7.0 server. I cannot get past about 5 minutes or so before the transfer fails with "The Server Unexpectedly Closed the Connection".

    Is there some sort of filesize limitation with this?

    Thanks for any advice.
    Rob

  • 10-30-2008, 2:15 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

    What do the IIS logs and httperr logs say?  If those do not give any useful information, a netmon trace or failed-request trace should give more information.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 11-05-2008, 8:41 PM In reply to

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

    IIS7 on Windows Server 2008,the web application will reject any file that is larger than 30 MB. This is a default limitation of IIS. You can increase the maximum file size by adding the following code to <system.webServer> in the web.config file:

    <security>
     <requestFiltering>
      <requestLimits maxAllowedContentLength=”2000000000″ />
     </requestFiltering>
    </security>

    With the above maxAllowedContentLength, users can upload files that are 2,000,000,000 bytes in size. This setting will work right away without restart IIS services.

     Hope this helps

    Thanks

    Sincerely
    Microsoft Online Community Support
    Andrew Zhu - MSFT


    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • 11-05-2008, 9:16 PM In reply to

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

    Thanks for the replies Anil and Andrew

    To apply it to all sites on my server, is it appropriate to add that line in applicationhost.config as follows:

    .........
                        <add segment="App_WebReferences" />
                        <add segment="App_Data" />
                        <add segment="App_Browsers" />
                    </hiddenSegments>
                    <requestLimits maxAllowedContentLength=”2000000000″ />
                </requestFiltering>

    I've squeezed it in after the hiddensegments section which seems to leave the right bits surrounding it.

    Regards,
    Rob

    (and sorry for the crosspost - that wasn't supposed to happen)

  • 11-05-2008, 10:30 PM In reply to

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

    I've just had my answer.. it's a no. The server didn't like that in the config.

    Short of putting a web.config into every single website, is there another way to apply the setting to all sites?

    Thanks for any further advice on this,.

    Rob

  • 11-06-2008, 1:12 AM In reply to

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

    Add

    <security>
     <requestFiltering>
      <requestLimits maxAllowedContentLength=”2000000000″ />
     </requestFiltering>
    </security>

    to <system.webServer> in the web.config file.

    if there does not have a <system.webServer> write it by yourself.

    location:%windir%\Microsoft .NET\Framework \<version>\config

    Take a try,

    Thanks

     

    Sincerely
    Microsoft Online Community Support
    Andrew Zhu - MSFT


    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • 11-06-2008, 6:54 AM In reply to

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

    Ok I see, there are so many config file everywhere it's hard to know where to look.

    That seems to work. I've added it as a new system.webServer section in

    C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config

    Thanks for the clarification Andrew

    Regards,
    Rob

  • 11-06-2008, 10:41 AM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

    No, do not add it to root web.config - it would need to go into applicationhost.config, just run

    %windir%\system32\inetsrv\appcmd set config -section:system.webServer/security/requestFiltering -requestLimits.maxAllowedContentLength:2000000000

    and it will put it in the right place.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 11-06-2008, 10:19 PM In reply to

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

    Ok I removed it again from the web.config and used that command. That has inserted the line in the application host.config in the same place I tried putting it in manually, but this time it seems to not cause trouble.

                    </hiddenSegments>
                    <requestLimits maxAllowedContentLength="2000000000" />
                </requestFiltering>

    Thanks for following this up, it's much appreciated!

    Rob

  • 12-17-2008, 2:59 PM In reply to

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

     i was able to successfully update the applicationhost.config by running the above suggested command...

    "%windir%\system32\inetsrv\appcmd set config -section:system.webServer/security/requestFiltering -requestLimits.maxAllowedContentLength:2000000000"

     and I visually confirmed this by looking at the file. It is there. So I reset IIS and still i get the following error...

    Log Name:      Application
    Source:        ASP.NET 2.0.50727.0
    Date:         
    Event ID:      1309
    Task Category: Web Event
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Computer:      WEB01
    Description:
    Event code: 3004
    Event message: Post size exceeded allowed limits. 

     

    I am using windows server 2008 64 bit... is there perhaps another place i need to change this setting? I have tried inserting the same setting into several other config files inlcuding the application web.config file, but nothing is doing the trick.

    Thanks, 

  • 12-17-2008, 3:54 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: FPSE - Site upload - The Server Unexpectedly Closed the Connection

    You are hitting asp.net limit, not IIS limit.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (11 items)
Microsoft Communities