回复 18楼iceman的帖子
方法一: DOS命令 失败
VS2010 命令提示DOS窗口输入: 如图1
caspol -polchgprompt off -q -user -addgroup 1. -url http://localhost:3161/index.aspx/* FullTrust -n "TX Text Control .NET Server" -description "Security settings for TX Text Control .NET Server"
================================================================================================================
方法二:执行JS 失败
点step5,进入“http://localhost:3161/step5.aspx” 页面
下载JS 后,把对应的js 方法copy 到step5的前台页面代码中
下面是对应的js方法:
<script type="text/javascript" language="javascript">
var Name = "TX Text Control .NET Server";
var Publisher = "The Imaging Source Europe GmbH"
var Description = "Security settings for TX Text Control .NET Server";
var Permission = "FullTrust";
var Url = "http://localhost:3161/*";
SetSecurity(Name, Url, Permission, Publisher, Description);
alert(Name);
function SetSecurity(m_name, m_membershipUrl, m_permission, m_publisher, m_description) {
try {
var wshShell = new ActiveXObject("WScript.Shell");
alert(111);
var DNInstallPath = wshShell.RegRead("HKLM\\SOFTWARE\\Microsoft\\.NETFramework\\InstallRoot");
var FileSystem = WScript.CreateObject("Scripting.FileSystemObject");
openFolder = FileSystem.GetFolder(DNInstallPath)
allFolders = new Enumerator(openFolder.SubFolders);
alert(222);
for (; !allFolders.atEnd(); allFolders.moveNext()) {
curFolder = allFolders.item();
switch (curFolder.Name.substring(0, 5)) {
case "v2.0.":
case "v1.1.":
case "v1.0.":
openFolder = curFolder;
break;
}
}
CasPolArguments = "-polchgprompt off -q -machine -addgroup 1. -url "
+ m_membershipUrl + " " + m_permission + " -n \"" + m_name + "\" -description \"" + m_description + "\"";
wshShell.Run(openFolder.Path + "\\caspol " + CasPolArguments, 0);
wshShell.Popup("The .NET security settings have been adjusted. Please restart the Internet Explorer", 0, ".NET Security Settings");
}
catch (exc) {
alert("Unfortunately, the security settings could not be adjusted. Please enable ActiveX controls to run this script.\n" + exc.message);
}
}
</script>
刷新 step5 页面,JS 报错 如图2, 提示IE Activex 设置为启用状态,于是我都设置为启用状态 如图3
======================================
方法一,二 都失败了,请问 我怎么才能把这个activex控件显示出来? 急
|
-
-
1.jpg
67.81 KB, 下载次数: 489
dos界面 提示
-
-
2.jpg
120.41 KB, 下载次数: 513
JS 报错
-
-
3.jpg
81.98 KB, 下载次数: 524
activex 设置所有节点为”启用“
|