473,388 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

In web.config, how to specify a page that can be accessed without login?

In my current web.config, I have these lines
-----------------------------------------------------------
<authentication mode="Forms">
<forms name="frmAuthentication" loginUrl="login.aspx" />
</authentication>
-----------------------------------------------------------
How do I need to modify it, so that contactUS.aspx should be accessed
without logining in.

Thanks a lot in advance,


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #1
2 5068
In the current web.config (that has this <authentication> setting) you
probably have authorization set as:

<authorization>
<deny users="?" />
</authorization>

that would impact all pages in the application by default.

Now to the answer, you can specify different <authorization> for a specific
page or subfolder by using <location> tag. Set this <location> element
outside the <system.web> tags in current web.config, but of course inside
<configuration> elements.

<location path="contactUS.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

Now remembering the setting in generally to deby unauthorized users,
unauthorized users can now access login.aspx and contactUS.aspx pages in
your application.

--
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com
"TaeHo Yoo" <yo******@yahoo.com> wrote in message
news:uK**************@TK2MSFTNGP10.phx.gbl...
In my current web.config, I have these lines
-----------------------------------------------------------
<authentication mode="Forms">
<forms name="frmAuthentication" loginUrl="login.aspx" />
</authentication>
-----------------------------------------------------------
How do I need to modify it, so that contactUS.aspx should be accessed
without logining in.

Thanks a lot in advance,


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #2
Thanks a lot Teemu Keiski.
However, a trick I have at the moment is when I access a page instead of
saying http://www.AWebSite.com/ContactUs.aspx

I do like
http://www.AWebSite.com/default.aspx?page_id=1
where ContactUs.ascx's page_id = 1

I created ContactUs user control and using page_id I load this user
control to default.aspx.
In this scenario how to make ContactUs.ascx page accessable to anyboy?

Thanks a lot


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gamze | last post by:
Hi, I have difficulties about authentication & authorization thing. My project has an admin folder (which can only be accessed by administrator) and a secret folder - (can be accessed by...
2
by: Martin | last post by:
Hi I am noticing some strange behaviour in some asp.net pages that I have put together and am hoping someone can explain to me what is happening. I have two domains hosted at oneandone.co.uk....
4
by: Bennett Haselton | last post by:
If I add this to my web.config file: <authentication mode="Forms"> <forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="60" /> </authentication> I can configure the...
4
by: Greg Scharlemann | last post by:
I thought I had a workable approach to specifing which pages required a redirect in a config file, but it appears the way I'm attempting to do it is not going to work. The idea is that I can...
2
by: Luke Dalessandro | last post by:
I have an application with the following layout /root/ /root/Default.aspx /root/web.config /root/child/ /root/child/web.config web.config has a custom configuration section "testSection"...
2
by: Jessica Weiner | last post by:
I have a web.config file which defines different users who can login into the website. After a successful login, the user gets to a page with a javascript menubar at the top. The menu bar needs to...
3
by: thomas | last post by:
How to specify application default web page in web.config? I mean, default web page, not a login page. Is it possible? Tomasz
2
by: alexvodovoz | last post by:
Hi, I have been struggling with this for the past couple of days. We have a custom http module setup in our project to filter some requests. I only want this module to be applied to certain...
4
by: yancheng.cheok | last post by:
Hello all, I have a web application, which I had developed few years ago with ASP .NET 1.1 Today, I would like to deploy the web application to client, using ASP .NET 2.0 + UltiDev Cassini...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.