YAFLogo

coral
  • coral
  • 72% (Friendly)
  • YAF Lover Topic Starter
9 years ago
Hello

I am trying to (clean) install Yaf 1.9.6.1 RTW in remote site which is a shared host with medium trust level (1and1 server) running .Net 4 and IIS 7.5. The installation and setting up database all went well but when the application wants to start I received a security exception. I search this forum and web but I couldn't fix it. Any idea what it is wrong and how I can fix it.

I appreciate your help.

Quote:

System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Quote:

[SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]

System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0

System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31

System.Security.CodeAccessPermission.Demand() +46

System.Environment.get_UserName() +66

YAF.Core.AppInitTaskManager.StartTask(String instanceName, Func`1 start) +154

YAF.Core.Tasks.MailSendingForumModule.Current_AfterInit(Object sender, EventArgs e) +95

System.EventHandler`1.Invoke(Object sender, TEventArgs e) +0

YAF.Core.YafContext.InitUserAndPage() +442

YAF.Core.UserPageBase.get_Page() +89

YAF.Core.UserPageBase.get_PageUserID() +15

YAF.Forum.OnLoad(EventArgs e) +78

System.Web.UI.Control.LoadRecursive() +54

System.Web.UI.Control.LoadRecursive() +145

System.Web.UI.Control.LoadRecursive() +145

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6704

System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245

System.Web.UI.Page.ProcessRequest() +72

System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21

System.Web.UI.Page.ProcessRequest(HttpContext context) +58

ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_0hfdiq2a.0.cs:0

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Sponsor

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
9 years ago
Thanks for the issue report. It should be simple to comment that line of code out. I'll remove it in the latest.
coral
  • coral
  • 72% (Friendly)
  • YAF Lover Topic Starter
9 years ago
Thank you for your reply.

Could you please tell me exactly which line should I comment out?

gdemotchkine
9 years ago
Please let me know as well! i'm dying to deploy this on medium trust/
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
9 years ago
Sorry, turns out it's two places. Please take a look at this changeset for the details:

http://yafnet.codeplex.com/SourceControl/changeset/4250ba3863ec 

coral
  • coral
  • 72% (Friendly)
  • YAF Lover Topic Starter
9 years ago
I can now entre the forum.

Many thanks.