ASP.Net initial member participation issues
I am having a problem with
throwing exceptions. Any pages where I have a method attribute
throw an exception immediately after the initial login.
<PrincipalePermission(SecurityAction.Demand, role:="Level1")> _ Protected Sub Page_Load(ByVal sender As Object, ByVal e as System.EventArgs) Handles Me.Load End Sub
This throws an exception
Request for principal permission failed
If I remove this, the page loads fine and I can navigate to another page that has this same attribute and it works flawlessly. Also if I use the membership system
I have no problem.
I noticed that after the initial login, mine
is of type
. Subsequent queries display the correct type instead of the generic one. I tried to force this on a file
in an event
, but asp.net seems to set
Any ideas on how to fix this behavior or am I sticking with the method
After finding some explanation of what's going on in the pipeline here , I can see why changing it to
didn't help. I used to have a prototype of a project that I was testing and I couldn't reproduce it there. I am wondering if it has anything to do with the type of project. The prototype is the website project and the problematic is the web application project.
I think it's odd that
, but only after the initial request has been processed. So it's hard to say that its not working like it doesn't before my "Page_Load" is executed.
source to share