• 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.

http://www.dynamicdrive.com/dynamicindex1/hvmenu/

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

Are your Navigation Menu related file under the directory that hold the pages requiring login?
0
 
JerSchneidCommented:
What JavaScript error are you getting?
0
 
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.

Thanks,

Ash
0
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.

Thanks,

Ash
0
 
PAQ_ManCommented:
Question Closed, 500 points refunded.
PAQ_Man
Community Support Moderator
0
 
KarthickSethuCommented:
<location path="Scripts">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>

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

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