Windows 7 + Mojoportal 2.3.1.6 + SQLite = Trouble

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.
9/8/2009 12:46:04 AM
Gravatar
Total Posts 16

Windows 7 + Mojoportal 2.3.1.6 + SQLite = Trouble

I am having trouble getting the  mojoportal-2-3-1-6-sqlite-deploymentfiles package installed and running on my Windows 7 RTM box.  I have installed IIS with ASP.Net support, added an application to the default website and granted full permissions to the networservice user account to the mojoportal files.  Here is the error I am currently getting:

 

Server Error in '/web' 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) +7606807

System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57

 

[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.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43

System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127

System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142

System.Reflection.Assembly.Load(String assemblyString) +28

System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

 

[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) +613

System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203

System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105

System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178

System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54

System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +600

System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125

System.Web.Compilation.BuildManager.CompileResourcesDirectory() +31

System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +304

 

[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() +58

System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512

System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

 

[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) +8897659

System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85

System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333

 

 

 

9/8/2009 5:42:43 AM
Gravatar
Total Posts 18439

Re: Windows 7 + Mojoportal 2.3.1.6 + SQLite = Trouble

Hi,

That error means you are running in Medium Trust and must configure accordingly. Only reason I can think why your Win 7 machine would be configured for Medium Trust is if its a domain member and group policy is enforcing this via Active Directory.

The only other issue to be aware of with SQLite on Win 7 is if you have a 64 bit machine you have to enable 32 bit apps in the application pool settings because the sqlite3.dll is 32 bit.

Hope it helps,

Joe

9/9/2009 12:06:57 AM
Gravatar
Total Posts 16

Re: Windows 7 + Mojoportal 2.3.1.6 + SQLite = Trouble

Joe,

Thank you for your response.  I have followed your instructions here:http://www.mojoportal.com/mediumtrust.aspx regarding setting up mojoPortal in medium trust.  I am still experiencing the same error.

Additionally, I have confirmed in IIS that the .Net Trust Level is set to "Full".

My computer is not a part of a domain so I know there are not any group policies being applied.

Finally, I am running the 32bit version of Windows 7.

I am wondering if anyone else has been able to use Windows 7 successfully?  Could I have not installed IIS correctly or be missing a component?

 

Thank you for your help.

David 

9/9/2009 6:20:51 AM
Gravatar
Total Posts 18439

Re: Windows 7 + Mojoportal 2.3.1.6 + SQLite = Trouble

Windows 7 is all I use every day, it works fine for me.

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

looks like a medium trust error to me is all I can tell you and its not possible to use sqlite in medium trust, no way no how.

sqlite works fine on my win 7 machine.

Are you sure that you do not have this in your Web.config:

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

I mean its in the included Web.config commented out because I use that setting to test medium trust. Make sure its in comments and not uncommented.

Hope it helps,

Joe

9/10/2009 12:06:42 AM
Gravatar
Total Posts 16

Re: Windows 7 + Mojoportal 2.3.1.6 + SQLite = Trouble

Joe,

Thank you for your help.  I had been encountering the same error even though I knew that IIS was configured (I thought) for Full trust and that mojoPortal was configured correctly.  Your responses kept me on the "trust level" trail.

 

After much Googling and Binging, I found this article which contained the solution:

http://geekswithblogs.net/ProjectLawson/archive/2009/05/05/iis-system.web.aspnethostingpermission-exception-on-windows-7-rc.aspx

In summary, there is an property in the advanced settings of the app pool called "Load user Profile" that needed to be set to True.

Once the value had been changed mojoPortal setup ran and the site is now running locally just fine.

Thank you again, I hope this post helps out someone else with a similar issue.

David

9/10/2009 5:56:49 AM
Gravatar
Total Posts 18439

Re: Windows 7 + Mojoportal 2.3.1.6 + SQLite = Trouble

Hi David,

Glad you found this, now I will know the answer if this comes up again. My guess is the reason I did not encounter this is because my Win 7 was upgraded from Vista and I think that setting defaulted to true in Vista but maybe in a clean install of Win7 it defaults to false.

Best,

Joe

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