In my ASP.NET app, I have a few pages that I want to be public (i.e.
accessible by everyone) and the rest private (user has to be signed in). In
the examples I've seen, the public files have been in the root folder with
it's own Web.config file and the private ones in a subfolder with a separate
Web.config file.
Must I necessarily use a subfolder to separate private from public files?
Could I maybe have them all in the same root folder but then perhaps list
the public pages somehow in the Web.config file? I'm just looking for the
best, most standard way to do this.
Thanks,
Ron 2 4717
No, you don't have to. Just use a location element within
your web.config. Go here for an example: http://www.wilsondotnet.com/Code/?pa...ile=Web.config -----Original Message----- In my ASP.NET app, I have a few pages that I want to be
public (i.e.accessible by everyone) and the rest private (user has to
be signed in). Inthe examples I've seen, the public files have been in the
root folder withit's own Web.config file and the private ones in a
subfolder with a separateWeb.config file.
Must I necessarily use a subfolder to separate private
from public files?Could I maybe have them all in the same root folder but
then perhaps listthe public pages somehow in the Web.config file? I'm
just looking for thebest, most standard way to do this.
Thanks, Ron
.
Thanks.. that works great. But, would I have to create a locatio section
for every public page or is there a more abbreviated way to do it?
<location path="About.asp x">
<system.web>
<authorizatio n>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Help.aspx ">
<system.web>
<authorizatio n>
<allow users="*" />
</authorization>
</system.web>
</location>
Thanks,
Ron
"JKJ" <je************ **@mchsi.com> wrote in message
news:05******** *************** *****@phx.gbl.. . No, you don't have to. Just use a location element within your web.config. Go here for an example:
http://www.wilsondotnet.com/Code/?pa...ile=Web.config
-----Original Message----- In my ASP.NET app, I have a few pages that I want to be public (i.e.accessible by everyone) and the rest private (user has to be signed in). Inthe examples I've seen, the public files have been in the root folder withit's own Web.config file and the private ones in a subfolder with a separateWeb.config file.
Must I necessarily use a subfolder to separate private from public files?Could I maybe have them all in the same root folder but then perhaps listthe public pages somehow in the Web.config file? I'm just looking for thebest, most standard way to do this.
Thanks, Ron
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Billy Jacobs |
last post by:
I have a website which has both secure and non-secure
pages. I want to uses forms authentication. How do I
accomplish this?
Originally I had my web.config file in the root with Forms
Authentication set up and it worked just fine. Then I
realized that I needed to have some pages unsecure.
I then created 2 directories. One named Secure and the
other named Public. I placed my web.config file in my
|
by: Stan |
last post by:
We have several intranet ASP.NET web sites. Users log on to the sites by
using form authentication and custom security (user names and passwords are
stored in the database).
If a user logs on to the first site and from within this site is redirected
to another one, we would like to pass its security information along, so the
user doesn't need to log on again.
I am thinking of making a gateway page that will have two url parameters,...
|
by: Kris van der Mast |
last post by:
Hi,
I've created a little site for my sports club. In the root folder there are
pages that are viewable by every anonymous user but at a certain subfolder
my administration pages should be protected by forms authentication.
When I create forms authentication at root level it works but when I move my
code up to the subfolder I get this error:
Server Error in '/TestProjects/FormsAuthenticationTestingArea' Application.
|
by: James X. Li |
last post by:
Is there a way to implement multiple login forms for ASP.NET applications?
With our application we want to implement simple login form
for normal resources (downloadable files), but more rigorous login forms
for tasks like administration and configuration. The current ASP.NET seems
only to
allow to a single login form via the authentication element in web.config
in the root directory.
One work-around for our problem is implementing a...
|
by: Eric |
last post by:
I am trying to build an app where the stuff in the root directory is open to
all, but anything under the Restricted directory requires you to login and I
want to use Forms to do it. I'm having trouble getting the web.config to
work properly.
First I tried to have a second web.config in the sub directory with
authentication and authorization set to forms, but it blew up.
Next, I tried to modify the root web.config in the following manner...
| |
by: Anonieko Ramos |
last post by:
ASP.NET Forms Authentication Best Practices
Dr. Dobb's Journal February 2004
Protecting user information is critical
By Douglas Reilly
Douglas is the author of Designing Microsoft ASP.NET Applications and
owner of Access Microsystems. Doug can be reached at
doug@accessmicrosystems.com.
--------------------------------------------------------------------------------
|
by: Svein Erik Storkaas |
last post by:
I am about to add security to a web project for the first time, and i'm
wondering what the easiest, yet a good way to do this?
The page is just for personal use, so it does not need to be "ultra" secure.
Is it ok just to store 'usrName' and 'psWrd' in an Access db, and manage it
from there? If so, how do i control if the user really IS authorized on all
the 'protected' pages?
Thanks!
|
by: Mike Moore |
last post by:
Does anyone have suggestions on the best way to check if a user is logged
into asp.net web application?
We are not using forms authentication. We are authenticating our users
against active directory. I some people use the database to determine if a
user is logged in between web pages and check in the web forms.
|
by: Joey |
last post by:
I have a web app with many users and their associated values (hashed
passwords, first name, last name, etc...) stored in a Microsoft SQL
Server 2000 database. My app uses stored procedures and forms-bases
authentication to authenticate users. Currently, in my <location> tags
in web.config, I have to manually specify user names to control access
to content. I want to learn how to implement roles to do this. I am
sure this would be a much...
|
by: Ned Balzer |
last post by:
Hi all,
I am pretty new to asp.net; I've done lots of classic asp, but am just
beginning to get my mind wrapped around .net.
What I'd like to do is include some code that tests if a user is logged
in, on each and every page, and redirects the user to a login page if
s/he's not logged in. The login page will also take care of some
standard setup, such as choosing/populating a user profile. I used to
use <!-- #include ... --for this,...
|
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,...
| |
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...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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...
|
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();...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |