473,412 Members | 5,714 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,412 software developers and data experts.

Handling Authentication for all elements on a website

A Dilemma that I keep being faced with is a scenario where I require
authentication on virtually everything. HTMl files, GIF files, XML files,
JavaScript files and etc. And I am constantly dealing with Administrators
who refuse to allow me to map items so that asp.net handles authentication
for it.

I am wondering is it possilbe to make ASP.NET handle the authentication
for documents such as .HTML/.gif/.xml/.js without having to manually have
access to the server and assigning all files to be handled by IIS?
Nov 19 '05 #1
4 1039
You can add the file name into the web.config

This way:

<location path="Default.aspx">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
<location path="defualt.aspx">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
<location path="picture.gif">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
"re****@community.nospam" wrote:
A Dilemma that I keep being faced with is a scenario where I require
authentication on virtually everything. HTMl files, GIF files, XML files,
JavaScript files and etc. And I am constantly dealing with Administrators
who refuse to allow me to map items so that asp.net handles authentication
for it.

I am wondering is it possilbe to make ASP.NET handle the authentication
for documents such as .HTML/.gif/.xml/.js without having to manually have
access to the server and assigning all files to be handled by IIS?

Nov 19 '05 #2
With IIS 5 & 6 you have to route requests to the ASP.NET runtime
through script mappings.

Perhaps you could give them a script or program to run on the server
and perform the configuration programatically?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 1 Mar 2005 13:23:57 -0600, <re****@community.nospam> wrote:
A Dilemma that I keep being faced with is a scenario where I require
authentication on virtually everything. HTMl files, GIF files, XML files,
JavaScript files and etc. And I am constantly dealing with Administrators
who refuse to allow me to map items so that asp.net handles authentication
for it.

I am wondering is it possilbe to make ASP.NET handle the authentication
for documents such as .HTML/.gif/.xml/.js without having to manually have
access to the server and assigning all files to be handled by IIS?


Nov 19 '05 #3
I think if the problem were that simple, then I would not be posting the
problem. <location only works if the file is mapped to IIS. The files cannot
be be mapped to IIS for external administrative reasons, reasons that go
beyond not having physical or remote control of the server.

I am wondering if other people have been responsible for securing
non-asp.net content that have needed to share the same credentials as the
asp.net application and have been faced with the above restrictments. And if
so whether they had come up with something that was useful..


<re****@community.nospam> wrote in message
news:e5**************@tk2msftngp13.phx.gbl...
A Dilemma that I keep being faced with is a scenario where I require
authentication on virtually everything. HTMl files, GIF files, XML files,
JavaScript files and etc. And I am constantly dealing with Administrators
who refuse to allow me to map items so that asp.net handles authentication
for it.

I am wondering is it possilbe to make ASP.NET handle the authentication
for documents such as .HTML/.gif/.xml/.js without having to manually have
access to the server and assigning all files to be handled by IIS?

Nov 19 '05 #4
Hi Recoil,

Thanks for your posting. As for router the authentication request of the
static contens to asp.net , I'm afraid there is no any means currently.
Since the IIS directly handle the coming requests , the asp.net won't have
chance to join the request processing. Curently I think the only means are :
1. contact the web host's admin for configuring the static contents's
extentsion to ASPNET isapi dll.

2. Output those contents(images or scripfiles) dynamically through a custom
asp.net httphandler.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Nov 19 '05 #5

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

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
0
by: ohaya | last post by:
Hi, I've been researching this, and I'm not sure if what I'm trying to do is possible, but I thought that I'd ask: I have two webservers/websites. The first webserver/website is running...
4
by: Andrew | last post by:
Hey all, I would like to preface my question by stating I am still learning ASP.net and while I am confident in the basics and foundation, the more advanced stuff is still a challenge. Ok....
1
by: Andrew | last post by:
Hi, friends, When we set authentication in web.config file like the follows: <authentication mode="Forms"> <forms loginUrl="login.aspx" name="myAppCookie" /> </authentication> we really...
0
by: shil | last post by:
Hi, Is there any possibility to authenticate an user between two websites? I have a website through which users login and get authenticated. In the same website I link to a different website and...
1
by: shil | last post by:
Hi, Is there any possibility to authenticate an user between two websites? I have a website through which users login and get authenticated. In the same website I link to a different website and...
3
by: KNC | last post by:
Hi all, I'm developing a website and deployed on webserver, it always display an authentication dialog that user must login with valid Windows user. Would anyone helps to instruct how to...
8
by: JWest46088 | last post by:
I'm having problems with my error handling. It's kind of hard to explain so I'll just post my code and bold where the error handling is and then explain what is happening. Just to warn you, I am...
9
by: Josh | last post by:
I run a Joomla website and am familiar with php in some but not all aspects. Currently I am trying to find some solutions related to session handling. Am I correct in saying that "login" is kept...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...
0
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,...
0
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...

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.