它是使用注册为allowDefinition =应用程序级别之外'MachineToApplication'的节是错误的。 [英] It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.
问题描述
错误我得到的是
它是使用注册为allowDefinition =应用程序级别之外'MachineToApplication'的节是错误的。这个错误可以通过未被配置为在IIS中应用程序的虚拟目录引起的。 C:\\ Users \\用户Jangid \\下载\\ TestWebSite1 \\ TestWebSite1 \\备份\\ TestWebSite1 \\ 26的Web.config
我主持在使用ASP.Net 2.0服务器的网站,我在根文件夹中的Admin文件夹一个web.config也是一个,但管理员文件夹不是一个虚拟目录,我不希望创建
<身份验证模式=表格>
<形式loginUrl =管理/的Login.aspxNAME =。ASPXFORMSAUTH/>
< /认证>
<授权>
<让角色=管理员/>
<拒绝用户=*/>
<拒绝用户= /&gt的帮助?
< /授权>
但对于认证和登录工作Admin文件夹,我已经使用ASP.Net登录控制,但这个错误preventing我formward移动。
和还请任何一个可以给我一个链接,学习ASP.Net登录控制,如谁访问Admin文件夹应该与角色作为管理员进行身份验证的用户,
如何创建一个角色,并分配给用户在服务器上
<&的System.Web GT;
<身份验证模式=表格>
<形式的名称=cokiename
loginUrl =./ protectedFolder / login.aspx的
保护=全部
超时=60
defaultUrl =./ protectedFolder / protectedPafe.aspx/>
< /认证>
< /system.web>
这应该是你的主要的web.config文件
随着进入你的子目录配置
<的customErrors模式=关/>
<授权>
<拒绝用户=? />
< /授权>< /system.web>
< /结构>
保护文件夹包含登录页面,保护页面,并在web.config
Error i got is
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:\Users\Jangid\Downloads\TestWebSite1\TestWebSite1\Backup\TestWebSite1\Web.config 26
I have hosted a website in a server using ASP.Net 2.0, i have a web.config in the root folder and also one in the Admin folder, but the admin folder is not a virtual directory and i dont want to create.
<authentication mode="Forms">
<forms loginUrl="Admin/Login.aspx" name=".ASPXFORMSAUTH"/>
</authentication>
<authorization>
<allow roles="Admins"/>
<deny users="*"/>
<deny users="?"/>
</authorization>
But for authentication and login work for Admin folder, i have used ASP.Net Login Control, but this error preventing me to move formward.
And also please can any one give me a link for learning ASP.Net Login Control, Like user who visit Admin folder should be authenticated with a Role as admin, How can i create a Role and assign to user on a server
<system.web>
<authentication mode="Forms">
<forms name="cokiename"
loginUrl="./protectedFolder/login.aspx"
protection="All"
timeout="60"
defaultUrl="./protectedFolder/protectedPafe.aspx"/>
</authentication>
</system.web>
This should be in your main web.config file
Following goes into your sub directory config
<customErrors mode="Off"/>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
protected folder contains the login page, protected pages and the web.config
这篇关于它是使用注册为allowDefinition =应用程序级别之外'MachineToApplication'的节是错误的。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!