有没有办法摆脱的aspx占位符文件中的ASP.NET Web部署项目? [英] Is there a way to get rid of aspx placeholder files in a ASP.NET web deployment project?

查看:505
本文介绍了有没有办法摆脱的aspx占位符文件中的ASP.NET Web部署项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是网络部署项目,以precompile我的 ASP.NET 3.5 Web项目。它创建于ASPX和ASCX文件code一个额外的DLL。并且,对于每一个aspx文件存在一个占位符aspx文件(空)需要被复制到服务器

I'm using a web deployment project in order to precompile my ASP.NET 3.5 web project. It creates a single extra DLL for the code in aspx and ascx files. And, for every aspx file there is a placeholder aspx file (empty) which needs to be copied to the server.

我想简化了部署过程。有没有一种方法(配置IIS站点和添加一些HTTP处理程序等)为摆脱这些ASPX占位符

I'd like to simplify the deployment process. Is there a way (configuring the IIS site and adding some sort of http handlers etc.) to get rid of these aspx placeholders?

另外,我想知道是否有摆脱在的一种方式.compiled文件中的bin文件夹。它将使部署过程更顺畅。

Also, I'd like to know if there is a way to get rid of the .compiled files in the bin folder. It would make the deployment process smoother.

谢谢!

推荐答案

我自己发现了它。它比我想象的要容易得多(IIS 6.0):

I discovered it by myself. It is much easier than I thought (IIS 6.0):

在Internet信息管理到现场的属性页,然后选择标签主目录,然后点击按钮配置...。

In Internet Information Manager go to the property page of the site, then chose the tab "Home Directory" and click on the button "Configuration...".

点击编辑...为.aspx ISAPI扩展和取消选中确认文件是否存在。在这一点上,是不再需要任何aspx文件

Click "Edit..." for the .aspx ISAPI extension and uncheck "Verify that file exists". At this point, no aspx file is needed anymore.

更新

一件重要的事情:我必须为了让像请求的默认文档创建应用程序的根目录下一个空的的Default.aspx文件的 http://www.example.com/ (不调用一个aspx)。

One important thing: I had to create an empty "default.aspx" file in the root of the application in order to allow the default document for requests like "http://www.example.com/" (without calling an aspx).

更新2

另一个非常重要的事情:如果你正在使用ASP.NET AJAX PageMethods,那么你必须保持该页面的ASPX占位符。如果你省略文件,一个javascript的PageMethods未定义的错误将被浏览器抛出。

Another very important thing: if you're using ASP.NET Ajax PageMethods, then you have to keep the aspx placeholder of that page. If you're omitting the file, a javascript 'PageMethods is undefined' error will be thrown on the browser.

这篇关于有没有办法摆脱的aspx占位符文件中的ASP.NET Web部署项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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