日期:2014-05-17  浏览次数:20933 次

Server 对象 错误 ASP 0177 : 800401f3,Server.CreateObject 失败
点击右边红色标题查看本文完整版:Server 对象 错误 ASP 0177 : 800401f3,Server.CreateObject 失败

///C#项目的代码,编译前设置了:项目名称-> 点右键 "属性 "-> 配置属性-> 生成-> 将 "为Com Interop注册 "改为true

using System;

namespace Allinhands
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
public class Test
{

public string GetTestString()
{
return "This is My Test String. ";
}
}
}

///编译通过后,将.dll文件拷到asp文件所有目录,asp代码如下:
<%
set qq=server.CreateObject( "Allinhands.test ")
Response.write qq.GetTestString()
set qq=nothing
%>

'报以下错误:
Server 对象 错误 ASP 0177 : 800401f3?

Server.CreateObject 失败

/teset1.asp,行 2

800401f3

' ' ' ' ' ' ' ' ' ' ' '
请问该如何解决啊?

------解决方法--------------------
添加对该DLL的引用了吗?
------解决方法--------------------
http://www.tongyi.net/article/20011018/200110182440.shtml
自己看吧。
------解决方法--------------------
1、执行'开始->管理工具->组件服务',打开组件服务。

2、在控制台根目录下依次展开'组件服务->计算机->我的电脑->COM+应用程序'。

3、右键点'COM+应用程序',选择'新建->应用程序',再选择'创建空应用程序',输入名称boyd_ahbvc,一直点'下一步',直至完成。

4、展开应用程序'boyd_ahbvc->组件',右键点击选择'新建->组件',选择'安装新组件',找到组件程序boyd_ahbvc.dll,OK。

5、在应用程序'boyd_ahbvc'上右键点击选'属性',转至'安全'选项卡,去掉'对此应用程序强制进行访问权限检查'前面的勾。