|
Home > Archive > Commerce Server General > April 2004 > Please help
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]
|
|
|
| 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.IPostBackEve
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 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.UserI
D;
Guid autenticadoGuid =3D new System.Guid(=20
autenticadoUserId );
=09
//M=E9todo para a=F1adir a la cesta el contenido del usuario=20
an=F3nimo.
MezclarCesta(anonimoGuid, autenticadoGuid);
=09
Response.Redirect("./Default.aspx");
}
....
Thanks.
...
| |
| Michael O'Donovan [MSFT] 2004-03-31, 3:40 am |
| Hi Fran,
It sounds like your local machine has an existing persitant CS profile
ticket (cookie) and hence this giving you a valid UserID on this machine. I
am pretty sure if you delete this cookie then you will experience the same
problem as your remote machine.
If a user visits your logon.aspx page as your first page in your site and
selects login, the following code will execute.
string anonimoUserId = CommerceContext.Current.UserID;
Because the user doesnt have a CS AutTcket or ProfileTicket then UserID will
be empty and hence your code will fail. CommerceContext.Current.UserID is
populated with the Guid found in the CS AuthTicket or CS ProfileTicket.
These are created using the SetAutTicket and SetProfile tickets methods.
Hope this helps,
Michael
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"fran" <anonymous@discussions.microsoft.com> wrote in message
news:15bd501c41681$382d1f50$a501280a@phx
.gbl...
Hello,
When I request the page login.aspx in the local computer
everything works well. However if I request the page
login.aspx from another computer I obtain the following
error:
Detalles de la excepción: System.ArgumentNullException:
ArgumentNull_String Nombre del parámetro: g
Error de código fuente:
Line 95: string anonimoUserId =
CommerceContext.Current.UserID;
Line 96: Guid anonimoGuid = new System.Guid(
anonimoUserId);
Línea 98:try
Archivo de origen:
e:\inetpub\wwwroot\webcommerce\login.aspx.cs Línea: 96
Seguimiento de la pila:
[ArgumentNullException: ArgumentNull_String
Nombre del parámetro: g]
System.Guid..ctor(String g) +3415
WebCommerce.login.botonLogin_Click(Object sender,
EventArgs e) in
e:\inetpub\wwwroot\webcommerce\login.aspx.cs:96
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
+108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEve
ntHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent
(IPostBackEventHandler sourceControl, String
eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent
(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1247
-----------------------------------------------------------
---------------------
Información de versión: Versión de Microsoft .NET
Framework:1.1.4322.573; Versión de ASP.NET:1.1.4322.573
The line that is failing is "Guid anonimoGuid = new
System.Guid(anonimoUserId);", because anonimoUserId is
null. But Why dont't fail when I use local pc (the server)
and fail when I use another pc?
My code is:
private void botonLogin_Click(object
sender,System.EventArgs e)
{
AuthenticationInfo authInfo =
CommerceContext.Current.AuthenticationInfo;
Profile prof;
ProfileContext profContext =
CommerceContext.Current.ProfileSystem;
string pwd;
string anonimoUserId = CommerceContext.Current.UserID;
Guid anonimoGuid = new System.Guid( anonimoUserId );
try
{
prof = profContext.GetProfile
(correoElectronico.Text, "UserObject");
pwd = (string)prof.Properties
["GeneralInfo.user_security_password"].Value;
if(string.Compare(pwd, contrasena.Text)==0)
{
string identificadorUsuario = (string)prof.Properties
["GeneralInfo.user_id"].Value;
//Creación de un ticket MSCSAuth
authInfo.SetAuthTicket(identificadorUsuario, true, 200);
//Creación de un ticket MSCSProfile
authInfo.SetProfileTicket(identificadorUsuario, true);
string autenticadoUserId =
CommerceContext.Current.AuthenticationInfo.AuthTicket.UserI
D;
Guid autenticadoGuid = new System.Guid(
autenticadoUserId );
//Método para añadir a la cesta el contenido del usuario
anónimo.
MezclarCesta(anonimoGuid, autenticadoGuid);
Response.Redirect("./Default.aspx");
}
....
Thanks.
...
| |
|
| Hello, 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.
Very Thanks. =20
>-----Original Message-----
>Hi Fran,
>
>It sounds like your local machine has an existing=20
persitant CS profile
>ticket (cookie) and hence this giving you a valid UserID=20
on this machine. I
>am pretty sure if you delete this cookie then you will=20
experience the same
>problem as your remote machine.
>
>If a user visits your logon.aspx page as your first page=20
in your site and
>selects login, the following code will execute.
>
>string anonimoUserId =3D CommerceContext.Current.UserID;
>
>Because the user doesnt have a CS AutTcket or=20
ProfileTicket then UserID will
>be empty and hence your code will fail.=20
CommerceContext.Current.UserID is
>populated with the Guid found in the CS AuthTicket or CS=20
ProfileTicket.
>These are created using the SetAutTicket and SetProfile=20
tickets methods.
>
>Hope this helps,
>Michael
>
>--=20
>This posting is provided "AS IS" with no warranties, and=20
confers no rights.
>"fran" <anonymous@discussions.microsoft.com> wrote in=20
message
> news:15bd501c41681$382d1f50$a501280a@phx
.gbl...
>Hello,
>When I request the page login.aspx in the local computer
>everything works well. However if I request the page
>login.aspx from another computer I obtain the following
>error:
>
>Detalles de la excepci=F3n: System.ArgumentNullException:
>ArgumentNull_String Nombre del par=E1metro: g
>
>Error de c=F3digo fuente:
>
>Line 95: string anonimoUserId =3D
>CommerceContext.Current.UserID;
>
>Line 96: Guid anonimoGuid =3D new System.Guid(
>anonimoUserId);
>
>L=EDnea 98:try
>
>
>Archivo de origen:
>e:\inetpub\wwwroot\webcommerce\login.aspx.cs L=EDnea: 96
>
>Seguimiento de la pila:
>
>
>[ArgumentNullException: ArgumentNull_String
>Nombre del par=E1metro: g]
> System.Guid..ctor(String g) +3415
> WebCommerce.login.botonLogin_Click(Object sender,
>EventArgs e) in
>e:\inetpub\wwwroot\webcommerce\login.aspx.cs:96
> System.Web.UI.WebControls.Button.OnClick(EventArgs e)
>+108
>
>System.Web.UI.WebControls.Button.System.Web.UI.IPostBackE
ve
>ntHandler.RaisePostBackEvent(String eventArgument) +57
> System.Web.UI.Page.RaisePostBackEvent
>(IPostBackEventHandler sourceControl, String
>eventArgument) +18
> System.Web.UI.Page.RaisePostBackEvent
>(NameValueCollection postData) +33
> System.Web.UI.Page.ProcessRequestMain() +1247
>
>
>
>
>---------------------------------------------------------
--
>---------------------
>Informaci=F3n de versi=F3n: Versi=F3n de Microsoft .NET
>Framework:1.1.4322.573; Versi=F3n de ASP.NET:1.1.4322.573
>
>The line that is failing is "Guid anonimoGuid =3D new
>System.Guid(anonimoUserId);", because anonimoUserId is
>null. But Why dont't fail when I use local pc (the=20
server)
>and fail when I use another pc?
>
>My code is:
>
>private void botonLogin_Click(object
>sender,System.EventArgs e)
>{
> AuthenticationInfo authInfo =3D
>CommerceContext.Current.AuthenticationInfo;
> Profile prof;
> ProfileContext profContext =3D
>CommerceContext.Current.ProfileSystem;
> string pwd;
>
> string anonimoUserId =3D CommerceContext.Current.UserID;
> Guid anonimoGuid =3D new System.Guid( anonimoUserId );
>
> try
> {
> prof =3D profContext.GetProfile
>(correoElectronico.Text, "UserObject");
> pwd =3D (string)prof.Properties
>["GeneralInfo.user_security_password"].Value;
>
> if(string.Compare(pwd, contrasena.Text)=3D=3D0)
>{
> string identificadorUsuario =3D (string)
prof.Properties
>["GeneralInfo.user_id"].Value;
>
> //Creaci=F3n de un ticket MSCSAuth
>
>authInfo.SetAuthTicket(identificadorUsuario, true, 200);
>//Creaci=F3n de un ticket MSCSProfile
>
>authInfo.SetProfileTicket(identificadorUsuario, true);
> string autenticadoUserId =3D
>CommerceContext.Current.AuthenticationInfo.AuthTicket.Use
rI
>D;
> Guid autenticadoGuid =3D new System.Guid(
>autenticadoUserId );
>
> //M=E9todo para a=F1adir a la cesta el contenido del=20
usuario
>an=F3nimo.
> MezclarCesta(anonimoGuid, autenticadoGuid);
>
> Response.Redirect("./Default.aspx");
>}
>....
>
>
>Thanks.
>...
>
>
>
>
>.
>
| |
| Michael O'Donovan [MSFT] 2004-04-01, 3:40 am |
| Strange,
Your code that you have got below works on my machine. Is the Session_Start
actually executing for you? Have you enabled session state in the
web.config?
Hope this helps,
Michael
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"fran" <anonymous@discussions.microsoft.com> wrote in message
news:13ad401c41759$e56ab3c0$a601280a@phx
.gbl...
Hello, I have wrote the following code in global.asax:
protected void Session_Start(Object sender, EventArgs e)
{
AuthenticationInfo authInfo =
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.
Very Thanks.
>-----Original Message-----
>Hi Fran,
>
>It sounds like your local machine has an existing
persitant CS profile
>ticket (cookie) and hence this giving you a valid UserID
on this machine. I
>am pretty sure if you delete this cookie then you will
experience the same
>problem as your remote machine.
>
>If a user visits your logon.aspx page as your first page
in your site and
>selects login, the following code will execute.
>
>string anonimoUserId = CommerceContext.Current.UserID;
>
>Because the user doesnt have a CS AutTcket or
ProfileTicket then UserID will
>be empty and hence your code will fail.
CommerceContext.Current.UserID is
>populated with the Guid found in the CS AuthTicket or CS
ProfileTicket.
>These are created using the SetAutTicket and SetProfile
tickets methods.
>
>Hope this helps,
>Michael
>
>--
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"fran" <anonymous@discussions.microsoft.com> wrote in
message
> news:15bd501c41681$382d1f50$a501280a@phx
.gbl...
>Hello,
>When I request the page login.aspx in the local computer
>everything works well. However if I request the page
>login.aspx from another computer I obtain the following
>error:
>
>Detalles de la excepción: System.ArgumentNullException:
>ArgumentNull_String Nombre del parámetro: g
>
>Error de código fuente:
>
>Line 95: string anonimoUserId =
>CommerceContext.Current.UserID;
>
>Line 96: Guid anonimoGuid = new System.Guid(
>anonimoUserId);
>
>Línea 98:try
>
>
>Archivo de origen:
>e:\inetpub\wwwroot\webcommerce\login.aspx.cs Línea: 96
>
>Seguimiento de la pila:
>
>
>[ArgumentNullException: ArgumentNull_String
>Nombre del parámetro: g]
> System.Guid..ctor(String g) +3415
> WebCommerce.login.botonLogin_Click(Object sender,
>EventArgs e) in
>e:\inetpub\wwwroot\webcommerce\login.aspx.cs:96
> System.Web.UI.WebControls.Button.OnClick(EventArgs e)
>+108
>
>System.Web.UI.WebControls.Button.System.Web.UI.IPostBackE
ve
>ntHandler.RaisePostBackEvent(String eventArgument) +57
> System.Web.UI.Page.RaisePostBackEvent
>(IPostBackEventHandler sourceControl, String
>eventArgument) +18
> System.Web.UI.Page.RaisePostBackEvent
>(NameValueCollection postData) +33
> System.Web.UI.Page.ProcessRequestMain() +1247
>
>
>
>
>---------------------------------------------------------
--
>---------------------
>Información de versión: Versión de Microsoft .NET
>Framework:1.1.4322.573; Versión de ASP.NET:1.1.4322.573
>
>The line that is failing is "Guid anonimoGuid = new
>System.Guid(anonimoUserId);", because anonimoUserId is
>null. But Why dont't fail when I use local pc (the
server)
>and fail when I use another pc?
>
>My code is:
>
>private void botonLogin_Click(object
>sender,System.EventArgs e)
>{
> AuthenticationInfo authInfo =
>CommerceContext.Current.AuthenticationInfo;
> Profile prof;
> ProfileContext profContext =
>CommerceContext.Current.ProfileSystem;
> string pwd;
>
> string anonimoUserId = CommerceContext.Current.UserID;
> Guid anonimoGuid = new System.Guid( anonimoUserId );
>
> try
> {
> prof = profContext.GetProfile
>(correoElectronico.Text, "UserObject");
> pwd = (string)prof.Properties
>["GeneralInfo.user_security_password"].Value;
>
> if(string.Compare(pwd, contrasena.Text)==0)
>{
> string identificadorUsuario = (string)
prof.Properties
>["GeneralInfo.user_id"].Value;
>
> //Creación de un ticket MSCSAuth
>
>authInfo.SetAuthTicket(identificadorUsuario, true, 200);
>//Creación de un ticket MSCSProfile
>
>authInfo.SetProfileTicket(identificadorUsuario, true);
> string autenticadoUserId =
>CommerceContext.Current.AuthenticationInfo.AuthTicket.Use
rI
>D;
> Guid autenticadoGuid = new System.Guid(
>autenticadoUserId );
>
> //Método para añadir a la cesta el contenido del
usuario
>anónimo.
> MezclarCesta(anonimoGuid, autenticadoGuid);
>
> Response.Redirect("./Default.aspx");
>}
>....
>
>
>Thanks.
>...
>
>
>
>
>.
>
| |
|
| 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 ok.=20
My Web.config is ok.
<?xml version=3D"1.0" encoding=3D"utf-8"?>
<configuration>
<configSections>
<!-- COMMERCE SERVER CONFIGURATION=20
SECTION HANDLERS
These configuration sections are required for=20
the Commerce Server .NET Application
Framework to function properly. They must be=20
registered using the strong name for the
assemblies.
-->
<sectionGroup name=3D"CommerceServer">
<section name=3D"application"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.Commer
ceApplicationSectionHandler,=20
Microsoft.CommerceServer.Runtime, Version=3D4.5.2002.0,=20
Culture=3Dneutral, PublicKeyToken=3D31bf3856ad364e35"/>
<section name=3D"authentication"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.Commer
ceAuthenticationSectionHandler,=20
Microsoft.CommerceServer.Runtime, Version=3D4.5.2002.0,=20
Culture=3Dneutral, PublicKeyToken=3D31bf3856ad364e35"/>
<section name=3D"pipelines"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.Commer
cePipelineSectionHandler,=20
Microsoft.CommerceServer.Runtime, Version=3D4.5.2002.0,=20
Culture=3Dneutral, PublicKeyToken=3D31bf3856ad364e35"/>
<section name=3D"caches"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.Commer
ceCacheSectionHandler, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<section name=3D"messageManager"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.Commer
ceMessageManagerSectionHandler,=20
Microsoft.CommerceServer.Runtime, Version=3D4.5.2002.0,=20
Culture=3Dneutral, PublicKeyToken=3D31bf3856ad364e35"/>
<section name=3D"catalog"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.Commer
ceCatalogSectionHandler, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<section name=3D"orders"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.Commer
ceOrdersSectionHandler, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<section name=3D"profiles"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.Commer
ceProfilesSectionHandler,=20
Microsoft.CommerceServer.Runtime, Version=3D4.5.2002.0,=20
Culture=3Dneutral, PublicKeyToken=3D31bf3856ad364e35"/>
<section name=3D"contentSelection"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.Commer
ceContentSelectionSectionHandler,=20
Microsoft.CommerceServer.Runtime, Version=3D4.5.2002.0,=20
Culture=3Dneutral, PublicKeyToken=3D31bf3856ad364e35"/>
<section name=3D"commerceEvent"=20
type=3D"Microsoft.CommerceServer.Runtime.Configuration.EventL
oggerConfigurationHandler,=20
Microsoft.CommerceServer.Runtime, Version=3D4.5.2002.0,=20
Culture=3Dneutral, PublicKeyToken=3D31bf3856ad364e35"/>
</sectionGroup>
</configSections>
<!-- COMMERCE SERVER CONFIGURATION SECTION
This signifies the beginning of the configuration=20
of the Commerce Server .NET
Application Framework.
-->
<CommerceServer>
<!-- APPLICATION
Set the siteName to be the name of the site as=20
it has been registered in the Administration
database. The Site Packager will update this=20
attribute automatically when unpacking
a site. Set debugLevel to "Checked", "Debug",=20
or "Production". Because the "Checked" and
"Debug" settings cause the application to run=20
slower than normal, you should only use these
values when debugging the application.
-->
<application siteName=3D"WebCommerce"=20
debugLevel=3D"Checked"/>
<!-- AUTHENTICATION
Set the ticketTimeOut to the appropriate=20
timeout value for authentication tickets issued
for the application. Set detectCookies to=20
true if you wish to enable a cookie to URL-mode
fallback authentication scheme.
-->
<authentication ticketTimeOut=3D"30"=20
detectCookies=3D"true"/>
<!-- PIPELINES
Configure the pipelines you wish to use in=20
your application.
-->
<pipelines>
<!-- PIPELINE CONFIGURATION
Set the name of the pipeline to whatever=20
string you wish to use when referencing the
pipeline in your application. The path should=20
be set to a the relative path of the pipeline
configuration file (.PCF) that corresponds to=20
the pipeline you wish to execute when
referencing the pipeline in your application. =20
Set transacted to false to disable COM+
Transactions when executing your pipeline. =20
The type should be set to either "OrderPipeline"
or "CSFPipeline" depending on if you intend to=20
use the pipeline for processing Orders or
displaying advertisements. Set loggingEnabled=20
to true to enable pipeline logging. The log
will be created in the "pipelines\log"=20
directory of your application. Note that this
causes the application to run slower than=20
normal so it should only be enabled during
debugging.
Sample pipeline configuration sections have=20
been provided below.
-->
<!-- BEGIN SAMPLE PIPELINE=20
CONFIGURATION SECTIONS -->
<pipeline
name=3D"basket"
path=3D"pipelines\basket.pcf"
transacted=3D"false"
type=3D"OrderPipeline"
loggingEnabled=3D"false" />
<pipeline
name=3D"checkout"
path=3D"pipelines\checkout.pcf"
transacted=3D"true"
type=3D"OrderPipeline"
loggingEnabled=3D"true" />
<!--
<pipeline
name=3D"product"
path=3D"pipelines\product.pcf"
transacted=3D"false"
type=3D"OrderPipeline"
loggingEnabled=3D"true" />
-->
<pipeline
name=3D"total"
path=3D"pipelines\total.pcf"
transacted=3D"false"
type=3D"OrderPipeline"
loggingEnabled=3D"true" />
=20
<pipeline
name=3D"advertising"
path=3D"pipelines\advertising.pcf"
transacted=3D"false"
type=3D"CSFPipeline" />
<!--CSFPipeline especifica pipeline de=20
selecci=F3n de contenidos. -->=20
<pipeline
name=3D"discounts"
path=3D"pipelines\discounts.pcf"
transacted=3D"false"
type=3D"CSFPipeline" />
<pipeline
name=3D"recordevent"
path=3D"pipelines\recordevent.pcf"
transacted=3D"false"
type=3D"CSFPipeline" />
<!-- END SAMPLE PIPELINE CONFIGURATION SECTIONS -->
</pipelines>
<!-- CACHES
Configure the caches you wish to use in your=20
application
-->
<caches>
<!-- CACHE CONFIGURATION
Set the name of the cache to whatever string=20
you wish to use when referencing the cache.
Note that certain caches must have specific=20
names when using the default Advertising,
Discounting, and QueryCatalogInfo pipeline=20
components. These names are Advertising, Discount,
and QueryCatalogInfoCache respectively. The=20
refreshInterval should be set to a time value
(in seconds) that determines how long the=20
cache remains in memory before being refreshed.
The retryInterval should be set to a time=20
value (in seconds) that determines how long the
Cache Manager waits before attempting to call=20
the cache loader in the event of a failure
when calling the cache loader. Set maxSize to=20
be the maximum number of entries to
store in the cache.
-->
=09
<cache
name=3D"Advertising"
type=3D"Advertising"
refreshInterval=3D"900"
retryInterval=3D"30" />
<cache
name=3D"Discounts"
type=3D"Discounts"
refreshInterval=3D"0"
retryInterval=3D"30" />
=09
=09
=09
=09
<cache
name=3D"SampleRegionalTaxCache"
type=3D"Tax"
refreshInterval=3D"0"
retryInterval=3D"30" />
<cache
name=3D"ShippingManagerCache"
type=3D"Shipping"
=20
loaderProgId=3D"Commerce.ShippingManagerCache"
refreshInterval=3D"0"
retryInterval=3D"30" />
<cache
name=3D"QueryCatalogInfoCache"
type=3D"QCI"
loaderProgId=3D"Commerce.LRUCacheFlush"
refreshInterval=3D"0"
retryInterval=3D"300"
maxSize=3D"10000">
<config key=3D"TableName"=20
value=3D"CatalogCache_Virtual_Directory" />
</cache>
=20
</caches>
<!-- MESSAGE MANAGER
Configure the resources to extract from=20
satellite assemblies into the MessageManager
used by components in the Order Processing=20
Pipelines.
=20
<messageManager>
-->
<messageManager>
<cultures default=3D"en-US"=20
baseName=3D"WebCommerce.MessageManagerResources"=20
assembly=3D"WebCommerce">
<culture id=3D"en-US" />
<culture id=3D"es-ES" />
=09
</cultures>
<resources>
<resource id=3D"pur_badsku" />
<resource=20
id=3D"pur_discount_changed"/>
<resource=20
id=3D"pur_discount_removed"/>
</resources>
</messageManager>
=20
<!-- CULTURES
Set the default attribute to be the RFC=20
1766 identifier of the default culture used
by the application. The baseName=20
attribute specifies the root name of the resources
used in your application. For example,=20
when using a satellite assembly named
"MyResources.en-US.resources", the root=20
name is "MyResources." The assembly attribute
is used to specify the name of the=20
assembly containing the default resources - either
the executing application or the name of a=20
satellite assembly.
<cultures default=3D"en-US"=20
baseName=3D"WebCommerce.MessageManager"=20
assembly=3D"WebCommerce">
-->
<!-- CULTURE
Set the id to be the RFC 1766 identifier=20
of each culture used by the application.
<culture id=3D"en-US" />
<culture id=3D"fr-fr" />
<culture id=3D"ja-JP" />
=20
</cultures>
-->
<!-- RESOURCES
This configures the individual resource=20
names to be extracted from each satellite
assembly and placed in the=20
MessageManager. Set the id to the resource identifier for
each resource you wish to use.
<resources>
<resource id=3D "pur_badsku" />
<resource id=3D "pur_badplacedprice" />
</resources>
</messageManager>
-->
<!-- PROFILES
This configures the runtime to recognize=20
two specific profiles, the Organization and
User profiles, in order to make the=20
CommerceContext class aware of any changes made
to the default settings of these=20
profiles. It is used to determine where the
CommerceContext.GetCatalogsForUser()=20
method looks for Catalog Sets associated with
the current user. It is also used by the=20
CommerceContext.UserProfile property
to determine how to load user profiles on=20
demand. These configuration settings are
only required if you make changes to the=20
default UserObject or Organization profiles.
-->
<!--
<profiles>
<userProfile
profileDefinition=3D"UserObject"
userIdProperty=3D"GeneralInfo.user_id"
organizationIdProperty=3D"AccountInfo.org_id"
=20
catalogSetIdProperty=3D"AccountInfo.user_catalog_set"
/>
=20
<organizationProfile
profileDefintion=3D"Organization"
organizationIdProperty=3D"GeneralInfo.org_id"
=20
catalogSetIdProperty=3D"GeneralInfo.org_catalog_set"
/>
=20
</profiles>
-->
<!-- COMMERCEEVENT
This configures the Commerce Events that will=20
be available for logging data to the IIS=20
web server log. The default events supported=20
are AddItemToBasket, RemoveItemFromBasket,
and SubmitOrder.
-->
<commerceEvent>
<add=20
className=3D"Microsoft.CommerceServer.Runtime.AddItemToBasket
Event" id=3D"AddItemToBasket"/>
<add=20
className=3D"Microsoft.CommerceServer.Runtime.RemoveItemFromB
asketEvent" id=3D"RemoveItemFromBasket"/>
<add=20
className=3D"Microsoft.CommerceServer.Runtime.SubmitOrderEven
t" id=3D"SubmitOrder" loggingEnabled=3D"true"/>
</commerceEvent>
=09
<contentSelection>
<add name=3D"advertising"=20
cacheName=3D"advertising" selectionPipeline=3D"advertising"=20
eventPipeline=3D"recordEvent" redirectUrl=3D"./redir.aspx"/>
<add name=3D"discounts"=20
cacheName=3D"discounts" selectionPipeline=3D"discounts"=20
eventPipeline=3D"recordEvent" redirectUrl=3D"./redir.aspx"/>
</contentSelection>
=09
</CommerceServer>
<system.web>
<httpModules>
<!-- COMMERCE SERVER HTTP MODULES
These configuration sections are required for=20
the Commerce Server .NET Application
Framework to function properly. They must be=20
registered using the strong name for the
assemblies.
-->
<add name=3D"CommerceApplication"=20
type=3D"Microsoft.CommerceServer.Runtime.CommerceApplicationM
odule, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<add name=3D"CommerceAuthentication"=20
type=3D"Microsoft.CommerceServer.Runtime.CommerceAuthenticati
onModule, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<add name=3D"CommerceOrder"=20
type=3D"Microsoft.CommerceServer.Runtime.Orders.CommerceOrder
Module, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<add name=3D"CommerceCatalog"=20
type=3D"Microsoft.CommerceServer.Runtime.Catalog.CommerceCata
logModule, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<add name=3D"CommerceProfile"=20
type=3D"Microsoft.CommerceServer.Runtime.Profiles.CommercePro
fileModule, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<add=20
name=3D"CommerceExpressionEvaluator"=20
type=3D"Microsoft.CommerceServer.Runtime.Targeting.CommerceEx
pressionModule, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<add name=3D"CommerceCache"=20
type=3D"Microsoft.CommerceServer.Runtime.Caching.CommerceCach
eModule, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<add=20
name=3D"CommerceContentSelection"=20
type=3D"Microsoft.CommerceServer.Runtime.Targeting.CommerceCo
ntentSelectionModule, Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
</httpModules>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug=3D"true" to enable ASPX=20
debugging. Otherwise, setting this value to
false will improve runtime performance of this=20
application.=20
Set compilation debug=3D"true" to insert=20
debugging symbols (.pdb information)
into the compiled page. Because this creates a=20
larger file that executes
more slowly, you should set this value to true=20
only when debugging and to
false at all other times. For more=20
information, refer to the documentation about
debugging ASP .NET files.
-->
<compilation defaultLanguage=3D"c#"=20
debug=3D"true">
<assemblies>
<add=20
assembly=3D"Microsoft.CommerceServer.Runtime,=20
Version=3D4.5.2002.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
<add assembly=3D"GENIDLib,=20
Version=3D1.0.0.0, Culture=3Dneutral,=20
PublicKeyToken=3D31bf3856ad364e35"/>
</assemblies>
</compilation>
<!-- CUSTOM ERROR MESSAGES
Set mode=3D"on" or "remoteonly" to enable custom=20
error messages, "off" to disable. Add
<error> tags for each of the errors you want=20
to handle.
-->
<customErrors mode=3D"Off"/>
<!-- AUTHENTICATION=20
This section sets the authentication policies=20
of the application. Possible modes are "Windows", "Forms",=20
"Passport" and "None"
-->
<authentication mode=3D"Windows"/>
<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log=20
output for every page within an application.=20
Set trace enabled=3D"true" to enable application=20
trace logging. If pageOutput=3D"true", the
trace information will be displayed at the=20
bottom of each page. Otherwise, you can view the=20
application trace log by browsing=20
the "trace.axd" page from your web application
root.=20
-->
<trace enabled=3D"false" requestLimit=3D"10"=20
pageOutput=3D"false" traceMode=3D"SortByTime"=20
localOnly=3D"true"/>
<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify=20
which requests belong to a particular session.=20
If cookies are not available, a session can be=20
tracked by adding a session identifier to the URL.=20
To disable cookies, set sessionState=20
cookieless=3D"true".
-->
<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" cookieless=3D"false" timeout=3D"20"/>
<!-- GLOBALIZATION
This section sets the globalization settings=20
of the application.=20
-->
<globalization requestEncoding=3D"utf-8"=20
responseEncoding=3D"utf-8"/>
</system.web>
</configuration>
>-----Original Message-----
>Strange,
>
>Your code that you have got below works on my machine. Is=20
the Session_Start
>actually executing for you? Have you enabled session=20
state in the
>web.config?
>
>Hope this helps,
>Michael
>
>--=20
>This posting is provided "AS IS" with no warranties, and=20
confers no rights.
>"fran" <anonymous@discussions.microsoft.com> wrote in=20
message
> news:13ad401c41759$e56ab3c0$a601280a@phx
.gbl...
>Hello, I have wrote the following code in global.asax:
>
>protected void Session_Start(Object sender, EventArgs e)
>{
>AuthenticationInfo authInfo =3D
>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.
>
>Very Thanks.
>
>
>persitant CS profile
>on this machine. I
>experience the same
>in your site and
>ProfileTicket then UserID will
>CommerceContext.Current.UserID is
>ProfileTicket.
>tickets methods.
>confers no rights.
>message
>ve
>--
>server)
>prof.Properties
>rI
>usuario
>
>
>.
>
| |
| zuckas 2004-04-25, 9:43 pm |
| Hi Fran,
Were you able to resolve this issue. I am also running into the same problem. It is driving me crazy. It happens once I deploy our PUP to a new server.
Z |
|
|
|
|