ticket in another pc
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > ticket in another pc




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    ticket in another pc  
fran


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-11-04 09:27 PM

Hello,
When I request the page login.aspx in the local computer=20
everything works well. However if I request the page=20
login.aspx from another computer I obtain the following=20
error:

Detalles de la excepci=F3n: System.ArgumentNullException:=20
ArgumentNull_String Nombre del par=E1metro: g

Error de c=F3digo fuente:=20
=09
Line 95: string anonimoUserId =3D=20
CommerceContext.Current.UserID;

Line 96: Guid anonimoGuid =3D new System.Guid(=20
anonimoUserId);
=09
L=EDnea 98:try
=20

Archivo de origen:=20
e:\inetpub\wwwroot\webcommerce\login.aspx.cs    L=EDnea: 96=20

Seguimiento de la pila:=20


[ArgumentNullException: ArgumentNull_String
Nombre del par=E1metro: g]
System.Guid..ctor(String g) +3415
WebCommerce.login.botonLogin_Click(Object sender,=20
EventArgs e) in=20
e:\inetpub\wwwroot\webcommerce\login.aspx.cs:96
System.Web.UI.WebControls.Button.OnClick(EventArgs e)=20
+108
=20
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEv
e
ntHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent
(IPostBackEventHandler sourceControl, String=20
eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent
(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1247

=20


----------------------------------------------------------
-
---------------------
Informaci=F3n de versi=F3n: Versi=F3n de Microsoft .NET=20
Framework:1.1.4322.573; Versi=F3n de ASP.NET:1.1.4322.573=20

The line that is failing is "Guid anonimoGuid =3D new
System.Guid(anonimoUserId);", because anonimoUserId is=20
null. But Why dont't fail when I use local pc (the=20
server)=20
and fail when I use another pc?=20

My code is:

private void botonLogin_Click(object=20
sender,System.EventArgs e)
{
AuthenticationInfo authInfo =3D =20
CommerceContext.Current.AuthenticationInfo;
Profile prof;
ProfileContext profContext =3D=20
CommerceContext.Current.ProfileSystem;
string pwd;
=09
string anonimoUserId =3D CommerceContext.Current.UserID;
Guid anonimoGuid =3D new System.Guid( anonimoUserId );
=09
try
{
prof =3D profContext.GetProfile =20
(correoElectronico.Text, "UserObject");
pwd =3D (string)prof.Properties
["GeneralInfo.user_security_password"].Value;
=09
if(string.Compare(pwd, contrasena.Text)=3D=3D0)
{
string identificadorUsuario =3D (string)prof.Properties
["GeneralInfo.user_id"].Value;
=20
//Creaci=F3n de un ticket MSCSAuth
=09
authInfo.SetAuthTicket(identificadorUsuario, true, 200);
//Creaci=F3n de un ticket MSCSProfile
=09
authInfo.SetProfileTicket(identificadorUsuario, true);
string autenticadoUserId =3D=20
CommerceContext.Current.AuthenticationInfo.AuthTicket.User
I
D;
Guid autenticadoGuid =3D new System.Guid(=20
autenticadoUserId );
=09
//M=E9todo para a=F1adir a la cesta el contenido del=20
usuario=20
an=F3nimo.
MezclarCesta(anonimoGuid, autenticadoGuid);
=09
Response.Redirect("./Default.aspx");
}
....


Too:


I have wrote the following code in global.asax: =20

protected void Session_Start(Object sender, EventArgs e)
{
AuthenticationInfo authInfo =3D=20
CommerceContext.Current.AuthenticationInfo;
authInfo.SetProfileTicket("12345678-1234-1234-
1234-123456789012", true);
}



However, I have the same problem:

CommerceContext.Current.UserID; is returning null



How I can solution my problem.


In my Web.config, I have this code:
<!--  SESSION STATE SETTINGS -->
<sessionState mode=3D"InProc"=20
stateConnectionString=3D"tcpip=3D127.0.0.1:42424"=20
sqlConnectionString=3D"data source=3D127.0.0.1;user=20
id=3Dsa;password=3D"=20
cookieless=3D"false" timeout=3D"20"/>

I also have tried with cookieless=3Dfalse, but it is not=20
ok.=20




Thanks.
...





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:17 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register