473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

FormsAuthentication.RedirectFromLoginPage problem

Hi,

I have a ASP.Net web site, that we sell as a module to our core
software, versions of this site are running fine on many servers,
however we are having problems with our latest installtion, and it's
got me scratching my head.

The problem is with FormsAuthentication.RedirectFromLoginPage, it's
running on a brand new Windows 2003 standard server. No matter what I
do I cannot log onto the web site. It's as if it's not writing cookies
or something.

When some one enters a user name and password it validates ok, telling
them if they've got it wrong, but if they enter the correct details,
and I call FormsAuthentication.RedirectFromLoginPage, all it does is
return to the Logon Page rather than redirecting them back to the
calling page.

If I copy all the files from this site to a different server, it works
fine. So I know it must be a setting I've missed on the server.

Does anybody have any ideas.

Many thanks in advance

Chris
Nov 19 '05 #1
5 5372
Is the domain hard coded in the application?
Have you tried with multiple browsers?
Have you made sure the server's and client's time is properly synced?
Have you tried debugging it and seeing variables and cookies as they
are being set and then where they are upon the next page redirect

Nov 19 '05 #2
>Is the domain hard coded in the application?
No, the site need to be flexible enought to be run from any domain
Have you tried with multiple browsers? Only multiple instances of IE, as this is our target audience.
Have you made sure the server's and client's time is properly synced? It doesn't work if I use the browser on the server, so this rules this
out.
Have you tried debugging it and seeing variables and cookies as they
are being set and then where they are upon the next page redirect? I'm not sure how I debug the cookie when using FormsRedirect, but the
exact same site on a different server will work fine

On 8 Mar 2005 09:23:34 -0800, "re****@community.nospam"
<ma**********@gmail.com> wrote:
Is the domain hard coded in the application?
Have you tried with multiple browsers?
Have you made sure the server's and client's time is properly synced?
Have you tried debugging it and seeing variables and cookies as they
are being set and then where they are upon the next page redirect


Nov 19 '05 #3
That is why it "sounds" like
Cookie problem
Ultimately server side cookie problems usually come down to 2 things
#1 - somebody accidentally hard coded a domain into the code
#2 - You are working off of a subdomain and are not setting the cookie
up to handle this
#3 - Somebodys time is off sync
or either a very obsecure/strange configuration problem that I have
never rune across.

If you have debugging setup on your server then this is extremely easy.
You merely fire up vs.net with your project loaded. Put a breakpoint in
your forms authentication procedure and put a breakpoint on the
location it is redirected to.
Then you Step through it. As you step through it you add related
variables to your Watchwindow, such as username/password, The Cookies
collection. and you monitor and analyze the values as the page is
authenticated and as the page is redirected. This will usually clue you
in as to what the problem is and then you can begin a much more direct
line of attack

Nov 19 '05 #4
Hello, i've got the same problem, but only when i try to access my site from my domain, when i use localhost it works fine, but when i use my domain www.mysitename.com IE doesn't redirect, but Mozilla does... i can't figure out what this depends on, please help

From http://www.developmentnow.com/g/8_20...ge-problem.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Nov 19 '05 #5
I had the same problem. When trying to login to a forms-authentication
protected site from IE, IE wouldn't redirect properly eventhough the user was
properly authenticated. However, accessing the site through Firefox worked
just fine. After some investigation it turned out that the date on the server
was a month behind. Once I corrected the date setting IE functioned properly.
I can only speculate that the cookie was seen as expired by IE becuase of the
date difference.

It's still seems rather odd that Firefox accepted it just fine and dandy
though.

Eric

"Meadow" wrote:
Hello, i've got the same problem, but only when i try to access my site from my domain, when i use localhost it works fine, but when i use my domain www.mysitename.com IE doesn't redirect, but Mozilla does... i can't figure out what this depends on, please help

From http://www.developmentnow.com/g/8_20...ge-problem.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Jan 5 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ben Fidge | last post by:
Is FormsAuthentication.RedirectFromLoginPage the only way to populate the HttpContext.Current.User.Identity.Name property? A base class for each page contains the follwoing property: public...
3
by: Phil Certain | last post by:
Hi I'm building a site that has publicly available pages and password protected pages. Publicly available pages reside in: /public and password protected pages reside in: /private
2
by: tshad | last post by:
I have a logon page that is may be called by the Forms Authentication setup. This would put a ReturnURL as part of the URL. I would normally then just issue a: ...
2
by: Grant Merwitz | last post by:
Hi, i am using forms authentication in an ASP.NET project I am setting the Forms authentication cookie by using: FormsAuthentication.RedirectFromLoginPage(UserName.Text, false); Now when i...
1
by: Dean R. Henderson | last post by:
I setup FormsAuthentication on a couple websites where it has been working as expected for a long time. I used this code to setup the same type of authentication on a new website I am working on...
1
by: Jeremy Chapman | last post by:
I have built a web app. While testing I have found that if I browse to a page in the app, then get redirected to the login page and enter my credentials. The...
5
by: Åženol Akbulak | last post by:
Hello; I use in my web application FormsAuthentication. Also I use Session state (InProc). When a user logged in, I can read Session parameters. (For example Session). Problem is that, when...
0
by: Imran Aziz | last post by:
Hello All, I cannot seem to get createPersistentCookie option of FormsAuthentication.RedirectFromLoginPage work. Even if I set it to true the cookie is setup to expire after 30 min ( default...
2
by: rn5a | last post by:
A web.config file has the following code: <configuration> <system.web> <authentication mode="Forms"> <forms name="NETConnectCookie" loginUrl="Login.aspx"> <credentials passwordFormat="SHA1"/>...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.