下面这样提示如何解决

yhd0411 2006-12-12 04:23:03
msxml4.dll 错误 'c00ce23b'

WINHTTP5.DLL or higher must be registered to use the ServerXMLHTTP object.

/index.asp,行 44

44行代码是:http.open("GET",url,false);


index.asp代码如下:


<%@ Language=JScript %>
<%
// Sample ASP code that uses CAS
// By Howard Gilbert

// If you logon, it says "Hello " followed by your userid
// For the Web server to talk to the CAS server, this code depends on the
// Microsoft ServerXMLHTTP control provided with MSXML. If the MS XML
// parser is not already installed on the IIS host machine,
// download version 3.0 SP1 or better from http://www.microsoft.com/xml

// Insert name of CAS Server at your location
var CAS_Server = "https://140.1.2.15:8443/cas/";

// Insert public name of IIS Server hosting this script
// Note: Request.ServerVariables("SERVER_NAME") or anything based on
// the HTTP "Host" header should NOT be used; this header is supplied by
// the client and isn't trusted. (--SB)
var MyServer = "http://140.1.2.3/";

greeting = "World"; // In case I fail

// See if already logged on
var uid = Session.Contents("Netid");
if (!uid){

// Check for ticket returned by CAS redirect
var ticket = Request.QueryString.Item("ticket").Item;
if (!ticket) {

// No session, no ticket, Redirect to CAS Logon page
var url = CAS_Server+"login?"+
"service="+MyServer+"index.asp"
Response.Redirect(url);
Response.End;

} else {

// Back from CAS, validate ticket and get userid
var http = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0");
var url =CAS_Server+"validate?ticket="+ticket+"&"+
"service="+MyServer+"HelloCas/default.asp";

http.open("GET",url,false); // 这里是44行,HTTP transaction to CAS server
Response.End;
http.send();

var resp=http.responseText.split('\n'); // Lines become array members
if (resp[0]=="yes") // Logon successful
greeting=resp[1]; // get userid for message
Session.Contents("Netid")=resp[1]; // Save for subsequent calls
}
}
%>
<HTML>
<HEAD><title>CAS ASP Example application</title></HEAD>
<BODY>
<P>欢迎进入办公自动化 <%=greeting%></P>
</BODY>
</HTML>
...全文
189 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yhd0411 2006-12-12
  • 打赏
  • 举报
回复
指WINHTTP5.DLL吗,网上好像有很多人碰到这样的情况,郁闷 啊
chenguang79 2006-12-12
  • 打赏
  • 举报
回复
应该是相应的.dll组件没有注册吧

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧