如何制作所有网站都可以使用的DLL(如旧的COM对象)? [英] How do I make a DLL that all web sites can use (like an old COM object)?

查看:56
本文介绍了如何制作所有网站都可以使用的DLL(如旧的COM对象)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


在经典ASP中,你可以用VC ++,VB等编写一个DLL并在某个地方(任何地方)将它注册到
其实)。一旦注册,任何网站上的任何ASP都可以通过这样做来使用它......


设置objMyObj = Server.CreateObject(" MyDLL.MyClass" )


我如何在ASP.NET中做类似的事情?


我有一个电子商务包,目前用Classic编写ASP

和VB6。我正在寻找在ASP.NET中重写它。当前软件包的一个强大的功能是,所有相关代码都是在所有网站都使用的单个DLL中。如果我修复了任何错误或改进了

,我只需要更新一个DLL,所有网站立即看到

的好处。


据我所知,ASP.NET只在/ bin目录中查找DLL。

这是否意味着我必须在/ bin目录中有一个DLL的副本br />
每个使用该软件包的网站?这听起来非常低效。我是

确定有更好的方法可以做到这一点。


TIA提供任何帮助。


-

Alan Silver

(此行下面添加的任何东西都与我无关)

Hello,

In Classic ASP, you could whip up a DLL in VC++, VB, etc and register it
on the server somewhere (anywhere actually). Once registered, any ASP in
any web site could use it by doing ...

Set objMyObj = Server.CreateObject("MyDLL.MyClass")

How do I do a similar thing in ASP.NET?

I have an e-commerce package that is currently written in Classic ASP
and VB6. I am looking at rewriting it in ASP.NET. One of the strong
features of the current package is that all of the relevant code is
housed in a single DLL which all sites use. If I fix any bugs or make
improvements, I only need to update the one DLL and all sites see the
benefit immediately.

As far as I can see, ASP.NET only looks in the /bin directory for DLLs.
Does that mean I have to have a copy of the DLL in the /bin directory of
every web site that uses the package? That sounds very inefficient. I''m
sure there''s a much better way to do this.

TIA for any help.

--
Alan Silver
(anything added below this line is nothing to do with me)

推荐答案

您可以将全局程序集缓存用作程序集的全局存储库。

http://www.codeproject.com/dotnet/demystifygac.asp


bill

" Alan Silver" <人********* @ nospam.thanx>在消息中写道

新闻:J9 ************** @ nospamthankyou.spam ...
You can use the Global Assembly Cache as a global repository of Assemblies.

http://www.codeproject.com/dotnet/demystifygac.asp

bill

"Alan Silver" <al*********@nospam.thanx> wrote in message
news:J9**************@nospamthankyou.spam...
你好,
<在经典ASP中,你可以用VC ++,VB等编写一个DLL,然后在某个地方(实际上是任何地方)将它注册到服务器上。一旦注册,任何网站上的任何ASP都可以通过这样做来使用它......

设置objMyObj = Server.CreateObject(" MyDLL.MyClass")

>我如何在ASP.NET中做类似的事情?

我有一个电子商务包,目前用经典ASP
和VB6编写。我正在寻找在ASP.NET中重写它。当前软件包的一个强大功能是所有相关代码都安装在一个DLL中,所有站点都使用它。如果我修复了任何错误或进行了改进,我只需要更新一个DLL,所有站点都会立即看到
的好处。

据我所知,ASP。 NET只在/ bin目录中查找DLL。
这是否意味着我必须在每个使用该软件包的网站的/ bin目录中都有DLL的副本?这听起来非常低效。我确定有更好的方法来做到这一点。

TIA提供任何帮助。

-
Alan Silver
(此行下面添加的任何内容与我无关)
Hello,

In Classic ASP, you could whip up a DLL in VC++, VB, etc and register it
on the server somewhere (anywhere actually). Once registered, any ASP in
any web site could use it by doing ...

Set objMyObj = Server.CreateObject("MyDLL.MyClass")

How do I do a similar thing in ASP.NET?

I have an e-commerce package that is currently written in Classic ASP
and VB6. I am looking at rewriting it in ASP.NET. One of the strong
features of the current package is that all of the relevant code is
housed in a single DLL which all sites use. If I fix any bugs or make
improvements, I only need to update the one DLL and all sites see the
benefit immediately.

As far as I can see, ASP.NET only looks in the /bin directory for DLLs.
Does that mean I have to have a copy of the DLL in the /bin directory of
every web site that uses the package? That sounds very inefficient. I''m
sure there''s a much better way to do this.

TIA for any help.

--
Alan Silver
(anything added below this line is nothing to do with me)



>您可以将全局程序集缓存用作程序集的全局存储库。
>You can use the Global Assembly Cache as a global repository of Assemblies.

http:// www .codeproject.com / dotnet / demystifygac.asp

感谢您的链接,看起来非常有趣。我还没有完全看完

,但略读前几段给人的印象是

这是不支持的斗篷和匕首。是对的吗?如果可能的话,我希望

坚持记录和支持的做法。


任何评论?

bill
< br>Alan Silver <人********* @ nospam.thanx>在消息中写道
新闻:J9 ************** @ nospamthankyou.spam ...

http://www.codeproject.com/dotnet/demystifygac.asp
Thanks for the link, looks very interesting. I haven''t read it fully
yet, but skimming the first few paragraphs gives the impression that
this is unsupported cloak and dagger stuff. Is that right? I would like
to stick to documented and supported practices if possible.

Any comments?
bill

"Alan Silver" <al*********@nospam.thanx> wrote in message
news:J9**************@nospamthankyou.spam...
你好,

在经典的ASP,你可以在VC ++,VB等中创建一个DLL,并在服务器的某个地方(实际上是任何地方)注册它。一旦注册,任何网站上的任何ASP都可以通过这样做来使用它......

设置objMyObj = Server.CreateObject(" MyDLL.MyClass")

>我如何在ASP.NET中做类似的事情?

我有一个电子商务包,目前用经典ASP
和VB6编写。我正在寻找在ASP.NET中重写它。当前软件包的一个强大功能是所有相关代码都安装在一个DLL中,所有站点都使用它。如果我修复了任何错误或进行了改进,我只需要更新一个DLL,所有站点都会立即看到
的好处。

据我所知,ASP。 NET只在/ bin目录中查找DLL。
这是否意味着我必须在每个使用该软件包的网站的/ bin目录中都有DLL的副本?这听起来非常低效。我确定有更好的方法来做到这一点。

TIA提供任何帮助。

-
Alan Silver
(此行以下添加的任何内容与我无关)
Hello,

In Classic ASP, you could whip up a DLL in VC++, VB, etc and register it
on the server somewhere (anywhere actually). Once registered, any ASP in
any web site could use it by doing ...

Set objMyObj = Server.CreateObject("MyDLL.MyClass")

How do I do a similar thing in ASP.NET?

I have an e-commerce package that is currently written in Classic ASP
and VB6. I am looking at rewriting it in ASP.NET. One of the strong
features of the current package is that all of the relevant code is
housed in a single DLL which all sites use. If I fix any bugs or make
improvements, I only need to update the one DLL and all sites see the
benefit immediately.

As far as I can see, ASP.NET only looks in the /bin directory for DLLs.
Does that mean I have to have a copy of the DLL in the /bin directory of
every web site that uses the package? That sounds very inefficient. I''m
sure there''s a much better way to do this.

TIA for any help.

--
Alan Silver
(anything added below this line is nothing to do with me)





-

Alan Silver

(此行下面添加的任何内容都与我无关)



--
Alan Silver
(anything added below this line is nothing to do with me)


我相信GAC受到支持且记录良好。 /> http://support.microsoft。 com / default ... b; en-us; 315682


-Bill


" Alan Silver" <人********* @ nospam.thanx>在消息中写道

news:s6 ************** @ nospamthankyou.spam ...
I believe the GAC is supported and well documented.
http://support.microsoft.com/default...b;en-us;315682

-Bill

"Alan Silver" <al*********@nospam.thanx> wrote in message
news:s6**************@nospamthankyou.spam...
您可以将全局程序集缓存用作
程序集的全局存储库。
http://www.codeproject.com/dotnet/demystifygac.asp
You can use the Global Assembly Cache as a global repository of Assemblies.
http://www.codeproject.com/dotnet/demystifygac.asp



感谢您的链接,看起来非常有趣。我还没有完全读完它,但是略读前几段给人的印象是
这是不受支持的斗篷和匕首。是对的吗?如果可能的话,我希望坚持记录和支持的做法。

任何评论?



Thanks for the link, looks very interesting. I haven''t read it fully
yet, but skimming the first few paragraphs gives the impression that
this is unsupported cloak and dagger stuff. Is that right? I would like
to stick to documented and supported practices if possible.

Any comments?

bill

" ; Alan Silver <人********* @ nospam.thanx>在消息中写道
新闻:J9 ************** @ nospamthankyou.spam ...
bill

"Alan Silver" <al*********@nospam.thanx> wrote in message
news:J9**************@nospamthankyou.spam...
你好,

在经典的ASP,你可以在VC ++,VB等中创建一个DLL,然后在某个地方(实际上是任何地方)在服务器上注册
。一旦注册,任何网站上的任何ASP
都可以通过这样做来使用它......

设置objMyObj = Server.CreateObject(" MyDLL.MyClass")

>我如何在ASP.NET中做类似的事情?

我有一个电子商务包,目前用经典ASP
和VB6编写。我正在寻找在ASP.NET中重写它。当前软件包的一个强大功能是所有相关代码都安装在一个DLL中,所有站点都使用它。如果我修复了任何错误或进行了改进,我只需要更新一个DLL,所有站点都会立即看到
的好处。

据我所知,ASP。 NET只在/ bin目录中查找DLL。
这是否意味着我必须在使用该软件包的每个网站的/ bin目录
中拥有该DLL的副本?这听起来非常低效。我确定有更好的方法来做到这一点。

TIA提供任何帮助。

-
Alan Silver
(此行下面添加的任何东西都与我无关)
Hello,

In Classic ASP, you could whip up a DLL in VC++, VB, etc and register it on the server somewhere (anywhere actually). Once registered, any ASP in any web site could use it by doing ...

Set objMyObj = Server.CreateObject("MyDLL.MyClass")

How do I do a similar thing in ASP.NET?

I have an e-commerce package that is currently written in Classic ASP
and VB6. I am looking at rewriting it in ASP.NET. One of the strong
features of the current package is that all of the relevant code is
housed in a single DLL which all sites use. If I fix any bugs or make
improvements, I only need to update the one DLL and all sites see the
benefit immediately.

As far as I can see, ASP.NET only looks in the /bin directory for DLLs.
Does that mean I have to have a copy of the DLL in the /bin directory of every web site that uses the package? That sounds very inefficient. I''m
sure there''s a much better way to do this.

TIA for any help.

--
Alan Silver
(anything added below this line is nothing to do with me)




-
Alan Silver
(任何东西)在这行下面添加与我无关)



--
Alan Silver
(anything added below this line is nothing to do with me)



这篇关于如何制作所有网站都可以使用的DLL(如旧的COM对象)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆