前台:

<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. eclipse快捷键的使用及概述

    <eclipse快捷键的使用及概述> <Eclipse概述>       Eclipse 是一个开放源代码的.基于Java的可扩展开发平台.就其本身而言,它只是一个框架和一组服 ...

  2. 【HDU 4150】Powerful Incantation

    题 题意 给你s1,s2两个字符串,求s1中有多少个s2 代码 #include<stdio.h> #include<string.h> int t,len1,len2,pos ...

  3. BZOJ-1002 轮状病毒 高精度加减+Kirchhoff矩阵数定理+递推

    1002: [FJOI2007]轮状病毒 Time Limit: 1 Sec Memory Limit: 162 MB Submit: 3543 Solved: 1953 [Submit][Statu ...

  4. js阻止表单重复提交

    //校验表单的数据 function newFatherModuleVerify() { var moduelName = $('#fatherModule_moduelName').val(); a ...

  5. Server Data Synchronization Via Linux rsync、rsync+inotify Between Load Balance Server

    目录 . 远程文件同步的应用场景 . rsync+crontab . rsync+inotify 1. 远程文件同步的应用场景 在负载均衡集群的应用场景中,往往在多台web server的前端有一个提 ...

  6. 新建的 web 工程 有红色的惊叹号

    新建的 web 工程 有红色的感叹号问题:     在eclipse 中新建一个web工程,但是工程上有红色的感叹号.解决:     1.右键工程,选择Build Path-->Configur ...

  7. Ubuntu 12.10安装OpenGL

    http://wiki.ubuntu-tw.org/index.php?title=Howto_Install_OpenGL_Development_Environment 前言 OpenGL 是一套 ...

  8. Nagios配置和命令介绍(二 )

    Nagios配置 Nagios 主要用于监控一台或者多台本地主机及远程的各种信息,包括本机资源及对外的服务等.默认的Nagios 配置没有任何监控内容,仅是一些模板文件.若要让Nagios 提供服务, ...

  9. C# ServiceStack.Redis 操作对象List

    class Car { public Int32 Id { get; set; } public String Name { get; set; } static void Main(string[] ...

  10. C++标准转换运算符reinterpret_cast

    C++标准转换运算符reinterpret_cast reinterpret_cast <new_type> (expression) reinterpret_cast运算符是用来处理无关 ...