What am I doing wrong with authentication?


M

Mr.Magic

I have the following in my web.config file:


<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="Users"
connectionString="server=xxx.xxx.xxx.xxx;uid=xxxxxxxxxx;pwd=xxxxxxxxxxxxx;DATABASE=xxxxxxxx;"
/>
</connectionStrings>

<system.web>
<sessionState mode="SQLServer" sqlConnectionString="data
source=xxx.xxx.xxx.xxx;user id=xxxxxxxxx; password=xxxxxxxxx" />
<authentication mode="Forms">
<forms name="LoginForm" loginUrl="Login.aspx" protection="All" path="/"
timeout="30" />
</authentication>

<authorization>
<deny users="?"/>
</authorization>

</system.web>

</configuration>


I'm trying to get it to always go to the login page if somebody puts in a
url under the site.

But the system will always let you at any file.

What am I doing wrong? Is there something I need to do in IIS to make this
work?

I have other sites on the same server that working fine (I seperate the
sites by using the header name in the setup for the TCP/IP address.)

Any help would be greatly appreciated.

TIA - Jeff.
 
Ad

Advertisements

M

Mr.Magic

I should mention that it works fine on my development machine but not on my
production machine.
 
M

Mr.Magic

OK. I think I may have figured out what is going on. When it's a non-asp.net
page, it doesn't go through the forms authentication.

I put on one of my websites that uses forms authentication a text file and
it works fine.

So the question becomes, how can I make asp.net authenticate non-asp.net
files?

TIA - Jeff.
 
Ad

Advertisements

M

Mr.Magic

Nevermind everybody. I figured it out. You need to make a change in IIS so
that it will pass authentication over to ASP.Net.

J.
 

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

Top