如何解决.net C#中的此错误 [英] How to Resolve this Error in .net C#

查看:57
本文介绍了如何解决.net C#中的此错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的所有专家,


错误104使用超出应用程序级别注册为allowDefinition ="MachineToApplication''的节是错误的.此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的. C:\ Documents and Settings \ Administrator \ My Documents \ Samplesfw \ Configuration \ ConfigASPNET \ Backup \ ConfigASPNET \ Web.Config 40
感谢valurabel Replay

Dear all Experts,


Error 104 It is an error to use a section registered as allowDefinition=''MachineToApplication'' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\Documents and Settings\Administrator\My Documents\Samplesfw\Configuration\ConfigASPNET\Backup\ConfigASPNET\Web.Config 40
Thanks for valurabel Replay

推荐答案

,如果您有iis7,请阅读::

http://support.gearhost.com/KB/a460/add-virtual-directory-as-application-in-iis-7.aspx [
if you have iis7 read this :

http://support.gearhost.com/KB/a460/add-virtual-directory-as-application-in-iis-7.aspx[^]


right click on your virtual directory in IIS7 and select convert to application

to run iis config tool type inetmgr.exe in run.


这可能是由于IIS上的网站具有不同继承层次上的web.config文件.如果是这样,则目录级Web.Config文件中不得定义身份验证,授权,成员资格,角色.它们必须放在应用程序级别.
This may be caused because the website on IIS is having web.config files at different heirarch levels. If it is so, the directory level Web.Config files must not have authentication, authorization,membership,roles defined in them. they must be placed at app level.


要解决此问题:

您需要确保将网站运行所在的目录配置为IIS中的应用程序.为此,您需要进入IIS并在服务器上找到您的项目文件夹,右键单击属性".在应用程序设置"下,单击创建".

并在web.config中将身份验证模式更改为无"(如果您的应用程序在不在本地计算机上的网络服务器上运行).

像这样:
For fixing this:

You need to make sure that the directory from where you website is running is configured as an application in IIS. To do this, you need to go into IIS and find your project folder on the server, right click to Properties. Under Application Settings click Create.

and Change authentication mode to ''None'' in web.config(if your application is running at a webserver not on local computer).

like this:
< authentication mode="None" />


希望对您有所帮助:)


hope it helps :)


这篇关于如何解决.net C#中的此错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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