Error Uploading PDF into Share Files Module

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/20/2010 10:06:43 AM
Gravatar
Total Posts 74

Error Uploading PDF into Share Files Module

I'm getting an error when I try to upload a pdf into a Shared Files module. Below is my log when it occurs. It looks like a permissions error, but I've set the data folder to be writable. Any thoughts?

Thanks,

Joe

2010-09-20 08:03:33,607 ERROR mojoPortal.Web.mojoBasePage - 208.109.80.102-en-US - /news-archive.aspx
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
   at System.Security.CodeAccessPermission.Demand()
   at System.IO.Path.GetTempPath()
   at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetDefaultTempDirectory()
   at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetTempDirectory(NameValueCollection attrs)
   at Brettle.Web.NeatUpload.FilesystemUploadedFile.Initialize(FilesystemUploadStorageProvider provider, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
   at Brettle.Web.NeatUpload.FilesystemUploadedFile..ctor(FilesystemUploadStorageProvider provider, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
   at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
   at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType)
   at Brettle.Web.NeatUpload.UploadStorage.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
   at Brettle.Web.NeatUpload.UploadStorage.ConvertToUploadedFile(String controlUniqueID, HttpPostedFile file)
   at Brettle.Web.NeatUpload.UploadModule.ConvertToUploadedFile(String controlUniqueID, HttpPostedFile file)
   at Brettle.Web.NeatUpload.FileControl.InitializeFiles()
   at Brettle.Web.NeatUpload.FileControl.LoadPostData(String postDataKey, NameValueCollection postCollection)
   at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.EnvironmentPermission
The Zone of the assembly that failed was:
MyComputer
2010-09-20 08:03:33,669 ERROR mojoPortal.Web.Global - 208.109.80.102-en-US - /news-archive.aspx
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
   at System.Security.CodeAccessPermission.Demand()
   at System.IO.Path.GetTempPath()
   at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetDefaultTempDirectory()
   at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetTempDirectory(NameValueCollection attrs)
   at Brettle.Web.NeatUpload.FilesystemUploadedFile.Initialize(FilesystemUploadStorageProvider provider, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
   at Brettle.Web.NeatUpload.FilesystemUploadedFile..ctor(FilesystemUploadStorageProvider provider, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
   at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
   at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType)
   at Brettle.Web.NeatUpload.UploadStorage.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
   at Brettle.Web.NeatUpload.UploadStorage.ConvertToUploadedFile(String controlUniqueID, HttpPostedFile file)
   at Brettle.Web.NeatUpload.UploadModule.ConvertToUploadedFile(String controlUniqueID, HttpPostedFile file)
   at Brettle.Web.NeatUpload.FileControl.InitializeFiles()
   at Brettle.Web.NeatUpload.FileControl.get_Files()
   at Brettle.Web.NeatUpload.FileControl.OnUnload(EventArgs e)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Page.UnloadRecursive(Boolean dispose)
   at System.Web.UI.Page.ProcessRequestCleanup()
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.default_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.EnvironmentPermission
The Zone of the assembly that failed was:
MyComputer
 

9/20/2010 10:11:09 AM
Gravatar
Total Posts 18439

Re: Error Uploading PDF into Share Files Module

you are hosted under medium trust and need to use medium trust configuration

http://www.mojoportal.com/mediumtrust.aspx

Hope it helps,

Joe

9/20/2010 10:29:41 AM
Gravatar
Total Posts 74

Re: Error Uploading PDF into Share Files Module

Thanks Joe! I forgot about the App_Data folder.

You must sign in to post in the forums. This thread is closed to new posts.