无法在实时网站上添加参考 [英] Can't add reference on live website

查看:55
本文介绍了无法在实时网站上添加参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我的计算机上有本地IIS,并且有一个使用外部类库的网站项目.
在我的本地IIS上,我在Visual Studio中将引用添加到.dll文件,它的工作原理非常完美.
问题始于主机网站.我将.dll添加到ftp的根文件夹中(所有网站的文件都位于该文件夹中,我没有bin文件夹),但是当我尝试添加对网站的引用时,它给了我们一个错误,那就是它可以不会添加到网站中.
还有另一种参考方法吗?
提前谢谢!

[从解决方案部分移至]
我尝试将其从本地计算机浏览到服务器,因为当我尝试添加引用并浏览到.dll文件时,我只能从本地计算机进行浏览,所以这是我得到的错误:
收合|复制代码无法添加对``C:\ Program Files \ GemBox Software \ GemBox.Spreadsheet Free 3.5 \ Bin \ NET40 \ GemBox.Spreadsheet.dll''的引用.
无法将"C:\ Users \ Ori \ AppData \ Local \ Temp \ iigj2lfq.hpb \ Web.config"添加到网站. Web.config:访问被拒绝(550).

Hey all,
I have local IIS on my computer and I have a website project that uses external class library.
On my local IIS, I add reference in the visual studio to the .dll file and it''s works perfect.
The problem begin in the host website. I add the .dll to the root folder in the ftp (where all the website''s files are located, I have no bin folder), but when I tried to add reference to the website it gave we an error that it can''t be added to the website.
There is another way to do a reference?
Thank ahead!

[Moved from solution section]
I try to browse it from my local machine to the server because when I try to add reference and to browse to the .dll file I can browse only from my local machine, so this is the error that I get:
Collapse | Copy CodeA reference to ''C:\Program Files\GemBox Software\GemBox.Spreadsheet Free 3.5\Bin\NET40\GemBox.Spreadsheet.dll'' could not be added.
unable to add ''C:\Users\Ori\AppData\Local\Temp\iigj2lfq.hpb\Web.config'' to the Web site. Web.config: Access is denied (550).

推荐答案

您控制此FTP位置吗?如果是这样,则创建一个bin文件夹并根据需要添加部件.否则,程序集必须位于GAC中,但是如果这是一个托管提供程序,则他们可能不必将其添加.
Do you control this FTP location? If so, then create a bin folder and add the assembly as required. Otherwise, the assembly needs to be in the GAC but if this is a hosting provider they will must likely not add it.


是的,我控制此ftp位置.
但是我在FTP中没有"bin"文件夹.我应该在网站所有文件所在的位置创建它吗?然后将.dll文件复制到bin文件夹中,它应该可以工作吗?
Yes, I control this ftp location.
But I have''nt bin folder in the FTP. I should create it where all the website''s files are located? And then just copy the .dll file to the bin folder and it should work?


好,我解决了!
我刚刚创建了bin文件夹,将.dll文件复制到bin文件夹并将其添加到web.config文件中:
OK I solved it!
I just created the bin folder, copy the .dll file to the bin folder and add this to the web.config file:
<compilation targetframework="4.0" defaultlanguage="C#">
      <assemblies>
        <add assembly="GemBox.Spreadsheet, Version=35.1.40.1025, Culture=neutral, PublicKeyToken=B1B72C69714D4847" />
      </assemblies>
    </compilation>


谢谢大家:)


Thank you all :)


这篇关于无法在实时网站上添加参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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