开发者

NeatUpload issue uploading pdf and gif files on remote server

We've recently run into this issue whereby pdf and gif files will not upload successfully on our remote system test server. Other file formats such as .docx, .xls, .jpg work and all file types work in the development environment. Both servers are Windows Server 2008 R2 Standard, IIS7.5 and run an asp.net 4.0 web application.

On searching google I've seen some references to making sure to use .close() properly, which I think I do as this works for other file types and on dev. Also in terms of permissions to the app_data\NeatUpload_Temp folder, I've ensured that the running account has write access.

Here's some pseudo C# code: -

if(inputFile.HasFile)
{
//Get the uploaded content
byte[] fileBytes = ReadContentsFromUploadedFile(inputFile);

//Get the uploaded file name
string fileName = GetFileNameFromUploadedFile(inputFile);

//Get the MIME type
string mimeType = inputFile.ContentType;

//Create custom object and store doc in SharePoint via web service

inputFile.FileContent.Close();
}

And a snippet from the Web.config: -

<neatUpload xmlns="http://www.brettle.com/neatupload/config/2008"  useHttpModule="true"     maxNormalRequestLength="102400" maxRequestLength="102400"     defaultStorageProvider="FilesystemUploadStorageProvider"      defaultStateStoreProvider="InProcUploadStateStoreProvider">
<providers>
<add name="FilesystemUploadStorageProvider"     type="Brettle.Web.NeatUpload.FilesystemUploadStorageProvider, Brettle.Web.NeatUpload"/>
<add name="InProcUploadStateStoreProvider"     type="Brettle.Web.NeatUpload.InProcUploadStateStoreProvider, Brettle.Web.NeatUpload"/>
</providers>
</neatUpload>

Any help or direction much appreciated!

Stack trace below: -

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.IOException: The process cannot access the file 'C:\inetpub\wwwroot\UWP_SIT\app_data\NeatUpload_Temp\5b25efcf6e9246c1b989640f623486c0.config' because it is being used by another process.

Source Error:

开发者_StackOverflow

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[IOException: The process cannot access the file 'C:\inetpub\wwwroot\UWP_SIT\app_data\NeatUpload_Temp\5b25efcf6e9246c1b989640f623486c0.config' because it is being used by another process.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +12896359
System.IO.FileInfo.Delete() +183
Brettle.Web.NeatUpload.FilesystemUploadedFile.Dispose() +909
Brettle.Web.NeatUpload.FileControl.OnUnload(EventArgs e) +235
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +160
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +323
System.Web.UI.Page.UnloadRecursive(Boolean dispose) +24
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11351550
System.Web.UI.Page.ProcessRequest() +269
System.Web.UI.Page.ProcessRequest(HttpContext context) +167
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +625
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 


It looks like the web application doesn't have permission to save the files to the destination.

You should check the permissions in two places:

  • neatupload's temp upload directory (where the files go before their transfers are complete) the destination directory (the location where you move them to once they are complete)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜