如何用IIS7发布ASP网站 [英] How to publish asp website using IIS7
问题描述
我想主办IIS7我的web应用程序(用于测试目的)。我已检查教程如何做到这一点,他们都非常相似,但我总是得到一些错误。我想我失去了一些东西,希望你能帮助我。
I am trying to host my web application in IIS7 (for testing purposes). I have checked tutorials how to do it, they are very similar, but i always get some errors. I guess i'm missing something, hope you could help me.
的事情,我现在有:
1.安装IIS7与ASP NET(IIS的欢迎图像显示,所以我想它的正确安装)
2.简单的Web应用程序(仅适用于Default.aspx的和其他一些自动生成的文件)
Things that i have now: 1. Installed IIS7 with asp net (the IIS welcome image is showing, so i guess its installed correctly) 2. Simple web application (only with Default.aspx and some other automatically generated files)
我使用的是像这样的教程:
的http://www.$c$cproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0
I'm using tutorials like this one: http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0
对于那些谁可能不想点击链接,下面是本教程(只是法师和一些附加信息)的步骤:
For those who may not want to click the link, here are the steps of this tutorial (just with mages and some additional info):
第1步:从Visual Studio中,发布您的Web应用程序。
第2步:复制发布的应用程序文件夹复制到C:\\ intepub \\ wwwroot的[默认]文件夹。
第3步:从运行 - > INETMGR - >确定
TestWeb就在你的wwwroot文件夹最近粘贴web应用。
第四步:我们需要将其转换为一个应用程序,只需右键单击,然后点击,如下图所示ConvertToApplication:
+如何创建和分配应用程序池
Step 1: From Visual Studio, publish your Web application. Step 2: Copy the published application folder to "C:\intepub\wwwroot" [default] folder. Step 3: From RUN - > inetmgr -> OK "TestWeb" is a recently pasted webapplication on your wwwroot folder. Step 4: We need to convert it to an application, just right click and then Click on "ConvertToApplication" as shown in the following picture: + How to create and assign application pools
现在有关错误,当我试图连接到运行样本网站获取:
1.如果我使用框架4.0集成的应用程序池:
HTTP错误500.21 - 内部服务器错误
在其模块列表处理程序PageHandlerFactory集成的有一个坏模块ManagedPipelineHandler
2.如果我使用的框架4.0经典应用程序池:
HTTP错误404.17 - 未找到
所请求的内容似乎是脚本,并不会由静态文件处理程序送达。
Now about the errors i get when i'm trying to connect to the running Sample website: 1. If I'm using Framework 4.0 integrated application pool: HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list 2. If I'm using Framework 4.0 Classic application pool: HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler.
我的猜测是,事情就可以在IIS7配置错误或我可能是我发布的Web应用程序不是它的方式予以公布,因为他们在我使用的教程不同。对于现在我发布,使用文件系统选项。它是为IIS7正确的?
My guess is that something could be configured wrong in IIS7 or i might be publishing my web application not the way it has to be published, because they differ in tutorials that i am using. For now i am publishing, using File System option. Is it the right one for IIS7?
希望任何人都可以解释我自己的错误。
Hope anyone could explain me my mistakes.
谢谢,沃尔特
推荐答案
有关提问的答案是从运行的框架目录中的aspnet_regiis.exe -i
The answer for the questioner was to run the aspnet_regiis.exe -i from the framework directory
下面的建议和意见,导致这样的回答:
Below suggestions and comments leading to this answer :
IIS7上发布时,网站和Web服务(暂时),但我做了一些研究,并根据以下链接我从未有过的问题:的 http://forums.asp.net/post/3225843.aspx
有人建议,在程序池切换到经典.net程序池之后,可能需要你在注释这是必要的IIS7 web.config中一节
I never had problems when publishing websites and webservices on IIS7 (for the moment) but I did a little research and according to the following link : http://forums.asp.net/post/3225843.aspx It is suggested that after switching the AppPool to Classic .NET AppPool, it may be required for you to uncomment a section in the web.config which is necessary for IIS7
你尝试了吗?
这篇关于如何用IIS7发布ASP网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!