YAFLogo

Posted by: Gofer01 - Tuesday, 31 August 2010 01:33:01
I get this error while running http://mydomain.com/install/default.aspx [quote] [size=1][b]Server Error in '/' Application.[/b][/size] -------------------------------------------------------------------------------- [b]Security Exception[/b] 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.Web.AspNetHostingPermission, System, 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.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Reflection.Assembly._GetExportedTypes() +0 System.Web.Compilation.BuildResultMainCodeAssembly.FindAppInitializeMethod() +41 System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +11196986 System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +185 System.Web.Compilation.BuildManager.CompileCodeDirectories() +654 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +658 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927 [/quote] [img]http://bvqhew.bay.livefilestore.com/y1pbJMOJUGgws-lMoZxkO8isd8bZliqQt8f_HWY-AKuUhkGPGzDwORo_2ofh80teaWZZObb8UjIhrHyw0_2LJqe48uLtect6rL7/snap0000053.jpg?psid=1[/img] [url=http://bvqhew.bay.livefilestore.com/y1pbJMOJUGgws-lMoZxkO8isd8bZliqQt8f_HWY-AKuUhkGPGzDwORo_2ofh80teaWZZObb8UjIhrHyw0_2LJqe48uLtect6rL7/snap0000053.jpg?psid=1]http://bvqhew.bay.livefilestore.com/y1pbJMOJUGgws-lMoZxkO8isd8bZliqQt8f_HWY-AKuUhkGPGzDwORo_2ofh80teaWZZObb8UjIhrHyw0_2LJqe48uLtect6rL7/snap0000053.jpg?psid=1[/url]

Posted by: mccutchen - Sunday, 5 September 2010 18:07:45
Did you get this corrected? I am having the same issue.

Posted by: cagliostro - Sunday, 5 September 2010 19:02:14
Please check your app config file. Is this EMPTY ? If so, put a password and Install again. And let us know, because most do not follow up...

Posted by: kwrl - Monday, 17 January 2011 23:04:01
I get [b]exactly[/b] the same error. I tried everything I found in this forum but without success. My server is an 2008 R2 with .net Framework 4 installed. I downloaded the latest bin-Version (1.9.5 FINAL) unzipped it and copied the whole directory yetanotherforum.net (including the directory) under my wwwroot. The recommended web.config file was renamed to 'web.config'; I created a db and named it yafnet. Then I converted wwwroot/yetanotherforum.net to an application (trust level is full) I set the password as posted by cagliostro in the app.config and updated the db.config (because I'm using SQL 2008 Express with the named instance 'SQLExpress'; integrated Security; I also tried SQL Server authentication without success). Did I forgot something? Thx in advance K.

Posted by: bbobb - Monday, 17 January 2011 23:34:00
It's better to use later versions, 1.9.5 was partially incompatibe with 4.

Posted by: kwrl - Tuesday, 18 January 2011 10:19:17
Hi bbobb, thank you for this information but even the 1.9.5.5 beta (downloaded from Codeplex) generates the same error message. My instict says, it's just a small setting missing. Any advice appreciated! K.

Posted by: Jaben - Tuesday, 18 January 2011 18:59:02
Are these running on shared hosting? Not sure why anyone would receive invalid permissions. And bbobb, YAF v1.9.5 works fine on .NET v4.

Posted by: kwrl - Tuesday, 18 January 2011 19:06:22
Hi Jaben, no, I have a complete virtual HyperV Server with root access; I can change every setting or permission I want. But not sure what to change! :-( 2008 R2 has very high sercurity settings. I'm a developer not a admin .. probably that's the problem! ;-)

Posted by: szabogi - Monday, 20 February 2012 22:51:49
I struggled with this error as well and it is indeed a quick fix to a very small setting. In IIS7 (on Windows 2008 Server): 1. Expand your application pools and locate the pool that is assigned to your YAF application. 2. Select the pool and choose Advanced Settings on the Actions panel OR by right clicking on it and choosing from the right click menu. 3. Under Process Model, look for the property named Load User Profile. This will be set to false. Change it to TRUE. 4. Click OK to commit the change.