Ask a Question related to ASP.NET General, Design and Development.
-
TaeHo Yoo #1
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 [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
TaeHo Yoo Guest
-
Strange problem with Forms authentication: After successfull login, login page is still displayed
Hi there I have a quite strange problem with my ASP.NET-Application. The application has being deployed one year ago and worked fine till last... -
dynamic userControl can't be accessed during page load
I have a userControl that I create based on how many rows I retrieve in a dataset. I add the control to my page but can't access it during the... -
What code would I use to ensure a page is accessed by another within my site?
I'm trying to prevent "leeching"..so that users must enter my site to get to the files. Does anyone know a script that will work? Thanks a... -
How to assign two or more login page in Web.config?
Hi,Good Afternoon. Now my web application need 2 login page. What can I do? how can I modify the web.config to meet the requirement? Thanks a lot! -
Web config file in another app being accessed in error!!??
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... -
Teemu Keiski #2
Re: In web.config, how to specify a page that can be accessed without login?
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
[url]http://www.mansoft.fi[/url]
AspInsiders Member, [url]www.aspinsiders.com[/url]
ASP.NET Forums Moderator, [url]www.asp.net[/url]
AspAlliance Columnist, [url]www.aspalliance.com[/url]
"TaeHo Yoo" <yootaeho@yahoo.com> wrote in message
news:uKLee2dTDHA.2180@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 [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Teemu Keiski Guest
-
TaeHo Yoo #3
Re: In web.config, how to specify a page that can be accessed without login?
Thanks a lot Teemu Keiski.
However, a trick I have at the moment is when I access a page instead of
saying [url]http://www.AWebSite.com/ContactUs.aspx[/url]
I do like
[url]http://www.AWebSite.com/default.aspx?page_id=1[/url]
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 [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
TaeHo Yoo Guest



Reply With Quote

