Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 1st, 2010, 08:11 PM
Authorized User
 
Join Date: Dec 2009
Posts: 63
Thanks: 18
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Wilfredo Rosado
Default Management console

Hi Imar,

While trying to setup roles, as per chapter 15, I type:

http://localhost:4560/management/Default.aspx

in my browser address bar and after hitting the Enter key I get taken to:

http://localhost:4560/login.aspx?Ret...2fDefault.aspx

The pages displays "You are already logged in", and I cannot get into the management page. I obviously did something wrong because I have done this with another project and it worked OK. Can not seem to find what I did wrong.

My MasterPages.master has this code:
Code:
      <div id="Sidebar">
        <asp:LoginView ID="LoginView1" runat="server">
          <RoleGroups>
            <asp:RoleGroup Roles="Managers">
              <ContentTemplate>
                <asp:HyperLink ID="HyperLink1" 
                  runat="server" NavigateUrl= "~/Management/Default.aspx">
                  Manager
                </asp:HyperLink>
              </ContentTemplate>
            </asp:RoleGroup>
          </RoleGroups>
          <LoggedInTemplate>
            <asp:LoginName ID="LoginName1" runat="server" />
          </LoggedInTemplate>
        </asp:LoginView>
      </div>
and at the bottom of the web.config file is:
Code:
  <location path="Management">
    <system.web>
      <authorization>
        <allow roles="Manager" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>
</configuration>
The Default.aspx does exist under the Management folder and this is its contents:
Code:
  <h1>Home-Remake Management section</h1>
  <p>
    Welcome to the management section of this web site.  Please choose an item from the menu at the left to continue.
  </p>
Also I have used the WSAT to create the user Manager and added it to the Managers role.

Any ideas?

Fred

Last edited by Wilfredo Rosado; July 1st, 2010 at 09:17 PM..
 
Old July 2nd, 2010, 12:13 AM
Authorized User
 
Join Date: Dec 2009
Posts: 63
Thanks: 18
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Wilfredo Rosado
Default

Quote:
Originally Posted by Wilfredo Rosado View Post
<allow roles="Manager" />
Hi Imar,

Sorry to bother you again, but I found out what I was doing wrong! In the authorization of the Location of the web.config file, I forgot a letter!

It should have said, <allow roles="Managers" />

I left out the "s" in Managers.

Again my apologies for taking up you time. Maybe this might help someone else someday.

Fred





Similar Threads
Thread Thread Starter Forum Replies Last Post
History tab, Central Management Console Slon Crystal Reports 0 August 28th, 2008 06:52 AM
Console application but no Console gamotter C# 2 August 22nd, 2007 11:41 PM
i need content management console p2ptolu Classic ASP Components 1 February 24th, 2005 07:30 AM
Console.WriteLine ritag ADO.NET 2 February 9th, 2005 11:09 AM
Console events...?! jacob C# 2 February 16th, 2004 06:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.