如何部署一个pre-编译ASP.NET Web应用程序? [英] How do I deploy a pre-compiled ASP.NET web application?

查看:113
本文介绍了如何部署一个pre-编译ASP.NET Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ASP.NET 2.0中实现的Web服务,并有使用aspnet_compiler pre-编译它。

I have a web service implemented in ASP.NET 2.0 and have pre-compiled it using the aspnet_compiler.

我不知道现在怎么样将它部署到IIS,可有人点我在正确的方向?我使用的是Windows Server 2003的计算机上的IIS 6.0。

I have no clue now how to deploy it to IIS, can someone point me in the right direction? I am using IIS 6.0 on a Windows Server 2003 machine.

我的pre-编译的文件放置到一个虚拟目录,当我通过浏览器我得到以下分析器错误信息访问服务:

I have placed the pre-compiled files into a virtual directory, when I access the service through the browser I get the following parser error message:


Parser Error Message: The page must have a 
<%@ webservice class="MyNamespace.MyClass" ... %> directive.

我然后检查.asmx文件为所述指令和内容已经由编译器改为:

I then checked the .asmx file for said directive and the contents have been changed by the compiler to:


This is a marker file generated by the precompilation tool, and should not be deleted!

更新:当我把非$ ​​P $ P-编译Web应用程序在虚拟目录中它工作正常,当我把pre-编译文应用虚拟目录,我得到上述错误。

UPDATE: When I place the non-pre-compiled web app in the virtual directory it works fine, when I place the pre-compiled wen app in the virtual directory, I get the above errors.

任何人有任何的想法!?

Anyone have any ideas!?

推荐答案

您可以输出目录中的内容复制到在IIS虚拟目录,它应该都只是工作。您将需要设置的应用程序池,并配置ASP.NET虚拟目录就像一个非编译的网站。请确保您删除一切从虚拟目录(如果有一个previous非编译现场有)。

You can either copy the contents of the output directory into the virtual directory on IIS and it should all just work. You will need to set up the App Pool and configure the virtual directory for ASP.NET just like a non-compiled website. Make sure you delete everything from the virtual directory (if there was a previous non-compiled site there).

您也可以使用<一个href=\"http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx\"相对=nofollow> Web部署项目,它可以作为输入到一个MSI安装程序。

Also you can use Web Deployment projects, which can serve as an input to an MSI installer.

该ASMX文件的内容是正确的。你确定你有一个应用程序配置的虚拟目录?打开虚拟目录,右键点击属性窗口,确保应用程序名(在虚拟目录选项卡)设置和可编辑。

The ASMX file contents are correct. Are you sure you have configured the Virtual Directory with an Application? Open the properties window by right clicking on the virtual directory and ensure the "Application Name" (on the "Virtual Directory" tab) is set and is editable.

另外选择的选项卡上的正确的ASP.NET版本?选中该属性窗口中的

Also have chosen the correct ASP.NET version on the tab? Check this on the "ASP.NET" tab of the properties window"

这篇关于如何部署一个pre-编译ASP.NET Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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