|
Home > Archive > Commerce Server General > February 2004 > Authentication problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Authentication problem
|
|
| Gothmog 2004-02-16, 12:34 am |
| I have installed win2k3,CS2002 and VS2002.
When i run project from VS every thing work perfect (i can log in)
but when i open project using Web Browser i cant log in.
When i run project web Browser function IsAuthenticated() have always
false value
Login page code:
if(CommerceContext.Current.AuthenticationInfo.IsAuthenticated())
{
CommerceContext.Current.AuthenticationInfo.AuthTicket.SignOut();
Response.Redirect("welcome.aspx");
}
if (userName.Text!="")
{
AuthenticationInfo authInfo =
CommerceContext.Current.AuthenticationInfo;
ProfileContext profContext = CommerceContext.Current.ProfileSystem;
string pwd,pad_pwd;
Profile prof;
try
{
prof = profContext.GetProfile(userName.Text, "UserObject");
pwd = prof.Properties["GeneralInfo.user_security_password"].Value.ToString();
pad_pwd = prof.Properties["GeneralInfo.user_security_passwordpadding"].Value.ToString();
NFENCRYPTLib.Encrypt kod = new NFENCRYPTLib.EncryptClass();
string password = password.Text;
if(string.Compare(pwd, kod.MD5(ref password,ref pad_pwd))==0)
{
string userID = (string)prof.Properties["GeneralInfo.user_id"].Value;
authInfo.SetAuthTicket(userID, true, 200);
authInfo.SetProfileTicket(userID, true);
Response.Redirect(link);
}
else error.Text += "Wrong password<br>";
}
catch(Exception exp)
{
error.Text = "Error!";
}
}
Please help me fast!
| |
| Max Akbar 2004-02-16, 3:34 pm |
| I ran across this before and for some reason if you pack the site then
delete the current site then unpackaged it then all should work. Or if you
open Commerce Manager then navigate to your site then navigate to your sites
Application resources then right click on the Application that points to
your site then right click properties and uncheck the "Set Cookie Path to
Application".
I am not sure why this happens but I have fixed it with the above solutions.
Regards,
-Max
"Gothmog" <ggiewon@poczta.onet.pl> wrote in message
news:7972adb7.0402160522.1871e0e9@posting.google.com...
> I have installed win2k3,CS2002 and VS2002.
> When i run project from VS every thing work perfect (i can log in)
> but when i open project using Web Browser i cant log in.
> When i run project web Browser function IsAuthenticated() have always
> false value
>
> Login page code:
>
> if(CommerceContext.Current.AuthenticationInfo.IsAuthenticated())
> {
> CommerceContext.Current.AuthenticationInfo.AuthTicket.SignOut();
> Response.Redirect("welcome.aspx");
> }
> if (userName.Text!="")
> {
> AuthenticationInfo authInfo =
> CommerceContext.Current.AuthenticationInfo;
> ProfileContext profContext = CommerceContext.Current.ProfileSystem;
> string pwd,pad_pwd;
> Profile prof;
> try
> {
> prof = profContext.GetProfile(userName.Text, "UserObject");
> pwd =
prof.Properties["GeneralInfo.user_security_password"].Value.ToString();
> pad_pwd =
prof.Properties["GeneralInfo.user_security_passwordpadding"].Value.ToString(
);
>
> NFENCRYPTLib.Encrypt kod = new NFENCRYPTLib.EncryptClass();
> string password = password.Text;
> if(string.Compare(pwd, kod.MD5(ref password,ref pad_pwd))==0)
> {
> string userID = (string)prof.Properties["GeneralInfo.user_id"].Value;
>
> authInfo.SetAuthTicket(userID, true, 200);
> authInfo.SetProfileTicket(userID, true);
> Response.Redirect(link);
> }
> else error.Text += "Wrong password<br>";
> }
> catch(Exception exp)
> {
> error.Text = "Error!";
> }
> }
>
> Please help me fast!
| |
|
| I'm running into the same problem. isAuthenticated is being reset to
false. My value is true - i do a redirect and check it on the next
page and it's set to false. This is not the first major problem I've
had with commerce server...
Bob
"Max Akbar" <maximum2000@hotmail.com> wrote in message news:<elQeSPR9DHA.488@TK2MSFTNGP12.phx.gbl>...[color=blue]
> I ran across this before and for some reason if you pack the site then
> delete the current site then unpackaged it then all should work. Or if you
> open Commerce Manager then navigate to your site then navigate to your sites
> Application resources then right click on the Application that points to
> your site then right click properties and uncheck the "Set Cookie Path to
> Application".
>
> I am not sure why this happens but I have fixed it with the above solutions.
>
> Regards,
> -Max
>
> "Gothmog" <ggiewon@poczta.onet.pl> wrote in message
> news:7972adb7.0402160522.1871e0e9@posting.google.com...
> prof.Properties["GeneralInfo.user_security_password"].Value.ToString();
> prof.Properties["GeneralInfo.user_security_passwordpadding"].Value.ToString(
> );
> else error.Text += "Wrong password<br>";
| |
|
| I called microsoft about this and I was sent a network monitoring
tool, similar to SQLProfiler. This tool is used to track network
utilization and creates a report. The MS tech told me to run this,
create the report and email it to him. I installed the app and when I
attempted to access the site from a workstation everything seemed to
work fine. I've been testing now for about an hour and everything
looks good. I don't know what happened but if you have an MSDN
subscription call them and get this tool - All I know is, I did
nothing other than install this little app and everything works - only
problem is I still don't know why it happened. I made no code or
config changes and now magically everything works....
I'll keep you posted,
b
bob@rwhelan.com (Bob) wrote in message news:<a025815f.0402172059.39477f6f@posting.google.com>...[color=blue]
> I'm running into the same problem. isAuthenticated is being reset to
> false. My value is true - i do a redirect and check it on the next
> page and it's set to false. This is not the first major problem I've
> had with commerce server...
>
> Bob
>
> "Max Akbar" <maximum2000@hotmail.com> wrote in message news:<elQeSPR9DHA.488@TK2MSFTNGP12.phx.gbl>...
> prof.Properties["GeneralInfo.user_security_password"].Value.ToString();
> else error.Text += "Wrong password<br>";
| |
|
| The problem is back.
bob@rwhelan.com (Bob) wrote in message news:<a025815f.0402181027.7a976431@posting.google.com>...[color=blue]
> I called microsoft about this and I was sent a network monitoring
> tool, similar to SQLProfiler. This tool is used to track network
> utilization and creates a report. The MS tech told me to run this,
> create the report and email it to him. I installed the app and when I
> attempted to access the site from a workstation everything seemed to
> work fine. I've been testing now for about an hour and everything
> looks good. I don't know what happened but if you have an MSDN
> subscription call them and get this tool - All I know is, I did
> nothing other than install this little app and everything works - only
> problem is I still don't know why it happened. I made no code or
> config changes and now magically everything works....
>
> I'll keep you posted,
> b
>
> bob@rwhelan.com (Bob) wrote in message news:<a025815f.0402172059.39477f6f@posting.google.com>...
> prof.Properties["GeneralInfo.user_security_password"].Value.ToString();
> else error.Text += "Wrong password<br>";
| |
| Max Akbar 2004-02-18, 5:34 pm |
| Did you try my suggestions?
Regards,
-Max
"Bob" <bob@rwhelan.com> wrote in message
news:a025815f.0402181800.aed67d@posting.google.com...
> The problem is back.
>
>
> bob@rwhelan.com (Bob) wrote in message
news:<a025815f.0402181027.7a976431@posting.google.com>...[color=blue]
news:<a025815f.0402172059.39477f6f@posting.google.com>...[color=blue]
news:<elQeSPR9DHA.488@TK2MSFTNGP12.phx.gbl>...[color=blue]
then[color=blue]
if you[color=blue]
your sites[color=blue]
points to[color=blue]
Path to[color=blue]
solutions.[color=blue]
always[color=blue]
CommerceContext.Current.ProfileSystem;[color=blue]
prof.Properties["GeneralInfo.user_security_passwordpadding"].Value.ToString([color=blue]
(string)prof.Properties["GeneralInfo.user_id"].Value;[color=blue]
|
|
|
|
|