相关疑难解决方法(0)

错误:allowDefinition ='MachineToApplication'超出应用程序级别

我已经在ASP.Net中下载了在线项目.在运行应用程序时,我收到错误

在应用程序级别之外使用注册为allowDefinition ='MachineToApplication'的部分是错误的.此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的.

我应该在web.config或其他地方进行哪些更改才能使其工作?

asp.net visual-studio-2012

193
推荐指数
12
解决办法
32万
查看次数

MVC3切换视图编译后出现奇怪错误

我目前正在与Razor合作开发一个MVC3项目.我已经编译了视图,以便在编译时了解拼写错误等.

一旦我在项目配置文件中打开<MvcBuildViews> true </ MvcBuildViews>,就会在编译期间收到以下错误:

错误1使用在应用程序级别之外注册为allowDefinition ='MachineToApplication'的部分是错误的.此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的.

我阅读了几个可能的问题解决方案,主要涉及IIS和虚拟目录或应用程序.问题是,我不使用IIS,而是使用默认的Visual Studio开发服务器.

我该怎么做才能解决这个问题?

iis-7 visual-studio-2010 asp.net-mvc-3

11
推荐指数
2
解决办法
3112
查看次数

web.config allowDefinition = MachineToApplication错误

在根目录下,我有以下结构

..
..
..
web.config
Report Folder
- Login.aspx
- Web.config
  |
  |-> ViewReport
       |       
       |-> Report.aspx
Run Code Online (Sandbox Code Playgroud)

在我的报告文件夹中的web.config文件中,我有以下内容:

    <?xml version="1.0"?>
    <configuration>
        <system.web>
            <authentication mode="Forms">
                <forms loginUrl="Login.aspx" defaultUrl="ViewReport/Report.aspx">
                    <credentials passwordFormat="Clear">
                        <user name="Johl" password="pass888"/>
                    </credentials>
                </forms>
             </authentication>
         </system.web>

        <location path="ViewReport/Report.aspx">
            <system.web>
                <authorization>
                    <allow users="Johl"/>
                    <deny users="*"/>
                </authorization>
            </system.web>
         </location>
     </configuration>
Run Code Online (Sandbox Code Playgroud)

当我开始调试时,我收到以下消息:

在应用程序级别之外使用注册为allowDefinition ='MachineToApplication'的部分是错误的.此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的.

请注意,在我的根web.config中,我有以下内容:

在我的根目录中,我已经拥有以下内容:

         <system.web>        
            <authentication mode="Forms">
                <forms loginUrl="Str/StrUserLogin.aspx" timeout="2880" slidingExpiration="true"  />         
               </authentication>
            <authorization>
                <allow users="*" />
            </authorization>     
         </system.web>
Run Code Online (Sandbox Code Playgroud)

asp.net web-config

7
推荐指数
2
解决办法
8万
查看次数

ASP.Net - 在应用程序级别之外使用注册为 allowDefinition='MachineToApplication' 的部分是错误的

在我们在开发环境中运行的 Intranet 应用程序上出现此错误,我不确定去哪里/寻找解决方案。该应用程序过去运行良好,但是它与另一个开发人员团队在共享服务器上运行,我们无法跟踪错误(我的团队没有对应用程序进行更新,它突然停止工作)。

我们运行的是 Windows Server 2003 和 IIS 6.0。但是,如果我在我的机器上打开解决方案,我会在 Visual Studio 解决方案中收到一个错误,指向 web.config 中的这一行,但是我相信这是一个相对标准的设置,我们实际上在另一个环境中运行了它(同一服务器) /IIS 设置)

<authentication mode="Windows" />
Run Code Online (Sandbox Code Playgroud)

错误读取

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.
Run Code Online (Sandbox Code Playgroud)

我还将<system.web>服务器上的 web.config 部分更改为 include <customErrors mode="Off"/>,但奇怪的是,当我导航到该站点时,我仍然收到自定义错误页面...

我对 IIS 比较陌生,从未使用过 Windows Server 2003。有人可以帮助我指出正确的方向,以获取实际错误以便在浏览器中显示,或者如何修复 Visual Studio 给我的错误?

asp.net iis iis-6 windows-server-2003

5
推荐指数
1
解决办法
5万
查看次数

node_modules在Visual Studio中中断构建

努力将Angular(v4)添加到现有的ASP.NET MVC 4应用程序中.其中一个项目包括Selenium Web Driver,其中包含一个web.config文件.

node_modules\selenium-webdriver\lib\test\data\web.config
Run Code Online (Sandbox Code Playgroud)

此文件夹不包含在项目中,但位于我的Web应用程序文件夹中

myapplication\node_modules
myapplication\Controllers
myapplication\Views
myapplication\web.config
etc...
Run Code Online (Sandbox Code Playgroud)

selenium-webdriver文件夹中的web.config导致构建中断,并出现以下错误:

使用注册为的部分是错误的

allowDefinition ='MachineToApplication'超出应用程序级别.此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的.

非常常见的错误,当它是你自己的错误时很容易修复,但由于这是一个我正在使用的库,我无法控制文件.基于我的研究,我的问题有点扁平化:

  • 我可以让selenium-webdriver的"test"文件夹转到其他地方吗?
  • 我的node_modules文件夹应该不在我的Web应用程序的根目录下吗?
  • 一般来说..我该如何解决这个问题?

npm asp.net-mvc-4 angularjs node-modules selenium-webdriver

5
推荐指数
1
解决办法
814
查看次数