Security Exception after Publish mojoPortal

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.
7/31/2012 8:03:42 PM
Gravatar
Total Posts 23

Security Exception after Publish mojoPortal

Hello,

I added 2 custom functions to mojoPortal source code.  I then Published the mojoPortal.Web project locally following the instructions on this site using Visual Studio 2010.  Next I ftped the Published files to my web host, and set up the 2 databases I'm using on the web host.

When I try to access the home page (Default.aspx) I am getting this error:

 Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: System.Security.Permissions.SecurityPermission

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: System.Security.Permissions.SecurityPermission] Brettle.Web.NeatUpload.UploadHttpModule.GetCurrentWorkerRequest() +40 Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e) +403 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Can anyone suggest what this is about and what I can do?  Also, I do not actually need any uploading ability for this site.

Thanks for any help,

Dan

7/31/2012 8:58:37 PM
Gravatar
Total Posts 23

Re: Security Exception after Publish mojoPortal

Follow-up:

I found the <neatUpload> element in web.config and commented it out.  However, still getting the same error.

In addition, I have another (older) implementation of mojoPortal running on the same site (in a different subfolder) and I checked Admin>System Info and it states that I am running .NET 4 in Full Trust.


Thank you,

Dan

8/1/2012 6:36:27 AM
Gravatar
Total Posts 18439

Re: Security Exception after Publish mojoPortal

Hi Dan,

You have to comment out every place in web.config where you see things for NeatUpload not just the NeatUpload element. There is a section declaration and also refences in the modules sections.

Or rename Web.config to Web.fulltrust.config and rename Web.mediumtrust.config to Web.config

See also the article Running in Medium Trust

Hope that helps,

Joe

8/1/2012 7:23:24 PM
Gravatar
Total Posts 23

Re: Security Exception after Publish mojoPortal

Hi Joe,

Yes, that worked.


Thanks again,

Dan

8/2/2012 10:19:53 AM
Gravatar
Total Posts 18439

Re: Security Exception after Publish mojoPortal

Thanks for the beer Dan! Much appreciated.

Cheers,

Joe

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