前台:

<html>
<head>
<title>签名验证</title>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<script id="clientEventHandlersVBS" type="text/vbscript">
<!--
'从服务端获取SessionKey
dim strAccount
dim strSignature
Sub btnAuthSign_onclick '服务器端代码,用于验证签名
on error resume next
Set RTXCRoot = RTXAX.GetObject("KernalRoot") ' 获取KernalRoot对象
Set rtcData = RTXCRoot.Sign '获取签名,并把它赋给rtcData strAccount = RTXCRoot.Account '获取用户帐号
strSignature = rtcData.GetString("Sign") '获取rtcData对象的Sign 的内容,也就是用户签名 form1.user.value= strAccount
form1.sign.value = strSignature
If Err.Number <> Then
MsgBox "程序运行错误 " & Err.Description
Err.Clear
End If
end sub
-->
</script>
</head>
<body>
<form name="form1" method="get" action="Handler.ashx">
<table>
<tr>
<td>
<!--用户名-->
</td>
<td>
<input type="hidden" name="user" />
</td>
</tr>
<tr>
<td>
<!-- 签&nbsp;&nbsp;名-->
</td>
<td>
<input type="hidden" name="sign" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<input name="btnAuthSign" type="submit" id="btnAuthSign" style="width: 100px; height: 21px"
value="登录OA" size="">
</td>
</tr>
</table>
</form>
<object id="RTXAX" data="data:application/x-oleobject;base64,fajuXg4WLUqEJ7bDM/7aTQADAAAaAAAAGgAAAA=="
classid="clsid:5EEEA87D-160E-4A2D-8427-B6C333FEDA4D" viewastext>
</object>
</body>
</html>

后台Handler.ashx(一般处理程序):

添加引用 System.Data.OracleClient和Interop.RTXSAPILib去下载

public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string strName = HttpContext.Current.Request.QueryString["user"];
string strSign = HttpContext.Current.Request.QueryString["sign"]; //OA验证
string selectSql = "select * from usr where PHONEHOME=:lName";
DataSet DSRst = ExecuteScalar(ConnString(), CommandType.Text, selectSql, strName);
DataTable table = DSRst.Tables[]; RTXSAPILib.IRTXSAPIRootObj RootObj = new RTXSAPILib.RTXSAPIRootObjClass();
RTXSAPILib.IRTXSAPIUserAuthObj2 AuthObj2 = (RTXSAPILib.IRTXSAPIUserAuthObj2)RootObj.UserAuthObj; bool bOK = AuthObj2.SignatureAuth(strName, strSign);
if (bOK == true && table != null && table.Rows.Count > )
{
context.Response.Redirect("http://192.168.30.157:8078/MainPages/Login.htm?username=" + strName + "uId=" + table.Rows[]["ID"]); //验证通过
}
else
{
context.Response.Redirect("http://192.168.30.157:8078/MainPages/Login.htm");
}
}
////提供的接口,Url参数格式:..Login.htm?username=admin&password=c4ca4238a0b923820dcc509a6f75849b
// $().ready(function () {
// if (request("username") == "") {
// return;
// }
// else {
// var uName = escape(request("username"));
// $.ajax({
// type: "POST",
// url: "../WebSiteRequestManager.ashx",
// data: { method: "BlnLogin", ValidateUser: uName, selectxt: $("#selxt").val() },
// success: function (msg) {
// alert(msg);
// if (msg == "Main" || msg == null) {
// top.location = "../MainPages/WindowMain.htm";
// }
// }
// });
// }
// }); public static string ConnString()
{
return System.Web.Configuration.WebConfigurationManager.AppSettings["OrclConnectionstring"];
}
public static DataSet ExecuteScalar(string connectionString, CommandType cmdType, string cmdText, string uname)
{
OracleConnection orclCon = new OracleConnection(connectionString);//添加引用 System.Data.OracleClient
OracleCommand Cmd = new OracleCommand(cmdText, orclCon);
Cmd.Parameters.AddWithValue(":lName", uname);
orclCon.Open();
DataSet ds = new DataSet();
OracleDataAdapter da = new OracleDataAdapter(Cmd);
da.Fill(ds);
return ds;
}

RTX登录其他系统的更多相关文章

  1. 【Linux_Fedora_系统管理系列】_1_用户登录和系统初始配置

    发现一个问题,在FC14 的Firefox浏览器中,编辑和排版好的博文,在windows下用chrome或者猎豹浏览器打开后,排版就变得阅读 不是很容易里,而且经常不经意的断行.不知道园子的管理人员时 ...

  2. 通过url链接登录其他系统

    目的:A系统通过链接跳转到其它系统(如B系统)并登录   技术方案 1.A系统用户登录B系统方案    1.A系统用户账号已经和B系统账号绑定,直接模拟登录    2.A系统用户账号未和B系统账号绑定 ...

  3. 使用密钥验证方式登录linux系统

    1.使用PuTTY工具PuTTYgen生成密钥对,打开PuTTYgen,点击Generate生成公钥(生成过程动动鼠标会提升进度哦). 2.将公钥(蓝色的是私钥)放到服务器上去: -在/root目录下 ...

  4. 浏览器登录EBS系统遇到问题总结

    1.可以登录EBS系统,但是职责位置为空白 这是兼容性视图问题,将ERP域名加入兼容性视图列表即可. 加入即可: 2.可以登录EBS系统,但是职责位置显示 “undefined” 这也是兼容性视图问题 ...

  5. 洗礼灵魂,修炼python(81)--全栈项目实战篇(9)—— 购物商城登录验证系统

    都在线购物过吧?那么你应该体验过,当没有登录账户时,点开购物车,个人中心,收藏物品等的操作时,都会直接跳转到登录账户的界面,然后如果登录一次后就不用再登录,直到用户登出. 是的,本次项目就是做一个登录 ...

  6. java jsch 登录linux系统避免手动输入Yes 或Always

    java jsch方法 登录linux系统, 要手动输入Yes No Always The host 10.202.84.7 is currently unknown to the system Th ...

  7. 在ASP.NET MVC3 中利用JSONP跨域登录WEB系统

    在信息系统开发的时,根据相关业务逻辑难免会多系统之间互相登录.一般情况下我们需要在多系统之间使用多个用户名和密码.这样客户就需要在多个系统之间重复登陆.每次登录都需要输入用户名和密码.最近比较流行的就 ...

  8. 远程登录Linux系统(使用xshell),远程上传加载文件(使用Xftp)

    一.Xshell(远程登录Linux系统) 1.安装xshell 自己百度找安装包 2.连接登录 1.连接前提 需要Linux开启一个sshd的服务,监听22号端口,一般默认是开启的 查看是否开启: ...

  9. 远程登录Linux系统及上传下载文件

    目录 1. 远程登录Linux系统 1.1 为什么要远程登录 1.2 Xshell6安装 1.3 连接登录 1.3.1 连接前提 1.3.2 Xshell连接配置 2. 远程上传下载文件 2.1 Xf ...

随机推荐

  1. iOS边练边学--级联菜单的两种实现方法

    一.方法1:如图,图中的两个tableView分别交给两个控制器来管理 重点难点:categoryTableView被点击之后,subcategoryTableView要取得相应的数据进行刷新,所以s ...

  2. UVA 10391 stl

    https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...

  3. sql-distinct

    DISTINCT 找出表格内的不同资料的值 语法 SELECT DISTINCT "栏位名" FROM "表格名"; 例如:要在以下的表格,Store_Info ...

  4. [NOIP2011] 普及组

    数字反转 小模拟 #include<cstdio> #include<iostream> #include<cstring> using namespace std ...

  5. Sublime text 快捷键总结

    下述快捷键都是我写C++代码时发现的,是否适用其他格式(扩展名)的文件尚为未知. Basic Editing Ctrl + A 全选 Ctrl + S 保存 Ctrl + C 复制 Ctrl + V ...

  6. vim YouCompleteMe

    http://www.ithao123.cn/content-1906969.html http://www.it165.net/os/html/201503/12190.html

  7. Android模拟器端口被占用问题的解决办法

    一.问题描述 今天在Eclipse中运行Android项目时遇到"The connection to adb is down, and a severe error has occured& ...

  8. [名词解释]Constant Amortized Time

    http://stackoverflow.com/questions/200384/constant-amortized-time 分摊常量时间: Amortised time explained i ...

  9. zabbix 邮件报错 Support for SMTP authentication was not compiled in

    服务器系统是centos6.5 zabbix版本是3.0.4 根据 网上教程配置好邮件脚本后,触发发送邮件的时候报错: Support for SMTP authentication was not ...

  10. WPF PopupNonTopmost重写

    之前做WPF遇到问题,在网上找到的一个类 public class PopupNonTopmost : System.Windows.Controls.Primitives.Popup { publi ...