Logging in causes security exception

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
1/13/2010 9:09:44 PM
Gravatar
Total Posts 41

Logging in causes security exception

I have version 2.2.8.1 MSSQL. Installed on a FullTrust 2008 server.  I am moving it to a 2003 MediumTrust server.


I have everything moved over and the site works, but when I go to log in (PW stored hashed/not recoverable) I get the following error:

Server Error in '/' Application.
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: Request for the permission of type 'System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

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: Request for the permission of type 'System.Security.Permissions.KeyContainerPermission, 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() +58
System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters) +240
System.Security.Cryptography.RSA.FromXmlString(String xmlString) +470
mojoPortal.Web.Framework.CryptoHelper..cctor() +216
 

Help?

1/14/2010 12:40:21 AM
Gravatar
Total Posts 2239

Re: Logging in causes security exception

Have you followed the directions for setting up your site to use medium trust?

HTH,
Joe D.

1/14/2010 6:21:52 AM
Gravatar
Total Posts 41

Re: Logging in causes security exception

All but the App_Data change... is that really required?

1/14/2010 7:41:18 AM
Gravatar
Total Posts 41

Re: Logging in causes security exception

All the steps I can take, have been taken... still get the error on login...

1/14/2010 7:54:44 AM
Gravatar
Total Posts 18439

Re: Logging in causes security exception

Hi,

Version 2.2.8.1 is very old. It is quite possible it had a bug running under medium trust.

I would suggest:

  • review the release notes of all version since 2.2.8.1 for any upgrade notes
  • make sure .NET 3.5 SP1 is on both machines
  • backup everything on the Win 2008 machine so you can restore to your current state if something goes wrong
  • upgrade the win 2008 machine to the latest version 2.3.3.4.
  • add the ScriptLoader control to your layout.Master if it does not already have it, copy from one of the skins under /Data/skins in the new version
  • make sure everything is working ok, if you have any issues post in the forums
  • Then try the migration again

Hope it helps,

Joe

1/17/2010 7:37:12 AM
Gravatar
Total Posts 41

Re: Logging in causes security exception

Upgrade did the trick.

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