SecurityException: That assembly does not allow partially trusted callers.

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.
11/2/2010 8:54:42 PM
Gravatar
Total Posts 2

SecurityException: That assembly does not allow partially trusted callers.

Hi,

i've got this error:

 

[SecurityException: That assembly does not allow partially trusted callers.]
   mojoPortal.Web.WebTaskManager.StartOrResumeTasks(Boolean appWasRestarted) +333
   mojoPortal.Web.Global.StartOrResumeTasks() +295
   mojoPortal.Web.Global.Application_Start(Object sender, EventArgs e) +249

 

win2003/IIS 6/PGSQL/mojoPortal 2.3.5.5

I tried to update from 2.3.5.1 that previusly worked correctly. I made the instructions of medium or partial trust,  renamed the web.mediumtrust.config, etc...

Please give me some idea.

Thanks in advance,

Zoltan

11/3/2010 6:54:39 AM
Gravatar
Total Posts 18439

Re: SecurityException: That assembly does not allow partially trusted callers.

Hi Zoltan,

Unfortunately to use pgsql in medium trust would require installing the Npgsql.dll into the GAC (Global Assembly Cache) on the server.

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

Even if you do this there may still be troubles if the version of that dll in the GAC is not the same version that mojoPortal was compiled against. Possibly such errors can be solved by configuration to map assembly versions.

If you have control of the server it would be far easier if you just allow full trust on the site. I do not understand how it could have worked with an older version of mojoPortal, the medium trust issues would be the same.

Hope it helps,

Joe

11/3/2010 11:12:37 AM
Gravatar
Total Posts 2

Re: SecurityException: That assembly does not allow partially trusted callers.

Hi Joe,

thanks for the tips...

Meanwhile i resolved the problem. Although this is a hosted environment (i have no control of the server), thanks to God the GAC has no Npgsql.dll so i download the Npgsql2.7.0.7 (this version was that missing of my case) source code from http://www.npgsql.org and built it in my VS 2010 environment, than uploaded the Npgsql.dll to bin directory of the site and the setup has started and finished without problem...

And a short instruction: i had to remove from the web.config key (see the below line) the 3 Webstore....dll.

(<add key ="AssembliesNotSearchedForWebParts" value="AjaxControlToolkit.dll Argotic.Common.dll Argotic.Core.dll Argotic.Extensions.dll Blacklight.Silverlight.Controls.dll Brettle.Web.NeatHtml.dll Brettle.Web.NeatHtmlTools.dll Brettle.Web.NeatUpload.dll Brettle.Web.NeatUpload.GreyBoxProgressBar.dll CookComputing.XmlRpcV2.dll CSSFriendly.dll DayPilot.dll DotNetOpenAuth.dll DotNetOpenMail.dll GCheckout.dll Jayrock.dll Jayrock.Json.dll log4net.dll Lucene.Net.dll MetaDataExtractor.dll Microsoft.Web.Preview.dll mojoPortal.Business.dll mojoPortal.Business.WebHelpers.dll mojoPortal.Data.dll mojoPortal.Net.dll mojoPortal.Web.Controls.dll mojoPortal.Web.dll mojoPortal.Web.Editor.dll mojoPortal.Web.Framework.dll MySql.Data.dll Newtonsoft.Json.dll Novell.Directory.Ldap.dll OpenPOP.dll Org.Mentalis.Security.dll mojoPortal.Features.Business.dll mojoPortal.Features.Data.dll mojoPortal.Features.UI.dll Recaptcha.dll RSS.NET.dll SharpMimeTools.dll SiteOffice.Business.dll SiteOffice.Data.dll SiteOffice.ExternalMail.dll SiteOffice.UI.dll sqlite3.dll Subkismet.dll System.Web.Extensions.dll FirebirdSql.Data.FirebirdClient.dll Mono.Data.Sqlite.dll Mono.Security.dll Npgsql.dll TimelineNet.dll ZedGraph.dll ZedGraph.Web.dll"/>

 

Cheers,

Zoltan

2/3/2011 4:01:22 PM
Gravatar
Total Posts 22

Re: SecurityException: That assembly does not allow partially trusted callers.

I have a similar security exception error since my upgrade to the latest version.  My system info is below followed the the error text from the system log.  The error occurs when accessing the alternate file manager. Using ASP.Net 3.5

2.3.6.1 MSSQL
Operating System Microsoft Windows NT 6.0.6001 Service Pack 1
ASP.NET Info Running in Partial Trust
Server Time Zone Mountain Standard Time
Server Local Time (GMT -7) 2/3/2011 2:59:04 PM
Greenwich Mean Time (GMT/UTC) 2/3/2011 9:59:04 PM
 

2011-02-03 14:58:09,723 ERROR mojoPortal.Web.Global - 24.178.208.226-en-US - /Dialog/FileManagerAltDialog.aspx
System.Security.SecurityException: That assembly does not allow partially trusted callers.
   at ASP.admin_controls_filemanager_ascx.__BuildControlgbProgressBar()
   at ASP.admin_controls_filemanager_ascx.__BuildControlpnlUpload()
   at ASP.admin_controls_filemanager_ascx.__BuildControl__control39()
   at ASP.admin_controls_filemanager_ascx.__BuildControl__control37()
   at ASP.admin_controls_filemanager_ascx.__BuildControl__control27(HtmlTableRowCollection __ctrl)
   at ASP.admin_controls_filemanager_ascx.__BuildControltblUpload()
   at ASP.admin_controls_filemanager_ascx.__BuildControlpnlFile()
   at ASP.admin_controls_filemanager_ascx.__BuildControlTree(admin_controls_filemanager_ascx __ctrl)
   at ASP.admin_controls_filemanager_ascx.FrameworkInitialize()
   at System.Web.UI.UserControl.InitializeAsUserControlInternal()
   at System.Web.UI.UserControl.InitializeAsUserControl(Page page)
   at ASP.dialog_filemanageraltdialog_aspx.__BuildControlfm1()
   at ASP.dialog_filemanageraltdialog_aspx.__BuildControlform1()
   at ASP.dialog_filemanageraltdialog_aspx.__BuildControlTree(dialog_filemanageraltdialog_aspx __ctrl)
   at ASP.dialog_filemanageraltdialog_aspx.FrameworkInitialize()
   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_filemanageraltdialog_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:
LinkDemand
The Zone of the assembly that failed was:
MyComputer
 

2/4/2011 12:43:12 PM
Gravatar
Total Posts 18439

Re: SecurityException: That assembly does not allow partially trusted callers.

Hi,

Thanks for the bug report, I am able to reproduce this problem and will try to fix it for the next release. In the mean time you can still use the other file manager.

Best,

Joe

2/4/2011 3:41:45 PM
Gravatar
Total Posts 22

Re: SecurityException: That assembly does not allow partially trusted callers.

Thanks for the follow up.  This also seems to affect shared files content (at least on my pages).

2/6/2011 8:12:32 AM
Gravatar
Total Posts 18439

Re: SecurityException: That assembly does not allow partially trusted callers.

This is now fixed in the source code repository. I will try to release an update with these fixes in the next few days.

Best,

Joe

2/7/2011 2:04:50 PM
Gravatar
Total Posts 18439

Re: SecurityException: That assembly does not allow partially trusted callers.

This is now fixed in version 2.3.6.2

http://www.mojoportal.com/mojoportal-2362-released.aspx

Thanks,

Joe

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