The remote server returned an error: (413) Request Entity

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
scaiferw
Posts: 83
Joined: Thu Mar 22, 2012 8:22 am

The remote server returned an error: (413) Request Entity

Post by scaiferw » Mon Jul 29, 2013 12:14 pm

Hi;

One of my users is getting this error while trying to upload files less than 2GB.

" The remote server returned an error: (413) Request Entity "

The following config changes were made some months ago, as we often need to store large binaries:
My maxRequestLength (Web.Config) is set to 2048576
My Maximum Allowed Content Length (IIS) is set to 2147483600 (48 bytes less than 2GB)

I can't find anything to tell me why this is happening. Can you suggest anything?
Vault Standard Version 5.1.1.19215 -- Windows Server 2008 R2 -- SQL Server 2008 R2

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: The remote server returned an error: (413) Request Entit

Post by Beth » Mon Jul 29, 2013 2:00 pm

First, try setting maxRequestLength to a larger value. I'd suggest just adding a couple 0's to the end.

If you are using a Proxy server, make sure that it doesn't have upload limits or has a large enough upload limit to allow Vault to add the file it needs to.

Try Chunked Encoding. In the Vault GUI client, go to Tools - Options - Network Settings and change the check box for Chunked Encoding.
Beth Kieler
SourceGear Technical Support

scaiferw
Posts: 83
Joined: Thu Mar 22, 2012 8:22 am

Re: The remote server returned an error: (413) Request Entit

Post by scaiferw » Tue Jul 30, 2013 5:15 am

Didn't work. Adding even one zero causes to server to fail as shown below. Removing the zero restores it (too much stress for 7:00am before my coffee. :shock: )

In Network Settings, we are already using chunked encoding and "Do not use a proxy.".

What should I try next?

Thanks, Rob

Code: Select all

	
Unable to connect to https://hqs-dmvlt01/VaultService.  No server was found at the specified URL.  Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client.  Web Exception: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
    <head>
        <title>Runtime Error</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/VaultService' Application.<hr width=100% size=1 color=silver></H1>

            <h2> <i>Runtime Error</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description: </b>An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
            <br><br>

            <b>Details:</b> To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".<br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration></pre></code>

                  </td>
               </tr>
            </table>

            <br>

            <b>Notes:</b> The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.<br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration></pre></code>

                  </td>
               </tr>
            </table>

            <br>

    </body>
</html>

--.

Some further detail - I temporarily set customerrors in web.config to "Off" and grabbed this info. I noticed it indicates a range of 0-2097151 for MaxRequestLength.

Code: Select all

Line 94:     <httpRuntime executionTimeout="86400" maxRequestLength="20485760" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />

...

[ConfigurationErrorsException]: The value for the property 'maxRequestLength' is not valid. The error is: The value must be inside the range 0-2097151. (C:\inetpub\wwwroot\VaultService\web.config line 94)
   at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
   at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
   at System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName)
   at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)
   at System.Web.Configuration.RuntimeConfig.get_HttpRuntime()
   at System.Web.HttpRuntime.InitApartmentThreading()
   at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags)
[HttpException]: The value for the property 'maxRequestLength' is not valid. The error is: The value must be inside the range 0-2097151. (C:\inetpub\wwwroot\VaultService\web.config line 94)
   at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
   at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
   at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
Last edited by scaiferw on Tue Jul 30, 2013 7:00 am, edited 1 time in total.
Vault Standard Version 5.1.1.19215 -- Windows Server 2008 R2 -- SQL Server 2008 R2

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: The remote server returned an error: (413) Request Entit

Post by Beth » Tue Jul 30, 2013 7:49 am

What is the size of the file you are trying to upload?
Beth Kieler
SourceGear Technical Support

scaiferw
Posts: 83
Joined: Thu Mar 22, 2012 8:22 am

Re: The remote server returned an error: (413) Request Entit

Post by scaiferw » Tue Jul 30, 2013 10:01 am

The largest file is 2,096,103,424, or 1.86GB.

That was over my setting for maxRequestLength, so I upped that to the top end of the range 2097151.

That didn't work. trying to load the largest file alone, media.005, got me this result:

Code: Select all

[30/07/2013 10:12:17 AM] Version Check:  This Vault Standard client is version 5.1.1.19215
[30/07/2013 10:12:22 AM] Version Check:  Your  server is version 5.1.1.19215
[30/07/2013 10:13:21 AM] Preparing data to begin transaction
[30/07/2013 10:18:21 AM] Beginning transaction
[30/07/2013 10:18:22 AM]     Create folder $/z_test5/subtest_c/Y
[30/07/2013 10:18:22 AM]     Add $/z_test5/subtest_c/Y/media.005
[30/07/2013 10:28:22 AM]     Upload for item $/z_test5/subtest_c/Y/media.005 failed, retrying...
[30/07/2013 10:38:22 AM]     Upload for item $/z_test5/subtest_c/Y/media.005 failed, retrying...
[30/07/2013 10:48:21 AM]     Upload for item $/z_test5/subtest_c/Y/media.005 failed, retrying...
[30/07/2013 10:48:21 AM] Ending the transaction
[30/07/2013 10:48:21 AM] Transaction failed
[30/07/2013 10:48:21 AM] Upload for item $/z_test5/subtest_c/Y/media.005 failed too many times, aborting transaction.  
        Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client.  
        The specific error was "The operation has timed out"
An exception was encountered during the transaction.  Exception: The operation has timed out   at System.Net.HttpWebRequest.GetResponse()
   at VaultClientOperationsLib.ClientInstance.UploadItem(ChangeSetItem item, String txID, Byte[]& streamBuffer, Int32& bytesWrittenThisFile, Boolean bIsImport)
   at VaultClientOperationsLib.UploadThread.ProcessCommand(UploadThreadCommand command, UploadThreadCommandResult& outputResult)
[30/07/2013 10:48:22 AM] Transaction failed
Vault Standard Version 5.1.1.19215 -- Windows Server 2008 R2 -- SQL Server 2008 R2

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: The remote server returned an error: (413) Request Entit

Post by Beth » Tue Jul 30, 2013 1:05 pm

Is the Vault server a 64-bit or 32-bit machine?

Can you try uploading on the server using localhost as the server name?

Do you know the largest file you are able to upload currently?
Beth Kieler
SourceGear Technical Support

scaiferw
Posts: 83
Joined: Thu Mar 22, 2012 8:22 am

Re: The remote server returned an error: (413) Request Entit

Post by scaiferw » Wed Jul 31, 2013 9:15 am

As noted, the largest file is 2,096,103,424, or 1.86GB.

It's Windwos2008R2, 64bit.

I installed the client on the server, set networking options to Use Chunked and Do Not Use Proxy, but it failed again on the large file. I tried with a 1.49gb (1,557,912) and it uploaded properly.

For reference, here's the System and Version info from Help > Technical Support from the Vault client on the server:

Code: Select all

Client Information
    Vault Standard Client Version: 5.1.1.19215
    .NET Framework Version: 2.0.50727.4984
    Operating System: Microsoft Windows Server 2008 R2 Standard 
    Service Pack: 0.0
    OS Version: 6.1.7600
    Total Physical Memory: 4 GB
    Time Zone: (UTC-05:00) Eastern Time (US & Canada)
    
Server Information
     Server Version: 5.1.1.19215
    .NET Framework Version: 2.0.50727.4984
    Operating System: 
    Service Pack: 
    OS Version: 
    Timezone: 
    SQL Version: Microsoft SQL Server 2005 - 9.00.5266.00 (Intel X86) 
            
            
            
    
License Information
    2 serial number(s):
        1 of 2: 25 full users, permanent
        2 of 2: 100 full users, permanent
Vault Standard Version 5.1.1.19215 -- Windows Server 2008 R2 -- SQL Server 2008 R2

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: The remote server returned an error: (413) Request Entit

Post by Beth » Wed Jul 31, 2013 9:39 am

Here is another thread where users were able to upload larger files. Check through that and make sure you've tried all the same things: http://support.sourcegear.com/viewtopic.php?f=5&t=11468.
Beth Kieler
SourceGear Technical Support

scaiferw
Posts: 83
Joined: Thu Mar 22, 2012 8:22 am

Re: The remote server returned an error: (413) Request Entit

Post by scaiferw » Wed Jul 31, 2013 12:49 pm

OK, I looked at that and came across the UploadTimeoutSeconds registry value for the client. Increased that from 601 to 6010 and that seems to have resolved the issue.

Another issue has come up (when it rains it pours) but I'll start a new thread for that.

Thanks,

Rob
Vault Standard Version 5.1.1.19215 -- Windows Server 2008 R2 -- SQL Server 2008 R2

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: The remote server returned an error: (413) Request Entit

Post by Beth » Wed Jul 31, 2013 2:19 pm

Thank you for the update.
Beth Kieler
SourceGear Technical Support

Post Reply