RTX登录其他系统
前台:
<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>
<!-- 签 名-->
</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登录其他系统的更多相关文章
- 【Linux_Fedora_系统管理系列】_1_用户登录和系统初始配置
发现一个问题,在FC14 的Firefox浏览器中,编辑和排版好的博文,在windows下用chrome或者猎豹浏览器打开后,排版就变得阅读 不是很容易里,而且经常不经意的断行.不知道园子的管理人员时 ...
- 通过url链接登录其他系统
目的:A系统通过链接跳转到其它系统(如B系统)并登录 技术方案 1.A系统用户登录B系统方案 1.A系统用户账号已经和B系统账号绑定,直接模拟登录 2.A系统用户账号未和B系统账号绑定 ...
- 使用密钥验证方式登录linux系统
1.使用PuTTY工具PuTTYgen生成密钥对,打开PuTTYgen,点击Generate生成公钥(生成过程动动鼠标会提升进度哦). 2.将公钥(蓝色的是私钥)放到服务器上去: -在/root目录下 ...
- 浏览器登录EBS系统遇到问题总结
1.可以登录EBS系统,但是职责位置为空白 这是兼容性视图问题,将ERP域名加入兼容性视图列表即可. 加入即可: 2.可以登录EBS系统,但是职责位置显示 “undefined” 这也是兼容性视图问题 ...
- 洗礼灵魂,修炼python(81)--全栈项目实战篇(9)—— 购物商城登录验证系统
都在线购物过吧?那么你应该体验过,当没有登录账户时,点开购物车,个人中心,收藏物品等的操作时,都会直接跳转到登录账户的界面,然后如果登录一次后就不用再登录,直到用户登出. 是的,本次项目就是做一个登录 ...
- java jsch 登录linux系统避免手动输入Yes 或Always
java jsch方法 登录linux系统, 要手动输入Yes No Always The host 10.202.84.7 is currently unknown to the system Th ...
- 在ASP.NET MVC3 中利用JSONP跨域登录WEB系统
在信息系统开发的时,根据相关业务逻辑难免会多系统之间互相登录.一般情况下我们需要在多系统之间使用多个用户名和密码.这样客户就需要在多个系统之间重复登陆.每次登录都需要输入用户名和密码.最近比较流行的就 ...
- 远程登录Linux系统(使用xshell),远程上传加载文件(使用Xftp)
一.Xshell(远程登录Linux系统) 1.安装xshell 自己百度找安装包 2.连接登录 1.连接前提 需要Linux开启一个sshd的服务,监听22号端口,一般默认是开启的 查看是否开启: ...
- 远程登录Linux系统及上传下载文件
目录 1. 远程登录Linux系统 1.1 为什么要远程登录 1.2 Xshell6安装 1.3 连接登录 1.3.1 连接前提 1.3.2 Xshell连接配置 2. 远程上传下载文件 2.1 Xf ...
随机推荐
- jQuery插件开发详细教程
这篇文章主要介绍了jQuery插件开发详细教程,将概述jQuery插件开发的基本知识,最佳做法和常见的陷阱,需要的朋友可以参考下 扩展jQuery插件和方法的作用是非常强大的,它可以节省大量开发时间. ...
- Bzoj2705 Longge的问题
Time Limit: 3000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu Description Longge的数学 ...
- IOC 构造函数注入vs属性注入
1.不管是构造函数注入还是属性注入,都要先把对象给new 出来,构造函数应该也是public.2.一般使用 配置文件,属性注入,不用使用特性,直接配置,初始化或依赖,凡是注入的,都要有访问权限,pub ...
- html5+ 获取当前设备的加速度信息
getCurrentAcceleration 获取当前设备的加速度信息 void plus.accelerometer.getCurrentAcceleration( successCB, error ...
- error MSB4019: 未找到导入的项目“C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets”
error MSB4019: 未找到导入的项目“C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\ ...
- Java操作xml文件
Bbsxml.java public class Bbsxml { private String imgsrc; private String title; private String url; p ...
- 文件系统:drbd主备服务器文件同步
一. DRBD介绍 DRBD是一种块设备,可以被用于高可用(HA)之中.它类似于一个网络RAID-1功能.当你将数据写入本地 文件系统时,数据还将会被发送到网络中另一台主机上.以相同的形式记录在一个文 ...
- Cannot find class [org.apache.commons.dbcp.BasicDataSource]
错误:Cannot find class [org.apache.commons.dbcp.BasicDataSource] 原因:缺少commons-dbcp.jar
- 一个简单的web服务器
写在前面 新的一年了,新的开始,打算重新看一遍asp.net本质论这本书,再重新认识一下,查漏补缺,认认真真的过一遍. 一个简单的web服务器 首先需要引入命名空间: System.Net,关于网络编 ...
- 我的css释疑-float line-height inline-block vertical-align
markdown的图片和链接格式相类似: [链接文字/图片的alt text] (链接地址/ 图片的地址), 只是图片要在前面加上感叹号! 当内容中含有图片的时候,如果图片的高度大于行高,则含有图片 ...