473,657 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

In my current web.config, I have these lines
-----------------------------------------------------------
<authenticati on mode="Forms">
<forms name="frmAuthen tication" 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 5080
In the current web.config (that has this <authentication > setting) you
probably have authorization set as:

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

that would impact all pages in the application by default.

Now to the answer, you can specify different <authorizatio n> 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
<configuratio n> elements.

<location path="contactUS .aspx">
<system.web>
<authorizatio n>
<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******** ******@TK2MSFTN GP10.phx.gbl...
In my current web.config, I have these lines
-----------------------------------------------------------
<authenticati on mode="Forms">
<forms name="frmAuthen tication" 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
1521
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 registered users). Is it possible to store credentials in two different places and using only one login page? (the administrator credentials in web.config file while the registered users credentials are stored in the database).
2
3842
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. My main domain points to the root /. space in my account and contains various htm and aspx pages that work just fine (well I had problems with Session state but that's another story!) the web.config file for this 'app' resides in
4
10566
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 application so that users who try to access a page in the application, get redirected to login.aspx where they have to sign in. (And the "signing in" is handled in the codebehind page of
4
1773
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 specify in the config file all of the pages that require a user to login otherwise the page will redirect if the user is not logged in. config.php looks like this: ----------------------
2
4752
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" with the
2
2009
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 be customized according to the "rank" of the user. So for some users, some menu options will not be visible but for others, they will be. My question is, how can I assign users to certain "groups" inside the web.config file so that when the...
3
2112
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
2348
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 pages. In order to try to do this I have added the following test code in our web.config file. <location path="Login.aspx"> <system.web>
4
2939
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 2.0 I locate my whole project in a folder named C:\website\GOWatch
0
8319
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8512
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7347
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.