Issue with Image Gallery - Medium Trust

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

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.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
8/23/2006 1:48:56 AM
Gravatar
Total Posts 8

Issue with Image Gallery - Medium Trust

Hi

I'm having a problem with the MojoPortal in a Medium Trust enviroment.

I have commented out the NeatUpload sections in the web.config, but I'm still getting an error when I try to upload an image...

This is the error I'm getting:

[SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +59
System.IO.Path.GetTempPath() +54
Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetDefaultTempDirectory() in FilesystemUploadStorageProvider.cs:115
Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetTempDirectory(NameValueCollection attrs) in FilesystemUploadStorageProvider.cs:88
Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.Initialize(String providerName, NameValueCollection attrs) in FilesystemUploadStorageProvider.cs:35
Brettle.Web.NeatUpload.UploadStorage.get_LastResortProvider() in UploadStorage.cs:92
Brettle.Web.NeatUpload.UploadStorage.get_Provider() in UploadStorage.cs:67
Brettle.Web.NeatUpload.UploadStorage.CreateUploadStorageConfig() in UploadStorage.cs:52
Brettle.Web.NeatUpload.InputFile.get_StorageConfig() in InputFile.cs:289
Brettle.Web.NeatUpload.InputFile.Render(HtmlTextWriter writer) in InputFile.cs:373
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
ASP.data_sites_1_skins_mertonmania_layout_master.__RenderfrmMain(HtmlTextWriter __w, Control parameterContainer) in App_Web_w-fhpzmg.0.cs:0
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +2065867
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Page.Render(HtmlTextWriter writer) +26
mojoPortal.Web.mojoBasePage.Render(HtmlTextWriter writer) in mojoBasePage.cs:89
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.galleryimageedit_aspx.ProcessRequest(HttpContext context) in App_Web_5pj-zny5.3.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Any help, greatly appreciated...

Cheers

Brian
8/23/2006 2:19:12 AM
Gravatar
Total Posts 148

Re: Issue with Image Gallery - Medium Trust

Under your webapp root, create an app_data folder (if it doesn't exist) and under that folder create a folder named "NeatUpload_Temp".  Ensure that folder is writable by the ASP.NET worker process account (typically ASPNET or "Network Service").

--Dean
8/23/2006 2:37:11 AM
Gravatar
Total Posts 8

Re: Issue with Image Gallery - Medium Trust

Hi Thanks for the Dean

Unfortunately my hoster provides a writable directory for ASP.NET that is outside the wwwroot.

Is there anyway of telling NeatUpload which directory to use as it's temp directory?

Thanks

Brian
8/23/2006 2:47:55 AM
Gravatar
Total Posts 148

Re: Issue with Image Gallery - Medium Trust

8/23/2006 3:02:21 AM
Gravatar
Total Posts 8

Re: Issue with Image Gallery - Medium Trust

Thanks Dean

I will try that once I get chance...some time later tonight...

Cheers

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