添加.NET code到传统的ASP网站,不能引用.dll文件的命名空间 [英] adding .net code to a classic asp website, can't reference namespaces in .dll file

查看:126
本文介绍了添加.NET code到传统的ASP网站,不能引用.dll文件的命名空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已有一个相当大的传统的ASP网站,虚拟目录中配置集中一定的资源。我的问题是由于某种原因,我无法访问我的任何命名空间和类。我尝试添加一个引用到另一项目中,我有一个命名空间DAL类,即使智能感知看到的类和网站编译好,它错误,当我尝试访问,在DAL命名空间引用类的任何页面。

I have an existing fairly large classic asp website, with virtual directories configured to centralize certain resources. My problem is for some reason I can't access any of my namespaces and classes. I tried adding a reference to another project where I have classes in a namespace "DAL" and even though intellisense sees the classes and the website compiles fine, it errors when I try to access any page that references a class in the "DAL" namespace.

我在浏览器中得到以下错误消息CS0103:'CMS'这个名字并不在目前的情况下存在。问题的部分原因是网站项目的根是不一样的文件夹/水平在IIS Web根目录。所以,我的图书馆都在网站根/ bin文件夹,但IIS正在寻找在IIS Web根目录是在一个较低的水平这些文件。那么,如何可以获取.NET看到我的二进制文件,而不把它们在较低的IIS网站的根目录?我尝试了虚拟目录设置到我的.​​dll文件,但它似乎没有任何效果。

I get the following error message in my browser "CS0103: The name 'CMS' does not exist in the current context". Part of the problem is website project's root is not the same folder/level as the web root in IIS. So my libraries are in the website root "/bin" folder, but iis is looking for these files in the IIS webroot which is at a lower level. So how can I get .net to see my binaries without putting them in the lower IIS website root directory? I tried setting up a virtual directory to my .dll file but it seems to have no effect.

感谢您的帮助!


======================澄清====================




我正在试图做的是保持.dll文件我想我的网站在一个更高的层次目录,然后我设置为在IIS Web根文件夹使用。所以说,我要在项目/ bin文件夹中使用它DAL它的库,但在IIS中的默认网站的本地路径设置为/网站/默认。我似乎可以用DAL库的唯一方法是通过将/ bin文件夹到/网站/默认/箱,这对于这个项目是不是一种选择。这是否帮助?

thank you for your help!

======================CLARIFICATION====================



What I'm trying to do is keep the .dll files I want my website to use in a higher level directory then the folder I have set as the web root in IIS. So say the library i want to use it "DAL" it in the projects /bin folder, but under IIS the default site's Local Path is set to "/site/default". The only way I can seem to use the "DAL" library is by putting the /bin folder into "/site/default/bin", which for this project is not an option. Does this help?

推荐答案

答给出:
<一href=\"http://stackoverflow.com/questions/376006/aspnet-website-external-bin-folder\">http://stackoverflow.com/questions/376006/aspnet-website-external-bin-folder

这篇关于添加.NET code到传统的ASP网站,不能引用.dll文件的命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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