Ok, I have this working except I just tried testing logging in with a user that is NOT allowed to login to this website. I have the monox web.config file locked down to only allow certain groups to login.
However, upon clicking Submit, I get a Security Exception server error in asp.net rather than a page that just says that the user is not allowed to login.
Any idea how to make it go to a page that just says that the user doesn't have the authentication to be able to do that?
Once you click Log In, it dumps you into that unhandled security exception page rather than keeping you on the login page where it says you are not authorized to view the content. If you press the back button it tells you that you're logged in, but not authorized to view the page.
Is there anyway to make it not throw that security error and to land you on the login page where unauthorized equals true? Which config file is this referencing and what permissions does the application need?
Here is the security error page I'm getting thrown at:
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: Security 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.
[SecurityException: Security error.]
MonoSoftware.MonoX.BasePage.OnInit(EventArgs e) +306
System.Web.UI.Control.InitRecursive(Control namingContainer) +491
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5604
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +742
System.Web.UI.Page.ProcessRequest(HttpContext context) +142
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +256