Troubleshooting File upload Issues


  
 Applies To 
  
 Product(s):eB Web
 Version(s):All
 Environment: N/A
 Area: eB Web
 Subarea: File upload
 Original Author:Bentley Technical Support Group
  

 

 

 

 

 

 

 

 

eB Web uses an activeX control to upload file data to eB.  Although this process uses HTTP, it is not a classic form upload - rather there is a handshake between the control and a listening endpoint that recieves the files.  This is done to allow users who have unreliable connections to upload files more repeatably and to handle very large files (with sizes in Gb) to be uploaded more safely.  During transfer the process creates a signature for each block and the block is verified on the server to ensure that it was not modified in transit.

  1. Drag a file onto the drop zone of a not-approved document.
  2. The client makes an MD5 hash of the file and tells the web server it is going to upload a file with that hash, and what container to upload to.
  3. The web server looks at the location were temporary files are to be stored.  If the location was specified within the web.config file it must be able to write there.  If not it will go to default location, the system temporary folder of the IIS server, typically Windows/Temp. An "eB.plugin.core" folder is created to contain the scratch data.
    <eB.PlugIn.Core.Properties.Settings>
       <setting name="UploadWorkingFolder" serializeAs="String">
         <value />
       </setting>
  4. The client sends a block of the file to the server, creating an MD5 hash of the block.
  5. The server reads the block and stores it in the temporary location, verifying that the block matches the hash it received.
  6. If the transmission fails due to error, try sending a smaller block
  7. Repeat steps 4,5,6 until all of the file is sent or the block size is < 100 bytes.
  8. If the block size got too small, tell user connection is not reliable.
  9. If the file uploaded successfully tell the server transfer is complete.
  10. Web Server verifies that completed file matches the original MD5 hash.
  11. Web Server tells eB to add the file to the specified container.
  12. If eB reported an error, Web server sends it back to the client.

Log Files

  1. Client Logs

    The client ActiveX keeps a log of each transfer in it's scratch folder using .tsv files.  The log is deleted a few minutes after a successful request completes, so be prompt. To find the file look in: %userprofile%\AppData\Local\Temp\Bentley\eB.Control.IEControl\.

    The log file is a tsv format log of the actions the control takes, and can be read in Excel or notepad.  If an error is reported by the server check this file to see if a 500 error was reported during the transfer of a block of the file.

  2. Server Logs

    During the upload process the ActiveX control is communicating with a server endpoint called UploadFile.ashx. This endpoint keeps information about each upload in a temporary log in the working folder.  You will see temporary files containing the state of the transfer within the temporary folder.  If a problem occurs it is possible to enable logging of the transfer by adding an extra config setting:

    <eB.PlugIn.Core.Properties.Settings>
       <setting name="CreateLogFile" serializeAs="String">
         <value>true</value>
       </setting>

    This will create a log file for each transfer.

500 Errors

Sometimes the control will report an error that looks like a page full of HTML, or the client log will contain an ERROR entry that is a HTML file.  In both cases the HTML will contain a platitude about a server error, but no actual information about what the error was.  This is a "friendly" server error, and is generated when IIS 7 or 8 detects that the status was set to 500 by the page.  The upload file endpoint sets the status to 500 if an error occurs and includes some information about the error state.  To get the information you must turn off "friendly" errors for the endpoint folder.

See Also

File Handling