更改web.config位置 [英] changing web.config location

查看:79
本文介绍了更改web.config位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我的IIS网站c:\ mysite \ adam上具有以下目录结构. Adam被配置为应用程序",并在其中包含web.config文件.现在,我决定要删除adam应用程序,而是在mysite级别上创建一个应用程序".因此,我将web.config文件移到了mysite级别.执行此操作时,出现指示
的错误
BC30002:未定义类型``MyWebservice.MyWebservice''.

MyWebService在web.config文件中定义. < add key ="MyWebService.MyWebservice" value ="http://someservice/thisservice/thisservice.asmx">

将应用程序"从c:\ mysite \ adam移至c:\ mysite之后,我没有修改web.config文件.

任何人都可以帮助我,为什么我会收到此错误消息?

谢谢

==============================================

我不确定通过使用web.config移动网站的其余部分"是什么意思.我只是将web.config文件在层次结构中上移了一层,并声明该层为应用程序".

是的,我正在使用IIS 6.0

如何设置IIS在新位置中查找web.config? mysite属性框中的ASP.NET选项卡指示web.config现在位于c:\ mysite

顺便说一句:所有此站点都配置有常规/旧的ASP.只有一小部分是asp.net.

===============================================
MyWebservice的定义如下:

Hello,

I have the following directory structure on my IIS web site c:\mysite\adam. Adam was configured as an ''application'' and contained web.config file in it. Now I have decided that I want to remove the adam application and instead create an ''Application'' on the mysite level. Hence I moved the web.config file to mysite level. When I do this, I get errors indicating

BC30002: Type ''MyWebservice.MyWebservice'' is not defined.

MyWebService is defined in web.config file. <add key="MyWebService.MyWebservice" value="http://someservice/thisservice/thisservice.asmx">

I did not modify the web.config file after I moved the ''application'' from c:\mysite\adam to c:\mysite.

Can anyone help me with why I am getting this error message?

Thanks

================================================

I am not sure what you mean by moving ''the rest of your site with the web.config''. I just moved the web.config file one level up in the heirarchy and declared that level as the ''application'' .

Yes I am using IIS 6.0

How do I set IIS to look for web.config in the new location? ASP.NET tab in mysite properties box indicates that web.config now lived in c:\mysite

BTW: All this site is configured with conventional/old ASP. Only small portions are asp.net.

=================================================
MyWebservice is defined as following:

<appSettings>
  <add key="MyWebservice.MyWebservice" value="http://docmgmt/docwebservice/docwebservice.asmx" />
</appSettings>



感谢



Thanks

推荐答案

导致此错误的原因是,当迁移的应用程序具有现有的"Shared"文件夹时.如果尝试添加新页面以增强基于角色的安全功能,则可能会拒绝您访问共享"文件夹.实施此方法是为了避免当控件和引用这些控件的页面位于同一文件夹中时可能出现的循环依赖问题.

创建一个名为安全性"的新文件夹,然后将登录"和注销"网页移至该文件夹,然后再向其添加任何自定义.
Cause for this error occurs when a migrated application has an existing "Shared" folder. If you attempt to add new pages to enhance the role based security feature, you may be denied access to the Shared folder. This approach was implemented to avoid circular dependency problems that might arise when controls and pages referring to these controls are in the same folder.

Create a new folder called "Security" and move your Sign In and Sign Out web pages to this folder before adding any customizations to them.


替代方法是,它与asp有关.net工作进程在服务器上没有正确的访问权限.因此,它试图加载程序集而被拒绝.

MSDN参考 http://msdn.microsoft.com/en-us/library/aa302435.aspx [< ^ ]列表的表19.3工作进程帐户必须有权访问的所有文件夹中的一部分才能正常运行.并且不要忘记赋予它虚拟目录中所有文件和文件夹的权限!
Alternative is that it has something to do with the asp.net worker process not having the correct access rights on the server. So its trying to load an assembly and is being denied.

MSDN reference http://msdn.microsoft.com/en-us/library/aa302435.aspx[^] Table 19.3 for a list of all the folders the worker process account must have access to in order to function. And don''t forget to give it rights to all files and folders in your virtual directory!


这篇关于更改web.config位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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