Medium Trust gallery errors

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.
2/28/2010 12:17:29 PM
Gravatar
Total Posts 5

Medium Trust gallery errors

Hello all,

Finally my ISP installed the .Net connector so now i can use Mojo on my webspace.

So I uploaded Mojo to the web and tried to make use of the Image gallery. Because that might not be working in medium trust i tried the simple folder gallery, but that doesnt work either. I can insert the modules to a page but when i try to add a picture i get the Error.htm, it doesnt mather what gallery i use both gallerys give me the same error in the logging:

2010-02-28 18:32:54,024 ERROR mojoPortal.Web.Global - xxxxxxxxx-nl-NL - /FolderGallery/Edit.aspx?mid=3&pageid=2
System.Security.SecurityException: System.Security.Permissions.SecurityPermission
at Brettle.Web.NeatUpload.Internal.Module.Config..ctor()
at Brettle.Web.NeatUpload.Internal.Module.Config.CreateFromAppSettings(NameValueCollection appSettings)
at Brettle.Web.NeatUpload.Internal.Module.Config.get_Current()
at Brettle.Web.NeatUpload.UploadStorage.get_Provider()
at Brettle.Web.NeatUpload.UploadStorage.CreateUploadStorageConfig()
at Brettle.Web.NeatUpload.FileControl.get_StorageConfig()
at Brettle.Web.NeatUpload.MultiFile.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at mojoPortal.Web.mojoBasePage.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
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.foldergallery_edit_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was:
MyComputer

Now i have searched here but i didn't find a topic with the same problems. What i did found is a topic where joe recommended to upload the picture via FTP (http://www.mojoportal.com/Forums/Thread.aspx?pageid=5&mid=34&ItemID=3&thread=2508&postid=10698).

So i did that and it seems to work for the simple folder gallery. But there is another error with the permelink, if you click the permalink you get the image in a new window with some aditional info when you click the image there it should open the image in full size, but the url to the picture isnt correct (/FolderGallery/~/Data/Sites/1/FolderGalleries/). I think i found a topic of someone with the same problem but that error should be fixed in this release (http://www.mojoportal.com/Forums/Thread.aspx?pageid=5&mid=34&ItemID=2&thread=1550&pagenumber=2

Anyway what i would like to know is if the gallery should be working in MediumTrust environments.

Im using version 2.3.3.9 MySQL, i´m also using the mediumtrust web.config and set write permissions to the App_Data and Data folder.

Hope there is someone with a sollution, or who can tell me if the gallerys should or shouldn't work in mediumtrust environments.

Greets, Chris

3/2/2010 6:31:27 AM
Gravatar
Total Posts 18439

Re: Medium Trust gallery errors

As far as I know the image galleries have always worked in medium trust. Your error indicates it is using NeatUpload which does not work in medium trust. You say you are using the Web.mediumtrust.config but it does not seem to be so from your error.

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

Hope it helps,

Joe

3/2/2010 2:37:36 PM
Gravatar
Total Posts 5

Re: Medium Trust gallery errors

Hey Joe,

Thanks for your reply.

Actualy i use the mediumtrust web.config. I downloaded my web.config to my pc and downloaded the mojo source mojoportal-2-3-3-9-mssql-deploymentfiles again from codeplex. Compared the two files and they are exectly the same, only acceptions are the mail settings.

I searched the files for some uncommented NeatUpload strings and they only appear uncommented in the following:

DisallowedVirtualFolderNames
<add key="UseGreyBoxProgressForNeatUpload" value="false" />
AssembliesNotSearchedForWebParts
<add namespace="Brettle.Web.NeatUpload" assembly="Brettle.Web.NeatUpload" tagPrefix="NeatUpload" />
<add namespace="Brettle.Web.NeatUpload" assembly="Brettle.Web.NeatUpload.GreyBoxProgressBar" tagPrefix="GreyBoxUpload" />
<add namespace="Brettle.Web.NeatHtml" assembly="Brettle.Web.NeatHtml" tagPrefix="NeatHtml" />
<error statusCode="413" redirect="~/NeatUpload/Error413.aspx" />

Besides that i'm using the user.config also. But there is not so much in it, the only difference compared to the user.config.sample file is the connection string and the <add key="RunningInMediumTrust" value="true" /> thats uncommented.

Is there something suspicious or should i open een ticket at my hoster?

Greets, Chris

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