在发布的网站中自动创建APP

在发布的网站中自动创建APP

本文介绍了在发布的网站中自动创建APP_ code文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC4应用程序在VS 2010中有一把umbraco 6中创建过,我已经创建了用于通过我的团队市CI服务器到我的网站部署用于测试的CI环境网络部署项目。

I have a MVC4 App created in VS 2010 with Umbraco 6 too and I've created a web deploy project which is used by my Team City CI server to deploy my website to a CI environment for testing.

在CI服务器我第一次加载网页(或任何页)它加载完美的罚款。但是加载页面的行为我CI服务器上创建一个APP_ code文件夹中,之后我得到的消息目录/ APP_ code /'是不允许的,因为应用程序是precompiled 。卸下APP_ code文件夹意味着再次适用于一个页面加载和文件夹重新创建。

On the CI server the first time I load the homepage (or any page) it loads perfectly fine. However the act of loading a page creates a App_Code folder on my CI server, and after that I get the message "The directory '/App_Code/' is not allowed because the application is precompiled". Removing the App_Code folder means that it once again works for one page load and the folder is created again.

删除precompiledApp.config文件导致我的网站不与YSOD说明载入对象引用不设置到对象的实例。在堆栈跟踪下面点Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase HttpContext的)+25

Removing the PrecompiledApp.config file causes my site to not load with a YSOD stating "Object reference not set to an instance of an object." at the following point in the stack trace "Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +25"

需要明确的是,我没有一个APP_ code文件夹在我的项目,我不想要或需要的。我只希望它停止在网页加载时自动创建一个!我用一把umbraco在VS和部署以同样的方式很多次,只是没有用一把umbraco 6和一个MVC项目。

To be clear, I don't have an App_Code folder in my project, and I don't want or need one. All I want is for it to stop creating one automatically upon page load! I've used Umbraco in VS and deployed in the same way many times before, just not with Umbraco 6 and in an MVC project.

为什么APP_ code被自动创建,我能做些什么来阻止它?任何想法

Any ideas why App_Code is being automatically created and what I can do to stop it?

非常感谢

理查德

推荐答案

这是怎么回事我也横空出世,则是一个precompiledApp.config'文件在某种程度上做了它的方式到生产服务器.. 。不知道如何发生的,但一旦我删除,并循环利用Web应用程序停止这种情况发生。

This was happening me as well, turned out it was because a 'precompiledApp.config' file had somehow made its way onto the production server... not sure how that happened but once I deleted and recycled web app this stopped happening.

这篇关于在发布的网站中自动创建APP_ code文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 19:17