简体   繁体   English

如何在IIS上设置ASP.NET应用程序

[英]How to set up a asp.net application on IIS

I've copied a whole folder which keeps a website inside from a web server to another computer.From the original server I can easily run the web application. 我已经将整个网站的文件夹从一个Web服务器复制到另一台计算机。从原始服务器可以轻松运行该Web应用程序。 Now I need to know what exactly I have to do in order to be able to run the application on the second computer too. 现在,我需要知道我到底要做什么才能在第二台计算机上运行该应用程序。 I think there are some special considerations with IIS. 我认为IIS有一些特殊注意事项。 What and how do I have to set up in IIS? 我必须在IIS中设置什么以及如何设置?

  1. Install the IIS Windows component for whatever version of Windows you're using. 为所使用的任何Windows版本安装IIS Windows组件。
  2. Create a new site in IIS 在IIS中创建一个新站点
  3. Point this new site to your web root 将此新站点指向您的网站根目录
  4. Configure DNS for the site (maybe using your hosts file) 为站点配置DNS(可能使用您的主机文件)

There are some considerations to make depending on which version of IIS you are using. 根据您使用的IIS版本,有一些注意事项。 It would be helpful to know if you are using 6 or 7. If you are under 7, you need to copy the site to your IIS directory (typically wwwroot) and then setup the basic settings in IIS by choosing your application pool and such. 知道您使用的是6还是7,将很有帮助。如果您的年龄在7以下,则需要将该站点复制到IIS目录(通常是wwwroot),然后通过选择应用程序池等在IIS中设置基本设置。 Application pools are typically (but not always) setup by .Net Framework. 应用程序池通常(但并非总是)由.Net Framework设置。 You may need to setup your default page and set it as an application. 您可能需要设置默认页面并将其设置为应用程序。 There are many blogs and sites out there that will tell you how to setup this basic functionality but are specific to your application. 那里有许多博客和网站,它们会告诉您如何设置此基本功能,但特定于您的应用程序。

Follow these steps. 跟着这些步骤。

  1. create a new site from left menu By right clicking and add new website. 从左侧菜单创建新站点右键单击并添加新网站。
  2. Give physical path to that folder 提供该文件夹的物理路径
  3. Map with the site url 使用网站网址进行映射
  4. Give permissions to Directory as (like everyone) 像其他人一样授予Directory权限
  5. Set up the default page if (index page is not present in the directory) 如果(目录中不存在索引页),则设置默认页
  6. Set framework which ever you are using. 设置您正在使用的框架。

For configuring IIS 1. Firstly, in Programs and features go to Turn on and off windows features...in that tick everything under IIS..go to sub folder and tick everything everywhere 用于配置IIS 1.首先,在“程序和功能”中,转到“打开和关闭Windows功能...”,在其中选中IIS..go下的所有内容,进入子文件夹,然后在所有地方都选中所有内容

  1. Go to Internet Explorer> Setting> Internet Options> Advanced> untick Show friendly http error messages option 转到Internet Explorer>设置> Internet选项>高级> 取消选中显示友好的HTTP错误消息选项

  2. Go to IIS manager a. 转到IIS管理器。 In default application pool> advanced settings > Set true enable 32-bit program option b. 在默认应用程序池>高级设置>设置为true中,启用32位程序选项b。 Go to Asp> setting> expand debugging properties> there will an option of error messages some 2nd last or last option that would be false...set it to true..apply changes 进入Asp>设置>展开调试属性>将有一个错误消息选项,某些第二个last或last选项将为false ...将其设置为true..apply更改

  3. Run vbscript and asp only in Internet Explorer (edge 10 in developer options for pop ups) 仅在Internet Explorer中运行vbscript和asp(弹出窗口的开发人员选项中的Edge 10)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM