These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Problem uploading in FileVista control - connection closed

Hello,,

We just purchased the control and are attempting to put it in our application.  We have the upload working for tiny text files but asd soon as we try something a little larger (i.e. .docx, xlsx), the FileVistaControl_Failed event fires (after it times out) with a message:

"The connection has been closed between the browser and the server."

We're not sure what the issue is here.  We have a hard-coded path which works for the text files.  Here's the code: 

Dim fileVistaControl As FileVistaControl = DirectCast(LoadControl("~/FileVistaControl/filevista.ascx"), FileVistaControl)
fileVistaControl.Style = ConfigurationManager.AppSettings("fileVistaControlStyle").ToString ' "width: 800px; height: 600px"
fileVistaControl.Language = ConfigurationManager.AppSettings("fileVistaControlLanguage").ToString
fileVistaControl.LicenseKey = ConfigurationManager.AppSettings("fileVistaControlLicenseKey").ToString

Dim curriculum As New FileVistaRootFolder("Curriculum", "C:/VSProjects/CCCM/V1.0x/WebSite/Upload/Site0/curriculum/")
curriculum.Permissions = FileVistaPermissions.Full
fileVistaControl.RootFolders.Add(curriculum)

We commented out the quota and allowed file types to see if that was the issue.  Our environment is VS2008.  Any clue on this issue?


Scott 3/24/2010 4:55 AM
A bit more information - our error handler is returning the following:

System.Web.HttpException: An unhandled exception occured in the upload module.
Generated: Wed, 24 Mar 2010 12:22:55 GMT

System.Web.HttpException: An unhandled exception occured in the upload module.
   at GleamTech.Web.FileTransfer.UploadHttpModule.a(Object A_0, EventArgs A_1)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

ALL_HTTP    HTTP_CACHE_CONTROL:no-cache HTTP_CONNECTION:Keep-Alive HTTP_CONTENT_LENGTH:71156 HTTP_CONTENT_TYPE:multipart/form-data; boundary=----------gL6Ef1KM7Ij5ae0GI3gL6ae0GI3Ij5 HTTP_ACCEPT:text/* HTTP_COOKIE:ASP.NET_SessionId=0o21jy45huk0l3555zehvz45; .ASPXAUTH=65BEFDAB63979B1A18568766431060E74B76C55B70727A928DCA6E4B505B5F5E5D5BAEB2AD439F7EDA21D36B0B164
8E0B87326861F2781D5648C1631D95F07E84FEFADBCD272E20E61E9226652D0222E6F9EDB71769D77884552AD7F1E0EDA4A10B73
3218896A5CC97337B23A149DA65; activetabindex=0 HTTP_HOST:localhost:61809 HTTP_USER_AGENT:Shockwave Flash 

ALL_RAW    Cache-Control: no-cache Connection: Keep-Alive Content-Length: 71156 Content-Type: multipart/form-data; boundary=----------gL6Ef1KM7Ij5ae0GI3gL6ae0GI3Ij5 Accept: text/* Cookie: ASP.NET_SessionId=0o21jy45huk0l3555zehvz45; .ASPXAUTH=65BEFDAB63979B1A18568766431060E74B76C55B70727A928DCA6E4B505B5F5E5D5BAEB2AD439F7EDA21D36B0B1648E
0B87326861F2781D5648C1631D95F07E84FEFADBCD272E20E61E9226652D0222E6F9EDB71769D77884552AD7F1E0EDA4A10B73
3218896A5CC97337B23A149DA65; activetabindex=0 Host: localhost:61809 User-Agent: Shockwave Flash 

PATH_INFO    /FileVistaControl/upload.aspx
PATH_TRANSLATED    C:\VSProjects\CCCM\V1.0x\WebSite\FileVistaControl\upload.aspx
QUERY_STRING    rootFolderID=0&relativePath=&ASP.NET_SessionId=0o21jy45huk0l3555zehvz45&FT.Active=1&FT.OverrideProvider=1&
FT.UploadID=12694333086653730

Scott 3/24/2010 4:59 AM
Are you using Forms Authentication or another HTTP module or an Application_BeginRequest function (global.asax) in your project? These 3 things can effect the upload module of the control. The upload module should be the first one processing the request.

These topics may be helpful:
Upload with Forms Authentication
httpmodules limit the size of upload
Cem Alacayir 3/24/2010 7:24 AM
Cem,

That was it - we had some code in Application_BeginRequest in globals.  As soon as we commented it out, it worked.

Thanks for the quick reply
Scott 3/24/2010 8:36 AM
If you need to run that code in Application_BeginRequest then you can add some checking code at the top of the function like this:

if( Request.RawUrl.ToLower().Contains( "filevistacontrol/upload.aspx" ) )
            return;

This way you can exclude the requests for control uploads and run your code for all the other request.
Cem Alacayir 3/24/2010 9:48 AM