473,796 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1055
You can add the file name into the web.config

This way:

<location path="Default.a spx">
<system.web>
<authorizatio n>
<deny users="?"/>
</authorization>
</system.web>
</location>
<location path="defualt.a spx">
<system.web>
<authorizatio n>
<deny users="?"/>
</authorization>
</system.web>
</location>
<location path="picture.g if">
<system.web>
<authorizatio n>
<deny users="?"/>
</authorization>
</system.web>
</location>
"re****@communi ty.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****@communi ty.nospam> wrote:
A Dilemma that I keep being faced with is a scenario where I require
authenticati on 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****@communi ty.nospam> wrote in message
news:e5******** ******@tk2msftn gp13.phx.gbl...
A Dilemma that I keep being faced with is a scenario where I require
authenticati on 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
9292
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. # No warranty express or implied for the accuracy, fitness to purpose
0
1915
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 Win2K/IIS5, and I want it to act as a kind of "portal" to the other webserver/website.
4
6809
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
924
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 force a user to access login.aspx first, right?
0
1056
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 would like to pass userid to the second website. My question is I want to restrict users from going to the second website directly without getting authenticated from the first one. Is this possible? I know we can do this using Forms...
1
1628
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 would like to pass userid to the second website. My question is I want to restrict users from going to the second website directly without getting authenticated from the first one. Is this possible?
3
1566
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 prohibit this dialog? Some information provides for you: 1) Dev softs: - VS 2005, ASP.NET 2.0, SQL Server 2005 Enterprise edition 2) Server:
8
1789
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 new to Perl so the code probably will be ugly! #! /usr/local/bin/perl BEGIN { open(STDERR, ">&STDOUT");
9
7817
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 in sessions? I can see active sessions in my mysql database, but is that the only place this information is stored? Sessions and cookies I know are related also, but how specifically (session info stored in cookies?)? Right now, when users...
0
9685
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
9533
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
10461
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
10239
jinu1996
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...
1
10190
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
10019
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
9057
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
4122
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
3736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.