Failed upgrade from 2.3.1.9 to 2.3.2.9

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/18/2009 1:47:34 PM
Gravatar
Total Posts 8

Failed upgrade from 2.3.1.9 to 2.3.2.9

Hello,

I performed the upgrade from 2.3.1.9 to 2.3.2.9 by copying over the wwwroot directory with the latest upgrade files and then changing parameters in the web.config back to what they had been in 2.3.1.9.  Things worked perfectly fine before the upgrade.

Now the web site no longer works.  I get the following error regardless of what page I go to.  I tried to go to /setup/default.aspx so the database would get upgraded but received the same errors.  Any ideas?

 

Server Error in '/' Application.

Required permissions cannot be acquired.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.

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:

[PolicyException: Required permissions cannot be acquired.]
   System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +10238142
   System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +97

[FileLoadException: Could not load file or assembly 'DotNetOpenAuth, Version=3.1.0.9122, Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

[ConfigurationErrorsException: Could not load file or assembly 'DotNetOpenAuth, Version=3.1.0.9122, Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11207304
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +388
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +232
   System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +48
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +210
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +76
   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +11196482
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +185
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +551

[HttpException (0x80004005): Could not load file or assembly 'DotNetOpenAuth, Version=3.1.0.9122, Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +76
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +1012
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +1025

[HttpException (0x80004005): Could not load file or assembly 'DotNetOpenAuth, Version=3.1.0.9122, Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11301302
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4338644

 


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 

11/18/2009 2:01:34 PM
Gravatar
Total Posts 18439

Re: Failed upgrade from 2.3.1.9 to 2.3.2.9

Hi,

Ideally, any settings you have customized in the apSettings section of Web.config, you should move into a user.config file as described here. That way you won't have to worry about updating these settings in Web.config and will only have to maintain any customisations in other sections of Web.config.

For this issue you need to follow the Medium Trust instructions and if that doesn't solve it.

Set this to false in Web.config/user.config

<add key="EnableOpenIDAuthentication" value="true" />

and delete the DotNetOpenAuth.dll from the build folder.

Hope it helps,

Joe

11/18/2009 3:21:32 PM
Gravatar
Total Posts 8

Re: Failed upgrade from 2.3.1.9 to 2.3.2.9

Hi Joe,

That's exactly what I needed.  Thanks for your help!

Tim

3/6/2010 6:20:49 AM
Gravatar
Total Posts 8

Re: Failed upgrade from 2.3.1.9 to 2.3.2.9

Hi,

I had the same error. I am installing on my onw Virtual DedicatedServer (Windows Server 2008), so I can decide the trust level for myself.

I created a webapplication under the default webapplication of my VDS. The trust level of the default website and the new webapplication under it are both set to full trust. Still I got this error about the DotNetOpenAuth.dll.

After I added the following line and deleted  DotNetOpenAuth.dll, this error disappeared.

<add key="EnableOpenIDAuthentication" value="true" />

Can you explain why this solution is necessary even in a full trust environment?

 

Greetings,

 

J. Stringer

3/6/2010 6:33:15 AM
Gravatar
Total Posts 18439

Re: Failed upgrade from 2.3.1.9 to 2.3.2.9

Hi Johan,

This error does not happen in Full Trust.

How did you configure your machine for Full Trust?

What steps did you take to do that?

If a machine is configured for Medium Trust then you cannot make a site full trust just by web.config changes because the Medium Trust is enforced from machine.config and this takes precedence over Web.config. Otherwise hosting companies could not force Medium Trust if it was possible to change to Full Trust from Web.config.

You can simulate medium trust on a machine that allows full trust by Web.config like this:

<trust level="Medium" originUrl=".*" />

but if the machine is configured for Medium Trust you cannot make it full trust like this, it will not work:

<trust level="Full" originUrl=".*" />

About:

<add key="EnableOpenIDAuthentication" value="true" />

true will only work if the dll is present in the bin folder. The setting there makes it possible to enable it in Site Settings but if you enable it it will not work without the dll, though you can use the RPX service as it does not need this dll.

Hope it helps,

Joe

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