in

dashCommerce

An ASP.NET Open Source e-Commerce Application

Security Exception

Last post 10-19-2009 7:04 AM by bikerbene. 28 replies.
Page 1 of 2 (29 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-03-2008 11:26 AM

    Security Exception

    I've been trying to set up dashCommerce on servers at http://www.1and1.com.  Here's what 1and1 told me: http://faq.1and1.com/scripting_languages_supported/asp_net/14.html.  Would this prevent dashCommerce from running on their servers?

     

    Stack trace:

    [SecurityException: Request failed.]
       MettleSystems.Licensing.Web.MasterPage.Render(HtmlTextWriter writer) +0
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.Page.Render(HtmlTextWriter writer) +26
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
       System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
       System.Web.UI.Page.ProcessRequest() +86
       System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
       System.Web.UI.Page.ProcessRequest(HttpContext context) +49
       ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_ibiqn5ct.10.cs:0
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    Thanks for the help,

    Alan

  • 07-03-2008 11:34 AM In reply to

    Re: Security Exception

    Hi Alan,

    It looks like their trust policies may not allow it to run. You can check the Technology page for some details on this. What version of dashCommerce are you using?

    --
    Big Smile ~ Chris

    Open Source = Community = Shared Responsibility = Submit A Patch!
  • 07-03-2008 11:43 AM In reply to

    Re: Security Exception

    Version 3.0.1.33775

  • 07-03-2008 11:46 AM In reply to

    Re: Security Exception

    Ok, so the 3.0.1 release. So, yeah, it looks like they may have some restrictions on their trust policies that may not allow you to run the product there.

    --
    Big Smile ~ Chris

    Open Source = Community = Shared Responsibility = Submit A Patch!
  • 07-03-2008 11:51 AM In reply to

    Re: Security Exception

    Could you tell me which restrictions listed here, http://faq.1and1.com/scripting_languages_supported/asp_net/14.html, prevent dashConnerce from running?

     

    I really appriciate your time,

    Alan

  • 07-03-2008 11:54 AM In reply to

    Re: Security Exception

     Not based on what they provide. are you getting this all the time or just on certain pages?

    --
    Big Smile ~ Chris

    Open Source = Community = Shared Responsibility = Submit A Patch!
  • 07-03-2008 12:11 PM In reply to

    Re: Security Exception

    I get errors on every page I've tried.  Login.aspx and Admin/default.aspx give me:

    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.FileIOPermission, 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.FileIOPermission, 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() +59
       System.Reflection.Assembly.VerifyCodeBaseDiscovery(String codeBase) +118
       System.Reflection.Assembly.get_CodeBase() +32
       System.Web.Handlers.ScriptResourceHandler.GetCodeBaseWithAssert(Assembly assembly) +31
       System.Web.Handlers.ScriptResourceHandler.GetLastWriteTime(Assembly assembly) +36
       System.Web.Handlers.ScriptResourceHandler.GetAssemblyInfoInternal(Assembly assembly) +58
       System.Web.Handlers.ScriptResourceHandler.GetAssemblyInfo(Assembly assembly) +59
       System.Web.Handlers.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl(Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +336
       System.Web.UI.ScriptManager.GetScriptResourceUrl(String resourceName, Assembly assembly) +114
       System.Web.UI.ScriptRegistrationManager.RegisterClientScriptResource(Control control, Type type, String resourceName) +115
       System.Web.UI.ScriptManager.RegisterClientScriptResource(Control control, Type type, String resourceName) +9
    

  • 07-03-2008 12:22 PM In reply to

    Re: Security Exception

     Ok, give me the weekend to look into it and I'll see if I can replicate it and what solution(s), if any, I can come up with. I should add that 1on1 is a pretty big hosting company, so their restictions may be pretty strict. You should ask them for a copy of their web.config to test against, then you can use it on your machine to test against.

    --
    Big Smile ~ Chris

    Open Source = Community = Shared Responsibility = Submit A Patch!
  • 07-03-2008 3:34 PM In reply to

    Re: Security Exception

    web.config or machine.config?

  • 07-03-2008 4:22 PM In reply to

    Re: Security Exception

    web.config, then you'll need to modify your machine level web.config to use the one they give you. BUT, I think I've got it licked. I'll send you a PM.

    --
    Big Smile ~ Chris

    Open Source = Community = Shared Responsibility = Submit A Patch!
  • 07-07-2008 3:00 AM In reply to

    Re: Security Exception

    Can you please post what your findings were? I am having the same problem when trying to run DashCommerce in GoDaddy

  • 07-07-2008 7:54 AM In reply to

    Re: Security Exception

    We didn't come up with a solution.  I decided to use http://www.ixwebhosting.com but you could also check out http://www.dashcommerce.com/Product-dashCommerce-Basic-Hosting_4.aspx.

  • 07-08-2008 12:51 AM In reply to

    Re: Security Exception

    DC should of been coded to run in partially trusted hosting.

    I have never built an assembly using only the permissions neccessary, but I read a book and it seemed easy enough.

  • 04-28-2009 1:15 PM In reply to

    Re: Security Exception

    The issue boils down to inside of MettleSystems.Licensing.Web.MasterPage -  there's a call to get the executing assembly that attempts to read an executing assembly that's outside of the path of the site - specifically, \Temporary ASP.NET Files\ path.

    GoDaddy only provides FileIOPermission for the path of your hosting account and NOT outside of it.

    It would be great if the Licensing call in that code could find another way to provide the FileVersion. 

     Below is the offending call - which is contained in MettleSystems.Licensing.dll assembly

     string fileVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;

    Filed under: , ,
  • 04-28-2009 3:04 PM In reply to

    Re: Security Exception

    I am pretty sure I fixed this a while back. What version of the Licensing assembly are you using?
    --
    Big Smile ~ Chris

    Open Source = Community = Shared Responsibility = Submit A Patch!
Page 1 of 2 (29 items) 1 2 Next >