Cannot upload files - "server error has occurred"

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
4/19/2010 11:15:14 AM
Gravatar
Total Posts 6

Cannot upload files - "server error has occurred"

When posting a blog entry or using HTML module I want to insert images. I browse to upload a file and after clicking upload get this:

We're sorry but a server error has occurred while trying to process your request. The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page
 

I am running under medium trust. I have set medium trust in web.config. I have allowed write access to \Data.

Here is error from log:

2010-04-19 09:01:04,940 ERROR mojoPortal.Web.Global - 148.168.40.4-en-US - /properties/Dialog/FileDialog.aspx?ed=fck&type=image 
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.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.dialog_filedialog_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
 

4/19/2010 11:17:01 AM
Gravatar
Total Posts 6

Re: Cannot upload files - "server error has occurred"

mojoPortal Version 2.3.3.9 MySQL

running IIS 7

Godaddy Windows Hosting

4/19/2010 12:18:11 PM
Gravatar
Total Posts 18439

Re: Cannot upload files - "server error has occurred"

Hi,

See the medium trust documentation.

Hope it helps,

Joe

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