CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 2/12/2008 7:41:32 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 32 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
stratoblue
Asp.Net User
Why does my web site not redirect to the login page?2/12/2008 7:41:32 PM

0/0

I want to use Forms Authentication.  So I changed my web.config like so:

 <authentication mode="Forms"/>

and created a Login page.  However when I press F5, the browser displays default.aspx instead of login.aspx.  What could be the problem?

 

 

jeff@zina.com
Asp.Net User
Re: Why does my web site not redirect to the login page?2/12/2008 7:47:21 PM

0/0

If that's the only thing you did, then there are many problems.  Take a look at the tutorials in the Learn section of this site to undestand and configure forms authentication.

Jeff


Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
XiaoYong Dai –
Asp.Net User
Re: Why does my web site not redirect to the login page?2/14/2008 8:23:04 AM

0/0

Hi

Will it help if you add the following code in default.aspx page?

 protected void Page_Load(object sender, EventArgs e)
 {
        if (!Request.IsAuthenticated)
        {
            Response.Redirect("login.aspx");
       
        }
}


Best Regards
XiaoYong Dai
Microsoft Online Community Support

Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
stratoblue
Asp.Net User
Re: Why does my web site not redirect to the login page?2/15/2008 3:41:04 AM

0/0

Xiao Yong Dai,

Thanks.  Yes, that does help.  So now the baffling questions are: why do I need to have to do that?  Do I need to do the same for all pages? 

BTW, I created a new web site, made the same change to web.config. I get redirected to login.aspx automatically.  There must be something in my misbehaving website that prevents redirecting to login.aspx.  What could it be?

XiaoYong Dai –
Asp.Net User
Re: Why does my web site not redirect to the login page?2/15/2008 5:51:35 AM

0/0

Hi

You can prevent all the anonymous user from accessing default page using authorization setting in web.config. This can also be accomplished using a Web Site Administration Tool.

http://msdn2.microsoft.com/en-us/library/ssa0wsyf.aspx


Best Regards
XiaoYong Dai
Microsoft Online Community Support

Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Microsoft Exchange Server 2003 Advanced Administration: Advanced Administration Authors: Jim McBee, Pages: 956, Published: 2006
Special Edition Using Microsoft Office FrontPage 2003: Special Edition Authors: Jim Cheshire, Paul Colligan, Pages: 1080, Published: 2003
Pro ASP.NET 2.0 Website Programming Authors: Damon Armstrong, Pages: 641, Published: 2005
Professional ASP.NET 2.0 Security, Membership, and Role Management Authors: Stefan Schackow, Pages: 611, Published: 2006
Struts: The Complete Reference Authors: James Holmes, Pages: 800, Published: 2006
ASP.NET 2.0 Cookbook Authors: Michael A. Kittel, Geoffrey T. Leblond, Pages: 989, Published: 2005
Beginning PHP5, Apache, and MySQL Web Development Authors: Elizabeth Naramore, Michael K. Glass, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Pages: 798, Published: 2005
ASP.NET in a Nutshell: In a Nutshell Authors: G. Andrew Duthie, Matthew MacDonald, Pages: 979, Published: 2003
JavaServer Pages Authors: Hans Bergsten, Pages: 740, Published: 2003
Practical Web 2.0 Applications with PHP Authors: Quentin Zervaas, Pages: 570, Published: 2007

Web:
Login page does not redirect back to application - MySpace ... Since today the login page does not redirect back to the oauth_callback ... 1) Only live website/app will have their callback_url forwarded. ...
my website does not function in twitter Oct 9, 2008 ... my website does not function in twitter, the RSS Feed URL alleges ... redirects to some login page - there is really nothing I can do about ...
microsoft.public.dotnet.framework.aspnet.security: Forms ... I can get the login page to show up every time, but, when it authenticates ... I know the database routine ... Forms Authentication - Does Not Redirect ...
WordPress › Support » Redirecting to the dashboard on login? I do expect people who want to run a website to know how to run a website. .... decipher than the simple on page login/redirect i have working in content. ...
Redirection - Manage 301 redirections without modifying Apache ... The source does not require your website address, and it is only possible .... Why does Redirection want to overwrite my well-configured .httaccess removing ...
Steven Hargrove : How to redirect a web page, the smart way server is on http://www.own-free-website.com/login.php, using website templates, ... this is because my application does not have a home page, ...
Redirect Login to static page on my site - Mambo CMS Forum Hello, I want my login page to redirect to a static content page on my site. I can't figure out what the URL to that page is. ...
CodeProject: Redirecting to custom 401 page when "Access denied ... Attention: The IIS website must be configured to allow anonymous access. .... window still show up but not redirecting to the custom 401 page (login.aspx). ...
login.aspx does not redirect to default.aspx in IE but works in FF ... login.aspx does not redirect to default.aspx in IE but works in FF .... My page had 2 forms: one for a search(generic site search) as part ...
/exchange does not redirect to /owa after login for Exchange 2007 ... Remove-OwaVirtualDirectory “exchange (default web site)” ... You are correct in the /exchange logon does not get redirected to /owa. Check Info ...

Videos:
Wealthy Affiliate now has FREE web hosting for all members http://TheWiseAffiliate.com Free Web Hosting - Now Included Your Wealthy Affiliate membership now includes FREE Hosting. All members will get the...
Re: Make money with Affiliate Marketing, Google Adwords http://TheWiseAffiliate.com Free Web Hosting - Now Included Your Wealthy Affiliate membership now includes FREE Hosting. All members will get their...
How To Break Web Software - A look at security vulnerabilities in web software Google TechTalks April 13, 2006 Mike Andrews Mike Andrews is a senior consultant who specializes in software security and leads the web application...
Badvertisements: Stealthy Click Fraud with Unwitting Accessories Google Tech Talks September 19, 2006 Dr. Markus Jakobsson, Associate Professor of Informatics at IUB Associate Director of CACR ABSTRACT We descri...
Affiliate Summit 2006 East -- Straight Talk on Search Engine Optimization Brief presentation on Search Engine Optimization with a heavy focus on Q&A. A very open, honest and straight to the point discussion about search eng...
RickRoll'D RickRoll'd OMG OMG OMG OVER 10 MILLION RICKROLL'd! http://tinyurl.com/642wu3 Click for information on the origin of the rickroll, and other facts!




Search This Site:










how to retrieve values ingridview?

variable scope

3.0.5 issue - roles with edit tab permissions see 'common tasks'

user.identity is "" when administrator...

can't open the code behind!!! help! thanks!

is it possible?

dllimport in asp.net

getwebrequest is returning data from production server even when my proxies are pointing to dev box

controlling browser

conflict with system.web.ui.masterpage / myown base class

wizard class in 3.1.1 (possible bug?)

unable to call adduserrole without error.

problem with loading the components

you are not authorized to view this page error

some design help please.

resolving relative urls with firefox vs. ie

compiling c# code

1 simple question

http/1.0 500 server error problem

problem eith ie web controls

why do some smtp server work well and some server fail when i use smtpclient function to send email?

desplay int as decimal when debug

dividebyzeroexception error in datacolumn expression

referencing other web projects

please help me

how can i start with asp.net

profiles customprovider

personal starter kit contact me page

multiple labels or 1 global variables?? advice needed?

datetime picker in asp.net 2.0 using javscript

 
All Times Are GMT