Upload Error for large files (over 4 MB) (400) Bad Request

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

Moderator: SourceGear

Post Reply
ssharda
Posts: 5
Joined: Mon Jan 12, 2009 3:33 pm

Upload Error for large files (over 4 MB) (400) Bad Request

Post by ssharda » Mon Jan 12, 2009 3:47 pm

Hello,
We are using 4.1.2.18185 version for Vault Client and Server on Windows 2003 with SQLServer 2005. I set the IIS File Upload Limit to 10000 KB. However whenever i try uploading files greater than 4MB i get the following message on the client. I set the logging on the server as debug and it says the upload is successful. Please see the Vault Client Log and Vault Server Log. What am i missing?

Thanks in advance,
-Sandeep

Vault Client Log
=====================================================================
[1/12/2009 4:47:26 PM] Upload for item $/Investlink/TSM.Net/ThirdPartyAssemblies/Aspose.Editor.Desktop.dll failed, retrying...
[1/12/2009 4:47:27 PM] Upload for item $/Investlink/TSM.Net/ThirdPartyAssemblies/Aspose.Editor.Desktop.dll failed, retrying...
[1/12/2009 4:47:28 PM] Upload for item $/Investlink/TSM.Net/ThirdPartyAssemblies/Aspose.Editor.Desktop.dll failed, retrying...
[1/12/2009 4:47:28 PM] Upload for item $/Investlink/TSM.Net/ThirdPartyAssemblies/Aspose.Editor.Desktop.dll 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 server had an error processing the file upload but did not return an error header. The remote server returned an error: (400) Bad Request."
An exception was encountered during the transaction. Exception: The server had an error processing the file upload but did not return an error header. The remote server returned an error: (400) Bad Request. at VaultClientOperationsLib.ClientInstance.UploadItem(ChangeSetItem item, String txID, Byte[]& streamBuffer, Int32& bytesWrittenThisFile, Boolean bIsImport)
at VaultClientOperationsLib.UploadThread.ProcessCommand(UploadThreadCommand command, UploadThreadCommandResult& outputResult)
[1/12/2009 4:47:28 PM] Ending the transaction
[1/12/2009 4:47:29 PM] Transaction failed
[1/12/2009 4:47:29 PM] Transaction failed
=====================================================================

Vault Server Log
=====================================================================
----1/12/2009 4:15:10 PM ssharda--invws-32.investlink.com(192.168.50.235)--SSL Disabled TreeManager: cache matches repository revision and folder security hasn't changed. Returning cached tree, revID 964
----1/12/2009 4:15:10 PM ssharda--invws-32.investlink.com(192.168.50.235)--SSL Disabled BeginTx: Applying AddFile to $/Investlink/TSM.Net/ThirdPartyAssemblies/Aspose.Editor.Desktop.dll
----1/12/2009 4:15:10 PM ssharda--invws-32.investlink.com(192.168.50.235)--SSL Disabled BeginTx: Finished Applying AddFile to $/Investlink/TSM.Net/ThirdPartyAssemblies/Aspose.Editor.Desktop.dll
----1/12/2009 4:15:10 PM ssharda--invws-32.investlink.com(192.168.50.235)--SSL Disabled (3b16f2ec-f88b-47a9-9325-c7bbb27307d6) BeginTx returned: Success
----1/12/2009 4:15:10 PM ssharda--invws-32.investlink.com(192.168.50.235)--SSL Disabled (3b16f2ec-f88b-47a9-9325-c7bbb27307d6) AddFile: $/Investlink/TSM.Net/ThirdPartyAssemblies/Aspose.Editor.Desktop.dll returned: Success
----1/12/2009 4:15:10 PM ssharda--invws-32.investlink.com(192.168.50.235)--SSL Disabled ASMX: DoBeginTx finished.
----1/12/2009 4:15:10 PM ssharda--invws-32.investlink.com(192.168.50.235)--SSL Disabled ASMX: BeginTx finished.

=====================================================================

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

Re: Upload Error for large files (over 4 MB) (400) Bad Request

Post by Beth » Mon Jan 12, 2009 4:24 pm

That's a fairly low IIS upload limit.

Try changing the Chunked Encoding setting in your Vault client under Tools - Options - Networking. Then restart your client and try again.
Beth Kieler
SourceGear Technical Support

ssharda
Posts: 5
Joined: Mon Jan 12, 2009 3:33 pm

Re: Upload Error for large files (over 4 MB) (400) Bad Request

Post by ssharda » Mon Jan 12, 2009 4:28 pm

Beth,
Tried that. No luck.
Thanks

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

Re: Upload Error for large files (over 4 MB) (400) Bad Request

Post by Beth » Mon Jan 12, 2009 5:09 pm

Add another '0' to your IIS upload limit, save that, then perform an iisreset on that machine by going to Start - Run and typing iisreset. (A stop and start manually doesn't do the same thing, so it's best to just run the command.)

Then try again.

Are smaller files able to upload?
Beth Kieler
SourceGear Technical Support

ssharda
Posts: 5
Joined: Mon Jan 12, 2009 3:33 pm

Re: Upload Error for large files (over 4 MB) (400) Bad Request

Post by ssharda » Tue Jan 13, 2009 9:36 am

Hello Beth,

Tried adding 0 and iisreset. No luck. Same exact error on client. Server logs still show sucess.
Uploading files smaller than 4MB is no problem.
I tried various network settings on the client and they seem to give the same result(we do not have a proxy server).
I looked at the \VaultService\web.config and the maxRequestLength is getting updated sucessfully by the admin tool. Below is the relevent line.

<httpRuntime executionTimeout="86400" maxRequestLength="100000" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />

Appreciate your input.

Thanks,
-Sandeep

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

Re: Upload Error for large files (over 4 MB) (400) Bad Request

Post by Beth » Wed Jan 14, 2009 10:57 am

Try performing an iisreset on your server to make it reload the settings. Just go to Start - Run and type iisreset.
Beth Kieler
SourceGear Technical Support

ssharda
Posts: 5
Joined: Mon Jan 12, 2009 3:33 pm

Re: Upload Error for large files (over 4 MB) (400) Bad Request

Post by ssharda » Wed Jan 14, 2009 11:21 am

Beth,

I did do iisreset after adding the "0" in IIS upload limit using admin tool. No luck.

Thanks,
-Sandeep

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

Re: Upload Error for large files (over 4 MB) (400) Bad Request

Post by Beth » Thu Jan 15, 2009 10:41 am

Could you look in your Event Viewer logs to see if anything is being logged there at the same time as the error?

What happens if you load a client onto the Vault server and try to upload a large file there, but using localhost as the server to connect to?
Beth Kieler
SourceGear Technical Support

ssharda
Posts: 5
Joined: Mon Jan 12, 2009 3:33 pm

Re: Upload Error for large files (over 4 MB) (400) Bad Request

Post by ssharda » Fri Aug 14, 2009 7:07 am

Beth,
Sorry for the delayed reply. Answer to your queries.
1)There is no error in the Event viewer.
2) I see the same problem on localhost.

I tried uploading a file under 7 MB and it failed on the server. I have enabled Debug logging on server. Following the the server log. Client Error is the same.
Please advise.
Thanks,
-Sandeep

==========================================================================================
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: BeginTx started.
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: DoBeginTx started.
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled BeginTx beginning transaction
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: GetLatestRepositoryInfo started.
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: GetLatestRepositoryInfo finished.
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled TreeManager: cache matches repository revision and folder security hasn't changed. Returning cached tree, revID 5712
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled BeginTx: Applying AddFile to $/Investlink/temp_san/TSM.Net.UI.SmartClient.exe
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled BeginTx: Finished Applying AddFile to $/Investlink/temp_san/TSM.Net.UI.SmartClient.exe
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled (69d00d59-704f-4b8c-9dc8-301ffef7ce27) BeginTx returned: Success
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled (69d00d59-704f-4b8c-9dc8-301ffef7ce27) AddFile: $/Investlink/temp_san/TSM.Net.UI.SmartClient.exe returned: Success
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: DoBeginTx finished.
----8/14/2009 8:53:43 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: BeginTx finished.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled Ending transaction
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: EndTx started.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled EndTx(): Client aborted the transaction.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: DeleteSessionBranchSandbox started.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: DeleteSessionBranchSandbox finished.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled (69d00d59-704f-4b8c-9dc8-301ffef7ce27) EndTx (Revision - 0) returned: Success
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: EndTx finished.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: GetRepositoryStructure started.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled Getting repository Structure-> Rep ID: 5 Base: 5712 Target: -1
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: GetLatestRepositoryInfo started.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: GetLatestRepositoryInfo finished.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled TreeManager: cache matches repository revision and folder security hasn't changed. Returning cached tree, revID 5712
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: GetLastTreeSecurityChange started.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: GetLastTreeSecurityChange finished.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled VaultServiceAPI::GetRepositoryTreeDelta() UserID:1 RepID:5 Base:5712 Target:5712 Calling VaultRepUtil.DiffRepTrees() - in-memory tree diff.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: GetRepositoryStructure finished.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled GetRepositoryStructure returned: Success
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled Getting list of checkout changes.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: GetCheckOutListChanges started.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled Beginning SQL transaction 60457195
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled GetCheckoutListChanges: Transaction Started
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: LockCheckoutList started.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: CreateDBLockObject started.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: CreateDBLockObject finished.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: LockCheckoutList finished.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: GetCurrentCheckoutInfo started.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled DB: GetCurrentCheckoutInfo finished.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled SQL transaction 60457195 successfully committed.
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled GetCheckoutListChanges: Transaction Committed
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled GetCheckOutListChanges returned: Success
----8/14/2009 8:53:49 AM admin--ny-tsmnet.investlink.com(127.0.0.1)--SSL Disabled ASMX: GetCheckOutListChanges finished.

=============================================

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

Re: Upload Error for large files (over 4 MB) (400) Bad Reque

Post by Beth » Mon Aug 17, 2009 4:16 pm

I think we should take this discussion offline so that I can take a closer look at what is going on. Could you send an email to support at sourcegear.com (attn: Beth) with a link to this forum thread?

HS: 217142
Beth Kieler
SourceGear Technical Support

Post Reply