给客户2011年做了一套系统,用.net 2008 mvc2 做的。数据库是oracle 10g,用的技术是dblinq。
运行了3年之后,就在今年2014年有两个用户说无法登录。输入用户名和密码后无任何提示,也没进入主界面,不知道为何?
由于当时参加项目的人现在只有我一个了,这个问题让我来解决。我找到源代码,看了一下,登录时有两个分支,下面分别说明:
分支一:
程序正常流程,又分用户身份验证成功和失败两种情况。
情况一:身份验证成功后,进入主界面。 return RedirectToAction("Index", "Home");
情况二:身份验证失败后,弹出用户名或密码错误的提示信息对话框。
string login = string.Empty;
login = "< script >alert('用户名或密码输入错误!')</ script >";
ViewData["Message"] = login;
return View();
分支二:
异常情况,代码如下:
catch (Exception e)
{
ViewData["Message"] = e.Message;
}
return View();
页面代码
<div id="logincontenttop"></div>
<div id="logincontent"></div>
<div id="logincontentbottom">
<% using (Html.BeginForm())
{ %>
<table cellpadding="0" cellspacing="0">
<tr>
<td colspan="5" style="height:24px;"></td>
</tr>
<tr>
<td style="width: 160px"></td>
<td>
<input type="text" style="width:100px" id="UserName" name="UserName" tabindex="1" />
</td>
<td style="width: 68px">
</td>
<td>
<input type="password" style="width:100px" id="Password" name="Password" tabindex="2" />
</td>
<td style="width: 20px">
</td>
<td align="right">
<input type="submit" id="loginbutton" value="" tabindex="3" />
</td>
</tr>
</table>
<%} %>
</div>
</div>
客户的浏览器是ie6,升级到ie8还是不能登录。使用其它用户的账号和密码在这台机子也无法登录。但这台机子 的用户在别人的机子上可以登录。安装了个360浏览器,可以登录,但界面样式比较难看。大家有什么好的解决办法,告诉我一下,先谢谢了!