473,795 Members | 3,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form authorization problem

Hi, How should I write the web.config file to allow some of the aspx files
be executable to all users and others are required users to login? All the
aspx files are in the same folder.
Nov 18 '05 #1
3 2516
you could use something like this :
<authenticati on mode="Forms">
<forms name="YourName" loginUrl="login .aspx" protection="All " />
</authentication>
<authorizatio n>
<deny users="?" />
<allow users="*" />
</authorization>

<location path="yourpage. aspx">
<system.web>
<authorizatio n>
<allow users="*"/>
</authorization>
</system.web>
</location>

This will ask the user for login, but if the user reach yourpage.aspx it
will be allowed to everybody without a login

Regards
Martin

"nick" <nb***@removeth is.hotmail.com> wrote in message
news:Om******** ******@tk2msftn gp13.phx.gbl...
Hi, How should I write the web.config file to allow some of the aspx files
be executable to all users and others are required users to login? All the
aspx files are in the same folder.

Nov 18 '05 #2
Thanks, however, after I modified the code, I got the following error:

Server Error in '/calendar' Application.
----------------------------------------------------------------------------
----

Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: Unrecognized configuration section 'location'

Source Error:

Line 71: -->
Line 72: </authorization>
Line 73: <location path="calendar. aspx">
Line 74: <system.web>
Line 75: <authorizatio n>

Source File: c:\inetpub\wwwr oot\calendar\we b.config Line: 73

"Martin Marinov" <me********@mec rossroad.bg> wrote in message
news:OZ******** ******@tk2msftn gp13.phx.gbl...
you could use something like this :
<authenticati on mode="Forms">
<forms name="YourName" loginUrl="login .aspx" protection="All " />
</authentication>
<authorizatio n>
<deny users="?" />
<allow users="*" />
</authorization>

<location path="yourpage. aspx">
<system.web>
<authorizatio n>
<allow users="*"/>
</authorization>
</system.web>
</location>

This will ask the user for login, but if the user reach yourpage.aspx it
will be allowed to everybody without a login

Regards
Martin

"nick" <nb***@removeth is.hotmail.com> wrote in message
news:Om******** ******@tk2msftn gp13.phx.gbl...
Hi, How should I write the web.config file to allow some of the aspx files be executable to all users and others are required users to login? All the aspx files are in the same folder.


Nov 18 '05 #3
never mind, the location is at wrong place...

"nick" <nb***@removeth is.hotmail.com> wrote in message
news:uB******** ******@TK2MSFTN GP12.phx.gbl...
Thanks, however, after I modified the code, I got the following error:

Server Error in '/calendar' Application.
-------------------------------------------------------------------------- -- ----

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: Unrecognized configuration section 'location'

Source Error:

Line 71: -->
Line 72: </authorization>
Line 73: <location path="calendar. aspx">
Line 74: <system.web>
Line 75: <authorizatio n>

Source File: c:\inetpub\wwwr oot\calendar\we b.config Line: 73

"Martin Marinov" <me********@mec rossroad.bg> wrote in message
news:OZ******** ******@tk2msftn gp13.phx.gbl...
you could use something like this :
<authenticati on mode="Forms">
<forms name="YourName" loginUrl="login .aspx" protection="All " />
</authentication>
<authorizatio n>
<deny users="?" />
<allow users="*" />
</authorization>

<location path="yourpage. aspx">
<system.web>
<authorizatio n>
<allow users="*"/>
</authorization>
</system.web>
</location>

This will ask the user for login, but if the user reach yourpage.aspx it
will be allowed to everybody without a login

Regards
Martin

"nick" <nb***@removeth is.hotmail.com> wrote in message
news:Om******** ******@tk2msftn gp13.phx.gbl...
Hi, How should I write the web.config file to allow some of the aspx files be executable to all users and others are required users to login? All the aspx files are in the same folder.



Nov 18 '05 #4

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

Similar topics

11
2973
by: David W. Simmonds | last post by:
I have a form that will prompt for a user name/password. In VS.NET, I have the protected form in a folder named Admin. I have a Web.config file in that folder as well. It contains the following section: <authorization> <deny users="?" /> <allow users="*" /> </authorization> In the root folder where the other forms are located I have a Web.config
13
1687
by: david | last post by:
I can not figure out what is the problem that I can protect ASP.NEt form resource but not some other type of files, for example, images. All my aspx forms located in Demo folder and image files located in a subfolder of Demo, named images. I implement Role based form authentication. When I access all aps forms, it works fine and ask me user/password. However, I can use IE browser to directly access any image file in subfolder images. My...
2
1135
by: sduncansca | last post by:
Hi I have an ASP.NET v1.4 application that uses form based authorization. My authorization section of the web.config looks like <authorization> <deny users="?" /> <allow users="*" /> </authorization> Whenever I tried to open the project using VS 2003 it generates a ASP.NET
3
2422
by: serge calderara | last post by:
Dear all, I clearly underdand the advantage of both type of authentification but is it allowed or possible to set the Authentication mode to Windows and then handle a login form for defined users in Credential section like as follow : <authentication mode="Windows" > <forms loginUrl="Login.aspx"> <credentials passwordFormat="Clear"> <user name="Jessee" password="JuneBug"/>
5
1631
by: | last post by:
When completing certain types of transactions, the users of my app will need to have the clients sign an authorization form. I want to add a button to the page that allows them to print the auth form customized with the client's name, etc... I was thinking of using MS Word and automating it with client side VBScript. I want to store the template on the server so it can be updated centrally. I don't need to save the doc anywhere, just...
1
1834
by: sonu | last post by:
Mark is creating a website using ASP.NET. He is using Forms authentication for authenticating and authorizing users. He has the following layout of files and directories in his website: Root ....File Manager/ ....Files Employee/
2
2480
by: Gnic | last post by:
Hi, I am a page that sit on a form authentication directory, but I have 1 or 2 pages that don't require form authentication, also I have a web service class in this directory as well, I am wondering how can I exclude those aspx and asmx from form authentication? thanks Gnic
2
3081
by: nick | last post by:
I have an Asp.Net 2.0 application using form authentication. I want the html pages be protected by the authentication system too. The accessing of html files need to be authenticated in my local system. However, it doesn't after I uploaded the files to my web host site. Any setting to modify to make my hosting html files need to be authenticated too?
0
1464
by: sandari | last post by:
The following code (web.config in Visual Studio 2005) is supposed to redirect a user to the appropriate Form depending on their role. However, regardless of the user's role, the only page displayed is the login page with the URL of the page the user was supposed to go to being displayed in the address bar. A valid user is: name "sandy" password = san_mcd role = Administrator ...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
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
10448
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...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9046
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...
0
5440
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
4114
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
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
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.