RedirectFromLogin Goes Nowhere?

D

dave

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see below)
which protects the entire website, which brings up the login page - OK.

However, even though I have been logged in and authenticated it is still
returning to the login page. However if i log in again it will try to go
off to the originially specified location, but never seems to get there?

If i then directly type in the original URL i tried in the very 1st place it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
J

Jim Cheshire [MSFT]

Dave,

This web.config should work although you should reverse your <allow> and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
 
D

dave

Thanks for that Jim

You are right of course they should ordered differently, but unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's dotnet
site (Fasthosts) - is there anything i can ask them that might be causing
this?

Thanks again...

Cheers

Dave


Jim Cheshire said:
Dave,

This web.config should work although you should reverse your <allow> and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see below)
which protects the entire website, which brings up the login page - OK.

However, even though I have been logged in and authenticated it is still
returning to the login page. However if i log in again it will try to go
off to the originially specified location, but never seems to get there?

If i then directly type in the original URL i tried in the very 1st place it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
J

Jim Cheshire [MSFT]

Dave,

I would check to see if it's really parsing your web.config. Try adding a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's dotnet
site (Fasthosts) - is there anything i can ask them that might be causing
this?

Thanks again...

Cheers

Dave


Jim Cheshire said:
Dave,

This web.config should work although you should reverse your <allow> and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see below)
which protects the entire website, which brings up the login page - OK.

However, even though I have been logged in and authenticated it is still
returning to the login page. However if i log in again it will try to go
off to the originially specified location, but never seems to get there?

If i then directly type in the original URL i tried in the very 1st
place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
D

dave

Yep, that throws an error!



Jim Cheshire said:
Dave,

I would check to see if it's really parsing your web.config. Try adding a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's dotnet
site (Fasthosts) - is there anything i can ask them that might be causing
this?

Thanks again...

Cheers

Dave


Jim Cheshire said:
Dave,

This web.config should work although you should reverse your <allow> and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see below)
which protects the entire website, which brings up the login page - OK.

However, even though I have been logged in and authenticated it is still
returning to the login page. However if i log in again it will try to go
off to the originially specified location, but never seems to get there?

If i then directly type in the original URL i tried in the very 1st place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
J

Jim Cheshire [MSFT]

Dave,

Okay, now we know that we are truly parsing your Web.config.

In order to really troubleshoot this, you really need access to the server.
It would then be best to open a case with us so that we can look into it.
If your host will agree to conference call with us, we can figure out
what's going on.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Wed, 12 Nov 2003 18:24:46 -0000
Lines: 147
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path: cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7550
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Yep, that throws an error!



Jim Cheshire said:
Dave,

I would check to see if it's really parsing your web.config. Try adding a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's dotnet
site (Fasthosts) - is there anything i can ask them that might be causing
this?

Thanks again...

Cheers

Dave


Dave,

This web.config should work although you should reverse your <allow> and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see below)
which protects the entire website, which brings up the login page - OK.

However, even though I have been logged in and authenticated it is still
returning to the login page. However if i log in again it will try
to
go
off to the originially specified location, but never seems to get there?

If i then directly type in the original URL i tried in the very 1st place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
D

dave

Jim

Sorry for the delay been away for a few days.

I have forwarded a request to my ISP (FastHosts) to see if this is something
they will cater.

Will come back to you soonest.

Cheers

Dave



Jim Cheshire said:
Dave,

Okay, now we know that we are truly parsing your Web.config.

In order to really troubleshoot this, you really need access to the server.
It would then be best to open a case with us so that we can look into it.
If your host will agree to conference call with us, we can figure out
what's going on.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Wed, 12 Nov 2003 18:24:46 -0000
Lines: 147
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path:
cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7550
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Yep, that throws an error!
adding
a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's dotnet
site (Fasthosts) - is there anything i can ask them that might be causing
this?

Thanks again...

Cheers

Dave


Dave,

This web.config should work although you should reverse your <allow> and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see below)
which protects the entire website, which brings up the login page - OK.

However, even though I have been logged in and authenticated it is still
returning to the login page. However if i log in again it will try to
go
off to the originially specified location, but never seems to get there?

If i then directly type in the original URL i tried in the very 1st
place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
J

Jim Cheshire [MSFT]

Thanks, Dave. If they agree to it, you will want to call (800) 936-5800
and open a case with us so that we can assist.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 18 Nov 2003 08:35:03 -0000
Lines: 218
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Sorry for the delay been away for a few days.

I have forwarded a request to my ISP (FastHosts) to see if this is something
they will cater.

Will come back to you soonest.

Cheers

Dave



Jim Cheshire said:
Dave,

Okay, now we know that we are truly parsing your Web.config.

In order to really troubleshoot this, you really need access to the server.
It would then be best to open a case with us so that we can look into it.
If your host will agree to conference call with us, we can figure out
what's going on.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Wed, 12 Nov 2003 18:24:46 -0000
Lines: 147
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62
Path:
cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0 8
phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7550
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Yep, that throws an error!



Dave,

I would check to see if it's really parsing your web.config. Try
adding
a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but
unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's dotnet
site (Fasthosts) - is there anything i can ask them that might be causing
this?

Thanks again...

Cheers

Dave


Dave,

This web.config should work although you should reverse your
and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see
below)
which protects the entire website, which brings up the login page -
OK.

However, even though I have been logged in and authenticated it is
still
returning to the login page. However if i log in again it will
try
to
go
off to the originially specified location, but never seems to get
there?

If i then directly type in the original URL i tried in the very 1st
place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
D

dave

Hi Jim

FH are not willing to assist - they reckon it is a scripting error...

I cant see what it is and i have followed all the samples available to man.



Jim Cheshire said:
Thanks, Dave. If they agree to it, you will want to call (800) 936-5800
and open a case with us so that we can assist.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 18 Nov 2003 08:35:03 -0000
Lines: 218
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Sorry for the delay been away for a few days.

I have forwarded a request to my ISP (FastHosts) to see if this is something
they will cater.

Will come back to you soonest.

Cheers

Dave



Jim Cheshire said:
Dave,

Okay, now we know that we are truly parsing your Web.config.

In order to really troubleshoot this, you really need access to the server.
It would then be best to open a case with us so that we can look into it.
If your host will agree to conference call with us, we can figure out
what's going on.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Wed, 12 Nov 2003 18:24:46 -0000
Lines: 147
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com 81.128.209.62

cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
8
phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7550
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Yep, that throws an error!



Dave,

I would check to see if it's really parsing your web.config. Try adding
a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but
unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's
dotnet
site (Fasthosts) - is there anything i can ask them that might be
causing
this?

Thanks again...

Cheers

Dave


Dave,

This web.config should work although you should reverse your
and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see
below)
which protects the entire website, which brings up the login
page
 
J

Jim Cheshire [MSFT]

Dave,

That's a shame.

How are you coding your Forms authentication? Are you just calling
RedirectFromLogin()? How are you authenticating in the live site? Are you
just using the web.config with a list of users?

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Thu, 20 Nov 2003 09:20:48 -0000
Lines: 281
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7592
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Hi Jim

FH are not willing to assist - they reckon it is a scripting error...

I cant see what it is and i have followed all the samples available to man.



Jim Cheshire said:
Thanks, Dave. If they agree to it, you will want to call (800) 936-5800
and open a case with us so that we can assist.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 18 Nov 2003 08:35:03 -0000
Lines: 218
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Sorry for the delay been away for a few days.

I have forwarded a request to my ISP (FastHosts) to see if this is something
they will cater.

Will come back to you soonest.

Cheers

Dave



Dave,

Okay, now we know that we are truly parsing your Web.config.

In order to really troubleshoot this, you really need access to the
server.
It would then be best to open a case with us so that we can look into it.
If your host will agree to conference call with us, we can figure out
what's going on.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Wed, 12 Nov 2003 18:24:46 -0000
Lines: 147
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:

cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP 0
8
phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7550
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Yep, that throws an error!



Dave,

I would check to see if it's really parsing your web.config. Try
adding
a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but
unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's
dotnet
site (Fasthosts) - is there anything i can ask them that might be
causing
this?

Thanks again...

Cheers

Dave


Dave,

This web.config should work although you should reverse your
and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no
rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see
below)
which protects the entire website, which brings up the login
page
-
OK.

However, even though I have been logged in and authenticated it is
still
returning to the login page. However if i log in again it will try
to
go
off to the originially specified location, but never seems to get
there?

If i then directly type in the original URL i tried in the very 1st
place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
D

dave

Jim

Here is the code snippet from the login page that i use:

if dat.Read() then
'set the UserID and UserTypeID Session vars
Session("User_FName") = dat("CONTACT_FNAME")
Session("User_Type_ID") = dat("USER_TYPE_ID")
FormsAuthentication.RedirectFromLoginPage(dat("USER_ID"), "False")

'pick the users roles/permissions
GetUsersRoles()

lblValid.Text = "Valid Login Details..."
else
'set message to bad login details
lblValid.Text = "Incorrect Login Details"
end if


And here is the whole web.config file:


<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="Nerisis" path="/" loginUrl="login.aspx" timeout="20" ></forms>
</authentication>

<authorization>
<deny users="?"/>
</authorization>
</system.web>

<appSettings>
<add key="DBconnString" value="Server=myserver;Password=xxx;Persist
Security Info=True;User ID=sa;Initial Catalog=LMS" />
</appSettings>


</configuration>

Jim Cheshire said:
Dave,

That's a shame.

How are you coding your Forms authentication? Are you just calling
RedirectFromLogin()? How are you authenticating in the live site? Are you
just using the web.config with a list of users?

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Thu, 20 Nov 2003 09:20:48 -0000
Lines: 281
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7592
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Hi Jim

FH are not willing to assist - they reckon it is a scripting error...

I cant see what it is and i have followed all the samples available to man.



Jim Cheshire said:
Thanks, Dave. If they agree to it, you will want to call (800) 936-5800
and open a case with us so that we can assist.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 18 Nov 2003 08:35:03 -0000
Lines: 218
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com
81.128.186.244
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Sorry for the delay been away for a few days.

I have forwarded a request to my ISP (FastHosts) to see if this is
something
they will cater.

Will come back to you soonest.

Cheers

Dave



Dave,

Okay, now we know that we are truly parsing your Web.config.

In order to really troubleshoot this, you really need access to the
server.
It would then be best to open a case with us so that we can look into
it.
If your host will agree to conference call with us, we can figure out
what's going on.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Wed, 12 Nov 2003 18:24:46 -0000
Lines: 147
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP
0
8
phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7550
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Yep, that throws an error!



Dave,

I would check to see if it's really parsing your web.config. Try
adding
a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but
unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's
dotnet
site (Fasthosts) - is there anything i can ask them that might be
causing
this?

Thanks again...

Cheers

Dave


message
Dave,

This web.config should work although you should reverse your
<allow>
and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no
rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file (see
below)
which protects the entire website, which brings up the login page
-
OK.

However, even though I have been logged in and authenticated
it
is
still
returning to the login page. However if i log in again it will
try
to
go
off to the originially specified location, but never seems to get
there?

If i then directly type in the original URL i tried in the very
1st
place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
J

Jim Cheshire [MSFT]

Dave,

What is dat? What does the Read() method on dat do?

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Thu, 20 Nov 2003 20:54:03 -0000
Lines: 392
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Here is the code snippet from the login page that i use:

if dat.Read() then
'set the UserID and UserTypeID Session vars
Session("User_FName") = dat("CONTACT_FNAME")
Session("User_Type_ID") = dat("USER_TYPE_ID")
FormsAuthentication.RedirectFromLoginPage(dat("USER_ID"), "False")

'pick the users roles/permissions
GetUsersRoles()

lblValid.Text = "Valid Login Details..."
else
'set message to bad login details
lblValid.Text = "Incorrect Login Details"
end if


And here is the whole web.config file:


<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="Nerisis" path="/" loginUrl="login.aspx" timeout="20" ></forms>
</authentication>

<authorization>
<deny users="?"/>
</authorization>
</system.web>

<appSettings>
<add key="DBconnString" value="Server=myserver;Password=xxx;Persist
Security Info=True;User ID=sa;Initial Catalog=LMS" />
</appSettings>


</configuration>

Jim Cheshire said:
Dave,

That's a shame.

How are you coding your Forms authentication? Are you just calling
RedirectFromLogin()? How are you authenticating in the live site? Are you
just using the web.config with a list of users?

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Thu, 20 Nov 2003 09:20:48 -0000
Lines: 281
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0 8
phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7592
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Hi Jim

FH are not willing to assist - they reckon it is a scripting error...

I cant see what it is and i have followed all the samples available to man.



Thanks, Dave. If they agree to it, you will want to call (800) 936-5800
and open a case with us so that we can assist.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 18 Nov 2003 08:35:03 -0000
Lines: 218
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com
81.128.186.244
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Sorry for the delay been away for a few days.

I have forwarded a request to my ISP (FastHosts) to see if this is
something
they will cater.

Will come back to you soonest.

Cheers

Dave



Dave,

Okay, now we know that we are truly parsing your Web.config.

In order to really troubleshoot this, you really need access to the
server.
It would then be best to open a case with us so that we can look into
it.
If your host will agree to conference call with us, we can figure out
what's going on.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Wed, 12 Nov 2003 18:24:46 -0000
Lines: 147
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNG
P
0
8
phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7550
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Yep, that throws an error!



Dave,

I would check to see if it's really parsing your web.config. Try
adding
a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no
rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but
unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's
dotnet
site (Fasthosts) - is there anything i can ask them that might be
causing
this?

Thanks again...

Cheers

Dave


message
Dave,

This web.config should work although you should reverse your
<allow>
and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no
rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file
(see
below)
which protects the entire website, which brings up the login
page
-
OK.

However, even though I have been logged in and authenticated it
is
still
returning to the login page. However if i log in again it will
try
to
go
off to the originially specified location, but never seems to
get
there?

If i then directly type in the original URL i tried in the very
1st
place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
D

dave

Sorry Jim

Dat is a datareader taken from an sql DB, as iam validating their login
details against a DB - and read() is the sqldatareader method for iterating
the records.



Jim Cheshire said:
Dave,

What is dat? What does the Read() method on dat do?

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Thu, 20 Nov 2003 20:54:03 -0000
Lines: 392
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Here is the code snippet from the login page that i use:

if dat.Read() then
'set the UserID and UserTypeID Session vars
Session("User_FName") = dat("CONTACT_FNAME")
Session("User_Type_ID") = dat("USER_TYPE_ID")
FormsAuthentication.RedirectFromLoginPage(dat("USER_ID"), "False")

'pick the users roles/permissions
GetUsersRoles()

lblValid.Text = "Valid Login Details..."
else
'set message to bad login details
lblValid.Text = "Incorrect Login Details"
end if


And here is the whole web.config file:


<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="Nerisis" path="/" loginUrl="login.aspx" timeout="20"
</authentication>

<authorization>
<deny users="?"/>
</authorization>
</system.web>

<appSettings>
<add key="DBconnString" value="Server=myserver;Password=xxx;Persist
Security Info=True;User ID=sa;Initial Catalog=LMS" />
</appSettings>


</configuration>

Jim Cheshire said:
Dave,

That's a shame.

How are you coding your Forms authentication? Are you just calling
RedirectFromLogin()? How are you authenticating in the live site? Are you
just using the web.config with a list of users?

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Thu, 20 Nov 2003 09:20:48 -0000
Lines: 281
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com
81.128.186.244
Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
8
phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7592
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Hi Jim

FH are not willing to assist - they reckon it is a scripting error...

I cant see what it is and i have followed all the samples available to man.



Thanks, Dave. If they agree to it, you will want to call (800) 936-5800
and open a case with us so that we can assist.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 18 Nov 2003 08:35:03 -0000
Lines: 218
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com
81.128.186.244
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Sorry for the delay been away for a few days.

I have forwarded a request to my ISP (FastHosts) to see if this is
something
they will cater.

Will come back to you soonest.

Cheers

Dave



Dave,

Okay, now we know that we are truly parsing your Web.config.

In order to really troubleshoot this, you really need access to the
server.
It would then be best to open a case with us so that we can look into
it.
If your host will agree to conference call with us, we can figure out
what's going on.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Wed, 12 Nov 2003 18:24:46 -0000
Lines: 147
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:



cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNG P
0
8
phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7550
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Yep, that throws an error!



message
Dave,

I would check to see if it's really parsing your web.config. Try
adding
a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no
rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but
unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my ISP's
dotnet
site (Fasthosts) - is there anything i can ask them that
might
be
causing
this?

Thanks again...

Cheers

Dave


message
Dave,

This web.config should work although you should reverse your
<allow>
and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no
rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file
(see
below)
which protects the entire website, which brings up the login
page
-
OK.

However, even though I have been logged in and
authenticated
it
is
still
returning to the login page. However if i log in again it will
try
to
go
off to the originially specified location, but never seems to
get
there?

If i then directly type in the original URL i tried in the very
1st
place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 
J

Jim Cheshire [MSFT]

Dave,

It's hard to say without seeing all of your code, but with a DataReader,
you would normally use a while loop since you should expect that the
DataReader contains more than one record.

Have you debugged this to see if authentication is failing on the first
attempt?

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Fri, 21 Nov 2003 08:53:40 -0000
Lines: 470
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.
phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7612
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Sorry Jim

Dat is a datareader taken from an sql DB, as iam validating their login
details against a DB - and read() is the sqldatareader method for iterating
the records.



Jim Cheshire said:
Dave,

What is dat? What does the Read() method on dat do?

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Thu, 20 Nov 2003 20:54:03 -0000
Lines: 392
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com 81.128.186.244
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0 8
phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Here is the code snippet from the login page that i use:

if dat.Read() then
'set the UserID and UserTypeID Session vars
Session("User_FName") = dat("CONTACT_FNAME")
Session("User_Type_ID") = dat("USER_TYPE_ID")
FormsAuthentication.RedirectFromLoginPage(dat("USER_ID"), "False")

'pick the users roles/permissions
GetUsersRoles()

lblValid.Text = "Valid Login Details..."
else
'set message to bad login details
lblValid.Text = "Incorrect Login Details"
end if


And here is the whole web.config file:


<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="Nerisis" path="/" loginUrl="login.aspx" timeout="20"
</authentication>

<authorization>
<deny users="?"/>
</authorization>
</system.web>

<appSettings>
<add key="DBconnString" value="Server=myserver;Password=xxx;Persist
Security Info=True;User ID=sa;Initial Catalog=LMS" />
</appSettings>


</configuration>

Dave,

That's a shame.

How are you coding your Forms authentication? Are you just calling
RedirectFromLogin()? How are you authenticating in the live site? Are
you
just using the web.config with a list of users?

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Thu, 20 Nov 2003 09:20:48 -0000
Lines: 281
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com
81.128.186.244
Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP 0
8
phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7592
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Hi Jim

FH are not willing to assist - they reckon it is a scripting error...

I cant see what it is and i have followed all the samples available to
man.



Thanks, Dave. If they agree to it, you will want to call (800)
936-5800
and open a case with us so that we can assist.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 18 Nov 2003 08:35:03 -0000
Lines: 218
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-186-244.in-addr.btopenworld.com
81.128.186.244
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7606
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Jim

Sorry for the delay been away for a few days.

I have forwarded a request to my ISP (FastHosts) to see if this is
something
they will cater.

Will come back to you oonest.

Cheers

Dave



Dave,

Okay, now we know that we are truly parsing your Web.config.

In order to really troubleshoot this, you really need access to the
server.
It would then be best to open a case with us so that we can look
into
it.
If your host will agree to conference call with us, we can figure
out
what's going on.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no
rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
<#[email protected]>
<[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Wed, 12 Nov 2003 18:24:46 -0000
Lines: 147
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTN
G
P
0
8
phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7550
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Yep, that throws an error!



message
Dave,

I would check to see if it's really parsing your web.config. Try
adding
a
<foo> tag to your web.config and see if it throws an error.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no
rights.


--------------------
From: "dave" <[email protected]>
References: <[email protected]>
<ZN#[email protected]>
Subject: Re: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 20:00:40 -0000
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7527
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security

Thanks for that Jim

You are right of course they should ordered differently, but
unfortunately
that did not make any difference...

This all works fine on my local pc and server, but not on my
ISP's
dotnet
site (Fasthosts) - is there anything i can ask them that might
be
causing
this?

Thanks again...

Cheers

Dave


message
Dave,

This web.config should work although you should reverse your
<allow>
and
<deny> tags in the <authorization> element.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no
rights.

--------------------
From: "dave" <[email protected]>
Subject: RedirectFromLogin Goes Nowhere?
Date: Tue, 11 Nov 2003 11:07:55 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
NNTP-Posting-Host: host81-128-209-62.in-addr.btopenworld.com
81.128.209.62
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:7513
X-Tomcat-NG:
microsoft.public.dotnet.framework.aspnet.security

Can anyone shed any light on the following:

I have forms authentication setup within the web.config file
(see
below)
which protects the entire website, which brings up the login
page
-
OK.

However, even though I have been logged in and authenticated
it
is
still
returning to the login page. However if i log in again it
will
try
to
go
off to the originially specified location, but never
seems
to
get
there?

If i then directly type in the original URL i tried in the
very
1st
place
it
resolves fine, as i am now authenticated.

This is extremely baffling - hope someone can help!


Web Config settings.

<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>

<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>


<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>

</configuration>
 

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

No members online now.

Forum statistics

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

Latest Threads

Top