如何承载一个ASP.NET Web应用程序网站上的IIS 7 [英] How to host an ASP.NET Web Applications site on IIS 7

查看:149
本文介绍了如何承载一个ASP.NET Web应用程序网站上的IIS 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地工作的一个ASP.NET Web应用程序的网站。它几乎完成了,所以我想尝试,并把它放在一个IIS服务器。

在IIS服务器在不同的服务器上运行。什么我需要做的,在那遥远的IIS服务器上运行我的ASP.NET网站?

我试着以下内容:

我复制我的整个项目目录(因此包括 .csproj的文件,的 bin文件夹等) \\ MyProject的

:远程服务器上,正运行IIS C对以下位置

在IIS管理器中我加了一个虚拟目录 默认Web站点下。位于我的网站文件 C:\\ MyProject目录并补充该文件夹。然后在IIS管理器中我转换了虚拟目录到应用程序。

但是,当我浏览到我的网站我得到一个错误:


  

HTTP错误500.23 - 内部服务器错误


  
  

一个ASP.NET设置已被检测到,这并不在集成应用管理管道模式


所以这可能不是这样做的方式。我不认为我可以做一个部署,因为我从来没有设置任何个.axd(?)或任何东西。

所以我的问题是,我有什么才能运行在IIS上我的网站做..?


解决方案

该错误将可能是因为,你开发的.NET版本2.0的网站,并尝试了.NET Framework 4.0下运行的综合管线程序池下运行

的SoL:


  1. 创建经典模式和.NET框架的新程序池等于你的应用程序开发框架。


  2. 附加新创建的程序池到您的虚拟目录。


注:对于部署,你不需要的.csproj或不需要的解决方案文件复制到目标位置。

如果是otherway左右,(即)的应用是.NET 4.0的应用程序池是2.0,请按照下面的步骤。


    在服务器
  1. 更新.NET框架4.0,如果你只有2.0。

  2. 然后在命令提示符下运行以下命令注册.NET 4.0版本的IIS。


  

C:\\ WINDOWS \\ Microsoft.NET \\框架\\ v4.0.30319>为aspnet_regiis -i


I'm locally working on an ASP.NET Web Applications site. It's almost finished so i wanted to try and put it in an IIS server.

The IIS server is running on a different server. What do i need to do to run my ASP.NET web site in that remote IIS server?

I tried to following:

I copied my entire project directory (so including the .csproj file, the bin folder etc.) to the following location on the remote server, where IIS is running C:\MyProject.

In IIS manager i added a Virtual Directory under Default Web Site. Located my Web Site files in C:\MyProject and added that folder. Then in IIS manager i converted that Virtual Directory to an Application.

But when i browse to my Web Site i get an error:

HTTP Error 500.23 - Internal Server Error

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

So this is probably not the way to do it. I don't think i can just do a Deploy, because i never set up any .axd(?) or anything.

So my question is, what do i have to do in order to run my Web Site on IIS..?

解决方案

The error will be probably because of, you developed the site in .net version 2.0 and try to run under the Integrated pipeline apppool that runs under .net framework 4.0.

SoL:

  1. Create a new apppool with classic mode and .net framework equals to your application developed framework.

  2. attach the newly created apppool to your virtual directory.

Note: For deployment, you don need to copy .csproj or unwanted solution files to destination location.

If it is otherway around, (i.e,) application is .net 4.0 and apppool is 2.0 please follow the below steps.

  1. Update .net framework in the server to 4.0 if you have only 2.0.
  2. Then register .net 4.0 version in IIS by running the following command in command prompt.

C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i

这篇关于如何承载一个ASP.NET Web应用程序网站上的IIS 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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