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

W

www.MSmobiles.com

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????
 
T

Teemu Keiski

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top