Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

forms based security question

  Asked By: Raju    Date: Dec 27    Category: Asp.net    Views: 723
  

I'm trying to implement forms based security in an ASP.NET web
application. I'm having some issues with web.config. This is my
authentication tag:


<authentication mode="Forms">
<forms name=".MENTORAUTH" loginURL="secure/login.aspx"
protection="All">
</forms>
</authentication>

secure is a sub-folder in the application that was created so that
different user authorizations could be implemented at that level in
addition to the SSL (note that SSL has not yet been added as I am
still debugging the site).

When I try to run the application, ASP.NET tells me that loginURL is
not a valid attribute. Every example of doing this I can find
includes loginURL (including all the stuff on MSDN). Obviously it
does exist. Is there a formatting error I don't know about or other
reason why ASP.NET would not like this statement? It is included
within the <configuration> and <System.web> tags if that helps.

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Lurlene Fischer     Answered On: Dec 27

I think it is case-sesitive. Try:
loginUrl

 
Answer #2    Answered By: Helene Stewart     Answered On: Dec 27

This works for me, thanks to this group helping me
out. For <location> tag  you can put a folder instead
of a filename and then all files within that folder
get redirected to the login.aspx page. I found all
this works if I put it right after the <configuration>
tag but before the big <system.web> tab (I know, I
know):


<!-- enable forms  authentication -->
<system.web>
<authentication mode="Forms">
<forms name="dancedance" loginUrl="login.aspx" />
</authentication>
</system.web>

<location path="admin.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>

 
Answer #3    Answered By: Feodora Bonkob     Answered On: Dec 27

try change loginURL by loginUrl
the web.config is case sensitive.

 
Didn't find what you were looking for? Find more on forms based security question Or get search suggestion and latest updates.




Tagged: