473,411 Members | 1,889 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,411 software developers and data experts.

forms authentication: redirects for *.aspx pages only, not for other extensions, not for static content

Hi!

I am using something like this in web.config :

<authentication mode="Forms">
<forms name=".MSMOBILES_COM___COOKIE"
loginUrl="login.aspx"
protection="All"
timeout="30"
path="/">
<credentials passwordFormat="Clear">
<user name="user1" password="password1"/>
</credentials>
</forms>
</authentication>
</authentication>

then, when I try to access some *.aspx page, for example:

myserver.com/kirk.aspx

I get redirection to:

myserver.com/login.aspx?ReturnUrl=%2fportal%2fdupa.aspx

and then everything is OK, but when try to access some other pages and
content for example:

myserver.com/test1.html
or
myservrc.com/test1.gif

..... then NO REDIRECTION takes place and the server allows access to this
content!!!!
How to force IIS to make rediredction also in case of static (i.e. not
*.aspx) content????

Nov 18 '05 #1
1 1762
Hi,

that is because those files are not ptocessed by ASP.NET by default. You
need to associate those file extensions with ASP.NET ISAPI filter to get
them under ASP.NET processing.

1. Open IIS, right-click the site and choose properties.
2. Choose Home Directory tab
3. Click 'Configuration'

In the opening window you'll see file extension mapping for every respective
file type IIS undertands. Take a careful look hot it is for aspx filew and
do the same for file extensions you want control over.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"www.MSmobiles.com" <no****@msmobiles.com> wrote in message
news:u%****************@TK2MSFTNGP10.phx.gbl...
Hi!

I am using something like this in web.config :

<authentication mode="Forms">
<forms name=".MSMOBILES_COM___COOKIE"
loginUrl="login.aspx"
protection="All"
timeout="30"
path="/">
<credentials passwordFormat="Clear">
<user name="user1" password="password1"/>
</credentials>
</forms>
</authentication>
</authentication>

then, when I try to access some *.aspx page, for example:

myserver.com/kirk.aspx

I get redirection to:

myserver.com/login.aspx?ReturnUrl=%2fportal%2fdupa.aspx

and then everything is OK, but when try to access some other pages and
content for example:

myserver.com/test1.html
or
myservrc.com/test1.gif

.... then NO REDIRECTION takes place and the server allows access to this
content!!!!
How to force IIS to make rediredction also in case of static (i.e. not
*.aspx) content????


Nov 18 '05 #2

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

Similar topics

6
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...
11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
3
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...
1
by: Rob | last post by:
I have an ASP.NET application that uses forms-based authentication. A user wishes to be able to run multiple sessions of this application simultaneously from the user's client machine. The...
2
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...
0
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...
4
by: 23s | last post by:
I had this problem in the past, after a server reformat it went away, and now after another server reformat it's back again - no clue what's doing it. Here's the flow: Website root is public, no...
0
by: Sergio E. | last post by:
Hello, I have a problem with masterpages and forms security. I made a new Web site, in which I have my page login.aspx as the homepage , a master page with only a sitemappath object in it, the...
5
by: Rory Becker | last post by:
Having now created a Custom MembershipProvider that seems to work correctly with my Logon and ChangePassword controls, I am, as they say, a happy bunny. The next stange is to move on to the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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,...
0
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...
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
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...

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.