Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Authentication Redirect to login doesn't work

Reply
Thread Tools

Authentication Redirect to login doesn't work

 
 
Eric
Guest
Posts: n/a
 
      06-28-2005
I have Windows xp as workstation OS and Windows Server 2003 Standard
Edition for the server but Windows NT 4 as primary Domain controller. I
made a login.aspx and a home.aspx page to test windows authentication
with the lines of code needed in the web config file and code behind.
The Home.aspx page is set as the default page in IIS 6.0.
I have configured IIS for Basic authentication in the Directory
Security panel of IIS manager.
When I'm calling the site with the default Url home.aspx page is
displayed with nothing for User.identity.Name.

Then i tried with windows integreted authentication. I have made the
appropriate amendements in the web config file but when i test it still
nothing is displayed for User.identity.Name.

Could someone tell me what could be wrong.
Does NT integrated authetication work with a NT4 Primary DC and Server
2003 domain member server?

thanks in advance for any help

Eric

 
Reply With Quote
 
 
 
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      06-28-2005
Hello Eric,

i guess IIS is not authenticating - disable anonymous access to the virtual
directory in IIS

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> I have Windows xp as workstation OS and Windows Server 2003 Standard
> Edition for the server but Windows NT 4 as primary Domain controller.
> I
> made a login.aspx and a home.aspx page to test windows authentication
> with the lines of code needed in the web config file and code behind.
> The Home.aspx page is set as the default page in IIS 6.0.
> I have configured IIS for Basic authentication in the Directory
> Security panel of IIS manager.
> When I'm calling the site with the default Url home.aspx page is
> displayed with nothing for User.identity.Name.
> Then i tried with windows integreted authentication. I have made the
> appropriate amendements in the web config file but when i test it
> still nothing is displayed for User.identity.Name.
>
> Could someone tell me what could be wrong.
> Does NT integrated authetication work with a NT4 Primary DC and Server
> 2003 domain member server?
> thanks in advance for any help
>
> Eric
>




 
Reply With Quote
 
 
 
 
Eric
Guest
Posts: n/a
 
      06-28-2005
Hi Dominick,

For both basic and window authentication test i disabled in IIS all
authentication options except the one concerned by the test. Basic for
basic auth, windows integrated for windows NT auth.
I have already test all authentication model on a windows 2000 server
DC but its the first time that i test it on a Server 2003. As
everything is denied by default on server 2003 in opposite to Server
2000 . Do you have any idea of what could be the reason that when
calling the default web site page Home.aspx IIS doesn't redirect to
login.aspx for basic auth. while Authentication is set to Forms in the
web.config file?




Dominick a écrit :
> Hello Eric,
>
> i guess IIS is not authenticating - disable anonymous access to the virtual
> directory in IIS
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
> > I have Windows xp as workstation OS and Windows Server 2003 Standard
> > Edition for the server but Windows NT 4 as primary Domain controller.
> > I
> > made a login.aspx and a home.aspx page to test windows authentication
> > with the lines of code needed in the web config file and code behind.
> > The Home.aspx page is set as the default page in IIS 6.0.
> > I have configured IIS for Basic authentication in the Directory
> > Security panel of IIS manager.
> > When I'm calling the site with the default Url home.aspx page is
> > displayed with nothing for User.identity.Name.
> > Then i tried with windows integreted authentication. I have made the
> > appropriate amendements in the web config file but when i test it
> > still nothing is displayed for User.identity.Name.
> >
> > Could someone tell me what could be wrong.
> > Does NT integrated authetication work with a NT4 Primary DC and Server
> > 2003 domain member server?
> > thanks in advance for any help
> >
> > Eric
> >


 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      06-28-2005
Hello Eric,

so what do you want to do? basic or forms auth.

If you are using windows/basic auth in IIS - IIS will do the authentication
- the client will get a login dialog

If you are doing forms, you set IIS to do no authentication - and do it yourself
in ASP.NET by providing a custom login page.

In the case of forms - you also have to set ACLs in web.config - like

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

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> Hi Dominick,
>
> For both basic and window authentication test i disabled in IIS all
> authentication options except the one concerned by the test. Basic for
> basic auth, windows integrated for windows NT auth.
> I have already test all authentication model on a windows 2000 server
> DC but its the first time that i test it on a Server 2003. As
> everything is denied by default on server 2003 in opposite to Server
> 2000 . Do you have any idea of what could be the reason that when
> calling the default web site page Home.aspx IIS doesn't redirect to
> login.aspx for basic auth. while Authentication is set to Forms in the
> web.config file?
> Dominick a écrit :
>
>> Hello Eric,
>>
>> i guess IIS is not authenticating - disable anonymous access to the
>> virtu
>>

> al
>
>> directory in IIS
>>
>> ---------------------------------------
>> Dominick Baier - DevelopMentor
>> http://www.leastprivilege.com
>>> I have Windows xp as workstation OS and Windows Server 2003 Standard
>>> Edition for the server but Windows NT 4 as primary Domain
>>> controller.
>>> I
>>> made a login.aspx and a home.aspx page to test windows
>>> authentication
>>> with the lines of code needed in the web config file and code
>>> behind.
>>> The Home.aspx page is set as the default page in IIS 6.0.
>>> I have configured IIS for Basic authentication in the Directory
>>> Security panel of IIS manager.
>>> When I'm calling the site with the default Url home.aspx page is
>>> displayed with nothing for User.identity.Name.
>>> Then i tried with windows integreted authentication. I have made the
>>> appropriate amendements in the web config file but when i test it
>>> still nothing is displayed for User.identity.Name.
>>> Could someone tell me what could be wrong.
>>> Does NT integrated authetication work with a NT4 Primary DC and
>>> Server
>>> 2003 domain member server?
>>> thanks in advance for any help
>>> Eric
>>>




 
Reply With Quote
 
Eric
Guest
Posts: n/a
 
      06-29-2005

Hello Dominick,

In Fact i have tried several way to authenticate a user.

Windows Integrated Authentication is working fine.

I tried then the basic authentication . IIS Configured as basic Auth.
config file with <authentication mode="windows"/> but when the windows
login box appear at client side (xp pro sp2) no accounts that i have
defined on server 2003 is valid and i can't authenticate any defined
user. Should user require to be member of a particular group other than
Domain users?

I have tried the same thing on windows 2000 server and i was working
fine.

_______


in a second test i tried forms authentication with credentials in
config file. IIS configured as anonymous authentication. Is it Correct?
As you say "set IIS to do no authentication" do you mean uncheck all
Authentication mode in IIS or just let anonymous authentication checked
with "Ask IIS to authenticate" unchecked and then choose a new account
for impersonation .

Config file with

<authentication mode="Forms"/>
<forms loginUrl="Login.aspx">
<credentials passwordFormat="Clear">
<user name="username" password="password">
</credentials>
</forms >
</authentication>

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

By doing this way and calling the default website url it goes directly
to the default page Home.aspx and display no User.Identity.name. the
user has not yet been authenticated and is not redirected to the login
page.

Except if I have not setup IIS correctly for autentication by choosing
the wrong options I don't understand why it behaves this way. Do you
have any clue?

Eric

 
Reply With Quote
 
Eric
Guest
Posts: n/a
 
      06-30-2005
Hello Dominick,

Finally I succeed to do NT integrated, basic and Froms Authentication
using IE on workstation but when testing on server it behaves not the
same as on workstation for NT Integrated Auth.
On Server for NT integrated Auth a Dialog Box is asking for login
whereas on workstation it doesn't (it's all right because he should
not).
Do you know why it asks for login when testing with IE on server side
meanwhile it doen't on client side?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect To Login Page - Forms Authentication Dave ASP .Net 4 07-08-2009 09:56 PM
Login in HTTPS and redirect to HTTP using Forms Authentication Alfredo Barrientos ASP .Net 0 08-31-2005 09:31 PM
Redirect to login page with DB authentication Grey ASP .Net 0 08-03-2004 09:05 AM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM
Forms Authentication redirect from login refreshes in VS,NET Max ASP .Net 0 01-06-2004 09:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57