C# 会员资格凭证验证出现问题,但该问题不应出现';我不能用它
由于我们的网站不能直接使用信用卡,我们将用户连同凭证和其他杂项变量发送到另一个网站上的“托管页面” 更详细地说,以下是用户通常访问此文件的方式:C# 会员资格凭证验证出现问题,但该问题不应出现';我不能用它,c#,asp.net,asp.net-mvc,membership-provider,C#,Asp.net,Asp.net Mvc,Membership Provider,由于我们的网站不能直接使用信用卡,我们将用户连同凭证和其他杂项变量发送到另一个网站上的“托管页面” 更详细地说,以下是用户通常访问此文件的方式: 转到我们的网站,使用他们以前创建的用户名和密码登录。这将使用asp.net成员资格提供程序 登录后,我们会向他们显示他们的帐户,他们有一个付款按钮。一旦他们点击这个 他们会收到“预付款”页面的提示,以核实金额和其他各种信息。他们单击此处继续 因此,付款页面显示在我们网站的iframe中。我们使用以下代码将它们重定向到外部托管网页: 一旦进入付款页
Event code: 4006
Event message: Membership credential verification failed.
Event time: 12/16/2013 4:32:22 AM
Event time (UTC): 12/16/2013 12:32:22 PM
Event ID: 42c509f2a25d46f0af17e72a52dfbbe5
Event sequence: 38
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/3/ROOT/SuburbanCustPortal-1-130316693110399868
Trust level: Full
Application Virtual Path: /SuburbanCustPortal
Application Path: C:\inetpub\wp\SuburbanCustPortal\
Machine name: WIN-OB929P97YAR
Process information:
Process ID: 3620
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Request information:
Request URL: https://myurl:443/SuburbanCustPortal/Account/Logon2
Request path: /SuburbanCustPortal/Account/Logon2
User host address: xx.xx.xx.xx
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Name to authenticate: testuser
我无法在我运行过的少数测试用例上实现,这使得它更加令人沮丧
这是我的web.config:
以及捕获帖子的方法:
[NoCache]
[HttpPost]
public ActionResult Receipt(string id)
{
var sb = new StringBuilder();
try
{
sb.AppendLine("ActionResult Reciept(string account)");
var count = 0;
var postVals = new Dictionary<string, string>();
foreach (var key in Request.Form.AllKeys)
{
sb.AppendLine("count: " + count);
sb.AppendLine(string.Format("key: {0} Value: {1}", key, Request.Form[key]));
postVals.Add(key, Request.Form[key]);
sb.AppendLine("finished count: " + count);
count++;
}
sb.AppendLine("finished processing ALLKeys");
var paymentReq = createPaymentRequest(postVals);
sb.AppendLine("finished processing 'var paymentReq = createPaymentRequest(postVals)' ");
var receipt = _client.RecordPaymentWithRequest(paymentReq);
var retval = PartialView(receipt.Duplicate ? "Duplicate Receipt" : "Receipt", receipt);
sb.AppendLine(string.Format("retval: {0}", retval));
return retval;
}
catch (Exception ex)
{
sb.AppendLine(string.Format("Receipt error: {0}", ex.Message));
Logging.LogException("Receipt error!", ex, _asName);
throw;
}
finally
{
Logging.LogInfo(sb.ToString(), _asName);
}
}
日志中有一段从04:22:15到04:39:52的时间间隔
这正常吗
编辑
我为提出要求的人澄清了上述步骤
在那个时候发生这种事真是太可疑了
我同意,但似乎在第4步中,您将重定向出站点,然后用户进行数据输入。如果用户偶尔需要10-20分钟来输入该信息(由于分心等原因),这比仅仅是一个简单的比赛条件更有可能
如果您仍然有来自所有错误的数据,您可以回过头来看看是否可以找到发生这种情况的时间模式(或每xx小时一次——见下文)
您可以使用一系列不同的浏览器(包括手机)进行测试,看看是否可以复制。另外,尝试不同版本的IE和IE上的不同安全设置。我在您的web.config中找到的几件事是-
博客
对于InProc,您不需要stateConnectionString、stateNetworkTimeout和sqlConnectionString。更多信息。我注意到IFrame上的src
设置不正确
<div align="center"> <iframe width="100%" height="600px" src="@Html.Raw(@ViewBag.GateWayWebsite)"></iframe></div>
另一个想法是,可能是框架集阻止了第三方Cookie-或。试着打开门
<div align="center"> <iframe width="100%" height="600px" src="@Html.Raw(@ViewBag.GateWayWebsite)"></iframe></div>
<div align="center"> <iframe width="100%" height="600px" src="@ViewBag.GateWayWebsite"></iframe></div>
<authentication mode="Forms">