In the figure, I applied the Classic scheme (Jetty web server)

In the figure, I applied the Classic scheme to the ChangePassword control, just to give it some color. But even that step is optional. The control doesn t require any further configuration, so you can just close and save the page. Testing Membership At this point, you have built some more of your site s membership infrastructure. When you test pages by viewing them in a Web browser, you will be experiencing the site exactly as strangers who are visiting the site will experience it. That can be very confusing if you forget about the access rules you defined back when you were first configuring membership. For example, if you right-click the ChangePassword.aspx page and choose View in Browser, you might be shocked to discover that the ChangePassword.aspx page doesn t open. Instead, the Login.aspx page opens! Most confusing indeed! But it s not an error or a problem. It s the way things are supposed to work. Here s why. Any page that s stored in the MemberPages folder is off-limits to anonymous users (assuming you created an access rule to make it off-limits, as described in Chapter 3). When an anonymous user attempts to open a page in the Member Pages folder, she is automatically redirected to the Login.aspx page. If you re not signed into an account when you try to open ChangePassword.aspx, the same rule applies to you. Opening ChangePassword.aspx automatically redirects you to Login.aspx. If you sign into a user account on the Login.aspx page and click the Submit button, then you ll be taken to the ChangePassword.aspx page. It s important to understand how that works, otherwise you ll drive yourself absolutely batty trying to open members-only pages from the standpoint of an anonymous user, because every page you try to open will take you to Login.aspx until you actually log into a user account. Drag Figure 7-19: Change Password control added to a page. 146 Part II: Building Your Web Site
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision j2ee hosting services

Leave a Reply