• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1149
  • Last Modified:

ASP.NET: Forms Authentication and javascript

Let's see if someone can explain this goofiness.  I'm using Forms Authentication in ASP.NET (VB.NET) to handle my site logins.  This works great.  However, when the users are redirected to the page they were requesting before login there is an error in the javascript that loads up the site navigation menu.  The error, of course, prevents the menu from loading at all.  Here's where it gets goofy.  If I log out and then log back in without closing the browser, the menu loads up just fine.  The menu I'm using is HV Menu from dynamic drive.


Any ideas on this one fellas?  I'm prettymuch stumped.  
Ashley Bryant
Ashley Bryant
1 Solution
Do you have a live version we can try?

Are your Navigation Menu related file under the directory that hold the pages requiring login?
What JavaScript error are you getting?
Ashley BryantSenior Software EngineerAuthor Commented:
Unfortunately it's a government site that's not accessible by the outside world.  I'm not at work right now, but the errors were popping up for the menu_com.js file when it calles the BeforeStart function (assuming you've downloaded and looked at HV Menu code).

Interesting item:  I changed the FormsAuthentication.RedirectFromLoginPage persist cookie property to true and after the first time a user logs in the javascript error doesn't pop up anymore, even if they reopen their browser and start a new session.  Pretty weird that that would prevent the error.

I'm heading out of town for three weeks (Hawaii, woot!) so I'll take a look at this more when I get back.


Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Ashley BryantSenior Software EngineerAuthor Commented:
I ended up scrapping the javascript driven menu and using a CSS built <ul> menu instead.  Way WAY faster and no need to load any external files.  Requesting that the question be closed.


Question Closed, 500 points refunded.
Community Support Moderator
<location path="Scripts">
<allow users="*"/>

For me the above helpmed me solve it - just replace "Scripts" with your respective folder. Add these tags just above the </configuration> tag.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now