admin menu missing

Topics: ASP.NET 2.0
Feb 10, 2010 at 9:49 PM

Hi Guys

I am really struggling, and it should be so straightforward... Please help!

Am installing v 1.6 on my development machine (vista, IIS7), as an application within an existing website ,and I followed
the SQL server setup option, and made the change to web.config to change the default blog provider to
'dbBlogProvider' , and the set the db connection to my existing database.
I am using the default xml setup for the users.
I have enabled Forms Authentication in iis.
Using classic asp.net application pool.
Asp.net version is 3.5

The default SQL server welcome blog shows up OK, and if I login using admin/admin as per instructions.
nothing happens.   ie it does not say the login is invalid, but the admin menu does not appear, so nothing
more can be done.

In Firefox, I can see the .AUXBLOGENGINE cookie in host 'localhost' after login (does that need to be in the application level?)
but no other relevant cookie.

I am not sure where to go now - no error messages but no action either?

Can someone tell me where to go next?

Thanks a lot!

Clive

 

 

 

 

 

 

 

Coordinator
Feb 10, 2010 at 10:46 PM

In addition to the .AUXBLOGENGINE cookie, there should also be a .BLOGENGINEROLES cookie.  This is defined in the web.config file in the <roleManager> section.

I remember in the past some others who had this type of problem where the main forms authentication cookie is there, but not the role cookie.  You can search the Discussions here for that.  I don't remember a single solution, unfortunately.  From my recollection, the problem is related to the website configuration in IIS, or something being inherited from a parent application.

Mar 23, 2010 at 10:57 AM
Edited Mar 23, 2010 at 11:13 AM

Hi All,

I have read through the posts mentioned above, but I am still experiencing the same problem. The two cookies are present, but still no admin menu after I login.

Has anyone found the solution to this, or maybe point me in another direction?

Coordinator
Mar 23, 2010 at 3:36 PM

What happens if you navigate to http://yoursite/admin/Pages/Settings.aspx?

Mar 23, 2010 at 4:04 PM
rtur wrote:

What happens if you navigate to http://yoursite/admin/Pages/Settings.aspx?

I finally resolved all my issues without investigating further by creating a subdomain and installing the blog in that, so I did not have to persuade the blog to live within another website, and have conflicts between web.configs etc.

I guess this was the wimps way out but life is short... project to finish, client to satisfy...

Mar 24, 2010 at 7:07 AM
Edited Mar 24, 2010 at 7:09 AM
rtur wrote:

What happens if you navigate to http://yoursite/admin/Pages/Settings.aspx?

If I navigate to that path, it takes me to the login page.

 

Mar 29, 2010 at 2:27 PM

anyone, please?

Coordinator
Mar 29, 2010 at 10:50 PM

How have you verified that the 2 cookies are there?  If you use Fiddler or Firebug, for example, do you see the 2 cookies being exchanged between your browser and the site?  Or after you've logged in, in Firefox if you go to Page Info -> Security -> View Cookies, you see both the cookies there?

Mar 30, 2010 at 7:37 AM

Hi BenAmada, once logged in, I check the cookies with firefox. Right click > Page Info > Security > View Cookies. When I go this route, I see both cookies are present.

 

Coordinator
Mar 30, 2010 at 7:44 AM

Have you modified the web.config file at all?  In it, those two cookie names should be in it.

<forms timeout="129600" name=".AUXBLOGENGINE" protection="All" slidingExpiration="true" loginUrl="~/login.aspx" cookieless="UseCookies"/>
<roleManager defaultProvider="XmlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
Is the blog installed in a subfolder?  If so, it could be inheriting settings from the parent application that are causing problems.

Mar 30, 2010 at 9:08 AM

Those two cookie names do appear in the web.config file.

Yes, the blog is in a subfolder. How would I stop it from inheriting settings from it's parent folder? The root directory has no web.config file.

Coordinator
Mar 30, 2010 at 9:50 AM

If you don't have a web.config file in the parent folder, then there's probably nothing to worry about there.  If you did have one, you could modify the parent's web.config file like shown here to prevent settings from propagating down to the child applications.

As a test, in your theme folder's site.master file, right after the <body> tag, try adding this:

<h1>IsAuthenticated = <%= Page.User.Identity.IsAuthenticated %></h1>
And then pull up the blog.  In pretty big font, you should see either "IsAuthenticated = True" or "IsAuthenticated = False".  You can try doing this both before and after you've tried to log in.

Also, maybe try checking to see if the same problem with the menu not appearing exists with the Standard theme (if you're not already using the Standard theme).

Mar 30, 2010 at 2:03 PM

Hi Ben, thanks for all your help so far.

I have added the line of code. Before I log in, the value is false. After login. the value is true. The same thing happens with the standard theme....

Coordinator
Mar 31, 2010 at 10:21 AM

That's good news that it at least reports 'true' when you're logged in.  You can also check to see what roles you're in by adding this markup to the same place in the site.master file:

<h1>Roles = <%= string.Join(", ", System.Web.Security.Roles.GetRolesForUser(Page.User.Identity.Name)) %></h1>
When logged in, it should hopefully report "Roles = Administrators".  That's what I see on my blog.

Apr 1, 2010 at 7:24 AM

HI Ben,

Thanks for your patience. I ended up doing a clean install, re-adding users and changing the settings manually.

Apr 16, 2010 at 12:32 AM

Hi all

I have the same problem. The login with IE8 doesn't work. The query

<h1>IsAuthenticated = <%= Page.User.Identity.IsAuthenticated %></h1>

is always false. But... it works with Firefox! That means, that as soon as I hit the enter button, I see the admin menu and the IsAuthenticated value is true.

So way is this working with Firefox and not with IE8? I've downloaded the latest version and have done a fresh install.

 

Any hint is highly appreciated. Thanks,

Dominik

Apr 23, 2010 at 7:52 AM

Just installed 1.6.1, but the issue with IE and the missing admin menu is still unsolved. :-(   

Anyone?

Coordinator
Apr 23, 2010 at 11:13 AM

Maybe your browser security settings are too high in IE.  Can you log into other sites in that same IE browser?  You could try adding your blog URL as a "trusted site" within IE -- which should prevent any problems with IE possibly blocking cookies.

There's nothing in BE that sets authentication cookies differently based on browser.  Because you can log in with Firefox, I'm 99.99999% sure this is some problem with IE -- on the client side, not server side.

You could also try logging into the site with IE, but IE on a different machine.

Apr 23, 2010 at 12:08 PM

Hi Ben

thanks for your answer. But, I've already tried it without success. Although the site is configured as a trusted site, it doesn't work. And I can test it with several clients, so it cannot be a issue of a single client/IE.

May 28, 2010 at 10:53 PM
BenAmada wrote:

If you don't have a web.config file in the parent folder, then there's probably nothing to worry about there.  If you did have one, you could modify the parent's web.config file like shown here to prevent settings from propagating down to the child applications.

As a test, in your theme folder's site.master file, right after the <body> tag, try adding this:

<h1>IsAuthenticated = <%= Page.User.Identity.IsAuthenticated %></h1>
And then pull up the blog.  In pretty big font, you should see either "IsAuthenticated = True" or "IsAuthenticated = False".  You can try doing this both before and after you've tried to log in.

Also, maybe try checking to see if the same problem with the menu not appearing exists with the Standard theme (if you're not already using the Standard theme).

 Hi Ben,

I am having trouble seeing the admin pages, and up to this point this post matches the symptoms I see exactly running with dbroleprovider and dbmemberprovider, updating the tables with anything other than admin and blank results in the "unable to logon" error being displayed and using your tip above, logging on with admin & admin I do not get the error but the extra line of code you give above shows that the login is not being authenticated

Can you advise what to do next?

Thanks in advance

Mike

 

Coordinator
May 29, 2010 at 1:10 PM

I would try temporarily switching to the XmlMembershipProvider and XmlRoleProvider providers (in the web.config file) to see if you can log in, and if the admin menu appears.

To switch to these, you would only need to change the "defaultProvider" for both <membership> and <roleManager> to these providers.

May 29, 2010 at 2:58 PM

Hi Ben,

Switching to XML mode allows me to logon and authenticate, I had hoped to use the database but since XML works I will stick with that for now.

Thanks

Mike