Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/261.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# c使用自定义代码在AspDotNetStorefront中创建帐户_C#_Aspdotnetstorefront - Fatal编程技术网

C# c使用自定义代码在AspDotNetStorefront中创建帐户

C# c使用自定义代码在AspDotNetStorefront中创建帐户,c#,aspdotnetstorefront,C#,Aspdotnetstorefront,如何使用c自定义代码在AspDotNetStorefront 9.5中创建帐户? 我尝试在不使用注册表的情况下添加客户。是否有我们的自定义代码可供我使用的服务?如果您在大多数情况下通过直接将数据输入客户表来创建客户,请查看源代码。原因是Customer类假设会话,这在ASPDNSF中有点难以伪造和/或绕过 然而,我认为这应该是可行的: Customer c = new Customer(true); c.RequireCustomerRecord(); c.UpdateCustomer(...)

如何使用c自定义代码在AspDotNetStorefront 9.5中创建帐户?
我尝试在不使用注册表的情况下添加客户。是否有我们的自定义代码可供我使用的服务?

如果您在大多数情况下通过直接将数据输入客户表来创建客户,请查看源代码。原因是Customer类假设会话,这在ASPDNSF中有点难以伪造和/或绕过

然而,我认为这应该是可行的:

Customer c = new Customer(true);
c.RequireCustomerRecord();
c.UpdateCustomer(...);
布尔值为true的Customer构造函数将抑制Cookie,这一点非常重要。这段代码需要测试-我从未尝试过

或者,您也可以使用直接SQL:INSERT INTO customer创建客户。。。价值观这是ASPDNSF中的常见做法