 |
|
|
|
| Author |
Message |
Guus123
Joined: 16 Aug 2007 Posts: 3
|
Posted: Mon Dec 10, 2007 5:25 pm Post subject: Forms Authentication |
|
|
Hi,
I created a web site on a remote server. To logon the user must enter a user
id and password. The site is uses Forms Authentication.
The web config file looks as follows:
I my code behind on the login.aspx I have
If FormsAuthentication.Authenticate(txtUser.Text, txtPassword.Text) Then
FormsAuthentication.RedirectFromLoginPage(txtUser.Text, true)
Response.Redirect("somesample.aspx")
End If
This works fine when I go the site via IE using the IP address. I just
recently connected a domain name "www.somename.com" to it using a DNS
service. When I use the domain name in the URL. My logon form never redirects
but always keeps on the logon page. Can anyone help me?
--
FC Utrecht are Champions!
Archived from group: microsoft>public>dotnet>framework>aspnet |
|
| Back to top |
|
 |
Steven Cheng[MSFT]
Joined: 08 Aug 2007 Posts: 196
|
Posted: Tue Dec 11, 2007 12:48 pm Post subject: RE: Forms Authentication |
|
|
Hi Guus123,
From your description, you have an ASP.NET application that uses forms
authentication. It works well in dev env, but after deployed to server and
visisted through public DNS server address, the forms authenticcation no
longer work, correct?
Based on my experience, such problem behavior is possibly caused by the
authentication ticket(cookie based) is not correctly set to the domain your
client browser belong to.
for ASP.NET forms authentication, if you choose to persist authentication
status, it will generate an authentication ticket and store it in cookie,
however, for cookie, it has a "domain" property indicate which domain it
belong. For your scenario, I think it is likely that the default domain
setting doesn't quite fit your environment. Here is a web article discuss
something on this issue:
#Forms Authentication Cookies and Subdomain Names
http://blog-howto.com/archive/2006/09/21/FormsAuthCookiesAndSubdomainNames.a
spx
You can have a look to see whether it helps some.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?R3V1czEyMw==?=
>Subject: Forms Authentication
>Date: Mon, 10 Dec 2007 12:25:04 -0800
>
>Hi,
>
>I created a web site on a remote server. To logon the user must enter a
user
>id and password. The site is uses Forms Authentication.
>
>The web config file looks as follows:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>I my code behind on the login.aspx I have
>
> If FormsAuthentication.Authenticate(txtUser.Text, txtPassword.Text) Then
> FormsAuthentication.RedirectFromLoginPage(txtUser.Text, true)
>Response.Redirect("somesample.aspx")
> End If
>
>
>This works fine when I go the site via IE using the IP address. I just
>recently connected a domain name "www.somename.com" to it using a DNS
>service. When I use the domain name in the URL. My logon form never
redirects
>but always keeps on the logon page. Can anyone help me?
>
>--
>FC Utrecht are Champions!
> |
|
| Back to top |
|
 |
Guus123
Joined: 16 Aug 2007 Posts: 3
|
Posted: Tue Dec 11, 2007 6:14 am Post subject: RE: Forms Authentication |
|
|
Hi,
Thanks for your information. I read the article of the link you gave me. I
did try to access my web site using the domain name from a machine that has
never been to the site not even using the IP address and still could not
logon and still had the same problem. This should have overcome the cookie
problem, or is my thinking incorrect?
--
FC Utrecht are Champions!
"Steven Cheng[MSFT]" wrote:
> Hi Guus123,
>
> From your description, you have an ASP.NET application that uses forms
> authentication. It works well in dev env, but after deployed to server and
> visisted through public DNS server address, the forms authenticcation no
> longer work, correct?
>
> Based on my experience, such problem behavior is possibly caused by the
> authentication ticket(cookie based) is not correctly set to the domain your
> client browser belong to.
>
> for ASP.NET forms authentication, if you choose to persist authentication
> status, it will generate an authentication ticket and store it in cookie,
> however, for cookie, it has a "domain" property indicate which domain it
> belong. For your scenario, I think it is likely that the default domain
> setting doesn't quite fit your environment. Here is a web article discuss
> something on this issue:
>
> #Forms Authentication Cookies and Subdomain Names
> http://blog-howto.com/archive/2006/09/21/FormsAuthCookiesAndSubdomainNames.a
> spx
>
> You can have a look to see whether it helps some.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
>
> ==================================================
>
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
>
>
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
>
> ==================================================
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>
> --------------------
> >From: =?Utf-8?B?R3V1czEyMw==?=
> >Subject: Forms Authentication
> >Date: Mon, 10 Dec 2007 12:25:04 -0800
>
> >
> >Hi,
> >
> >I created a web site on a remote server. To logon the user must enter a
> user
> >id and password. The site is uses Forms Authentication.
> >
> >The web config file looks as follows:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >I my code behind on the login.aspx I have
> >
> > If FormsAuthentication.Authenticate(txtUser.Text, txtPassword.Text) Then
> > FormsAuthentication.RedirectFromLoginPage(txtUser.Text, true)
> >Response.Redirect("somesample.aspx")
> > End If
> >
> >
> >This works fine when I go the site via IE using the IP address. I just
> >recently connected a domain name "www.somename.com" to it using a DNS
> >service. When I use the domain name in the URL. My logon form never
> redirects
> >but always keeps on the logon page. Can anyone help me?
> >
> >--
> >FC Utrecht are Champions!
> >
>
> |
|
| Back to top |
|
 |
Guus123
Joined: 16 Aug 2007 Posts: 3
|
Posted: Thu Dec 13, 2007 4:20 am Post subject: RE: Forms Authentication |
|
|
Hi,
Ok, I found the problem. The DNS entry for my domain was not set corrretly,
which was stuffing up my cookies with a incorrect domain. All working now
thanks.
--
FC Utrecht are Champions!
"Guus123" wrote:
> Hi,
>
> Thanks for your information. I read the article of the link you gave me. I
> did try to access my web site using the domain name from a machine that has
> never been to the site not even using the IP address and still could not
> logon and still had the same problem. This should have overcome the cookie
> problem, or is my thinking incorrect?
> --
> FC Utrecht are Champions!
>
>
> "Steven Cheng[MSFT]" wrote:
>
> > Hi Guus123,
> >
> > From your description, you have an ASP.NET application that uses forms
> > authentication. It works well in dev env, but after deployed to server and
> > visisted through public DNS server address, the forms authenticcation no
> > longer work, correct?
> >
> > Based on my experience, such problem behavior is possibly caused by the
> > authentication ticket(cookie based) is not correctly set to the domain your
> > client browser belong to.
> >
> > for ASP.NET forms authentication, if you choose to persist authentication
> > status, it will generate an authentication ticket and store it in cookie,
> > however, for cookie, it has a "domain" property indicate which domain it
> > belong. For your scenario, I think it is likely that the default domain
> > setting doesn't quite fit your environment. Here is a web article discuss
> > something on this issue:
> >
> > #Forms Authentication Cookies and Subdomain Names
> > http://blog-howto.com/archive/2006/09/21/FormsAuthCookiesAndSubdomainNames.a
> > spx
> >
> > You can have a look to see whether it helps some.
> >
> > Sincerely,
> >
> > Steven Cheng
> >
> > Microsoft MSDN Online Support Lead
> >
> >
> >
> > ==================================================
> >
> > Get notification to my posts through email? Please refer to
> > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> > ications.
> >
> >
> >
> > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> > where an initial response from the community or a Microsoft Support
> > Engineer within 1 business day is acceptable. Please note that each follow
> > up response may take approximately 2 business days as the support
> > professional working with you may need further investigation to reach the
> > most efficient resolution. The offering is not appropriate for situations
> > that require urgent, real-time or phone-based interactions or complex
> > project analysis and dump analysis issues. Issues of this nature are best
> > handled working with a dedicated Microsoft Support Engineer by contacting
> > Microsoft Customer Support Services (CSS) at
> > http://msdn.microsoft.com/subscriptions/support/default.aspx.
> >
> > ==================================================
> >
> >
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> >
> >
> >
> > --------------------
> > >From: =?Utf-8?B?R3V1czEyMw==?=
> > >Subject: Forms Authentication
> > >Date: Mon, 10 Dec 2007 12:25:04 -0800
> >
> > >
> > >Hi,
> > >
> > >I created a web site on a remote server. To logon the user must enter a
> > user
> > >id and password. The site is uses Forms Authentication.
> > >
> > >The web config file looks as follows:
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >I my code behind on the login.aspx I have
> > >
> > > If FormsAuthentication.Authenticate(txtUser.Text, txtPassword.Text) Then
> > > FormsAuthentication.RedirectFromLoginPage(txtUser.Text, true)
> > >Response.Redirect("somesample.aspx")
> > > End If
> > >
> > >
> > >This works fine when I go the site via IE using the IP address. I just
> > >recently connected a domain name "www.somename.com" to it using a DNS
> > >service. When I use the domain name in the URL. My logon form never
> > redirects
> > >but always keeps on the logon page. Can anyone help me?
> > >
> > >--
> > >FC Utrecht are Champions!
> > >
> >
> > |
|
| Back to top |
|
 |
Steven Cheng[MSFT]
Joined: 08 Aug 2007 Posts: 196
|
Posted: Thu Dec 13, 2007 2:26 pm Post subject: RE: Forms Authentication |
|
|
Thanks for your reply Guus,
Glad that you've figured it out. I've justed performed some further
research but didn't find any other well-known issue. Seems the DNS has made
a joke with us here:)
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
-------------------
>From: =?Utf-8?B?R3V1czEyMw==?=
>Subject: RE: Forms Authentication
>Date: Wed, 12 Dec 2007 23:20:00 -0800
>
>Hi,
>
>Ok, I found the problem. The DNS entry for my domain was not set
corrretly,
>which was stuffing up my cookies with a incorrect domain. All working now
>thanks.
>--
>FC Utrecht are Champions!
>
>
>"Guus123" wrote:
>
>> Hi,
>>
>> Thanks for your information. I read the article of the link you gave me.
I
>> did try to access my web site using the domain name from a machine that
has
>> never been to the site not even using the IP address and still could not
>> logon and still had the same problem. This should have overcome the
cookie
>> problem, or is my thinking incorrect?
>> --
>> FC Utrecht are Champions!
>>
>>
>> "Steven Cheng[MSFT]" wrote:
>>
>> > Hi Guus123,
>> >
>> > From your description, you have an ASP.NET application that uses forms
>> > authentication. It works well in dev env, but after deployed to server
and
>> > visisted through public DNS server address, the forms authenticcation
no
>> > longer work, correct?
>> >
>> > Based on my experience, such problem behavior is possibly caused by
the
>> > authentication ticket(cookie based) is not correctly set to the domain
your
>> > client browser belong to.
>> >
>> > for ASP.NET forms authentication, if you choose to persist
authentication
>> > status, it will generate an authentication ticket and store it in
cookie,
>> > however, for cookie, it has a "domain" property indicate which domain
it
>> > belong. For your scenario, I think it is likely that the default
domain
>> > setting doesn't quite fit your environment. Here is a web article
discuss
>> > something on this issue:
>> >
>> > #Forms Authentication Cookies and Subdomain Names
>> >
http://blog-howto.com/archive/2006/09/21/FormsAuthCookiesAndSubdomainNames.a
>> > spx
>> >
>> > You can have a look to see whether it helps some.
>> >
>> > Sincerely,
>> >
>> > Steven Cheng
>> >
>> > Microsoft MSDN Online Support Lead
>> >
>> >
>> >
>> > ==================================================
>> >
>> > Get notification to my posts through email? Please refer to
>> >
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> > ications.
>> >
>> >
>> >
>> > Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
>> > where an initial response from the community or a Microsoft Support
>> > Engineer within 1 business day is acceptable. Please note that each
follow
>> > up response may take approximately 2 business days as the support
>> > professional working with you may need further investigation to reach
the
>> > most efficient resolution. The offering is not appropriate for
situations
>> > that require urgent, real-time or phone-based interactions or complex
>> > project analysis and dump analysis issues. Issues of this nature are
best
>> > handled working with a dedicated Microsoft Support Engineer by
contacting
>> > Microsoft Customer Support Services (CSS) at
>> > http://msdn.microsoft.com/subscriptions/support/default.aspx.
>> >
>> > ==================================================
>> >
>> >
>> > This posting is provided "AS IS" with no warranties, and confers no
rights.
>> >
>> >
>> >
>> >
>> > --------------------
>> > >From: =?Utf-8?B?R3V1czEyMw==?=
>> > >Subject: Forms Authentication
>> > >Date: Mon, 10 Dec 2007 12:25:04 -0800
>> >
>> > >
>> > >Hi,
>> > >
>> > >I created a web site on a remote server. To logon the user must enter
a
>> > user
>> > >id and password. The site is uses Forms Authentication.
>> > >
>> > >The web config file looks as follows:
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >I my code behind on the login.aspx I have
>> > >
>> > > If FormsAuthentication.Authenticate(txtUser.Text, txtPassword.Text)
Then
>> > > FormsAuthentication.RedirectFromLoginPage(txtUser.Text, true)
>> > >Response.Redirect("somesample.aspx")
>> > > End If
>> > >
>> > >
>> > >This works fine when I go the site via IE using the IP address. I
just
>> > >recently connected a domain name "www.somename.com" to it using a DNS
>> > >service. When I use the domain name in the URL. My logon form never
>> > redirects
>> > >but always keeps on the logon page. Can anyone help me?
>> > >
>> > >--
>> > >FC Utrecht are Champions!
>> > >
>> >
>> >
>
|
|
| Back to top |
|
 |
|
|
| Related Topics: | Forms Authentication and Webservices Hello All, I have a WebApp with Forms implemented which works just fine. But now I want to add a WebServiceApp and deploy it in the same server where my WebApp is installed and then access this WebServiceApp using a WinApp. But since I have
IE Multiple Processes and Forms Authentication Bug? Feature? IE or Framework? Server: Win2K (w/all updates), .NET Framework 1.1 Client: Only tested with Win2K(all updates) IE6sp1 (all updates) Launching another IE window from anywhere but IE's File- New-Window (or CTRL-N) launches a seperate process
caching? problem with forms authentication and IE (but not N I have a web application with at least three pages: /index.aspx (home page) /login.aspx (login page) (private page - needs If I attempt to go directly to the private page, I am properly redirected to the login page. If
Forms Authentication to specific folders I have a web application that is using Forms (with stored in a database) and for the most part it is working. I have a web page with links on it to files of different types (exe, zip, pdf) When the user clicks on one of thes
Web service, forms authentication and DefaultCredentials Hello All, I have a webservice application (ASP.NET 2.0) and a .NET client executable which consumes the web services. The current model has username / password collected by the client application and passed to the webservice. What I am required to do is |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|