zoukankan      html  css  js  c++  java
  • VS2017发布到本地IIS流程

    点击你要发布项目,注意不是解决方案!

     右击 TRS.Web.Admin ,点击 发布   后, 

     选取发布目标   点击文件夹,自定义文件路径或默认路径都可以

     点击  高级

     点击保存后,直接 发布  即可

     当项目发布好之后,首先需要查看一下电脑上IIS有没有配好。

    本地部署(IIS)

    (1)开始→控制面板→程序→启用或关闭Windows功能

    把属于IIS的全部勾选上,避免出现错误不好解决

    (2)开始→(IIS)管理器

     

     (3)右击 网站   →  添加站点

       1)网站名称自己起,可以随便定义;

        2)物理路径,选择VS发布好的那个文件夹即可

      3)如果不选择主机名,IP可以默认不选,端口号默认为:80

      4)主机名为网站的名称(这个需要在C盘下配置)

      主机名配置

          首先,找到你的文件:C:WindowsSystem32driversetc的hosts文件,直接用记事本打开

      

    文件内容如下

     1 #
     2 
     3 
     4 # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
     5 
     6 
     7 #
     8 
     9 
    10 # This file contains the mappings of IP addresses to host names. Each
    11 
    12 
    13 # entry should be kept on an individual line. The IP address should
    14 
    15 
    16 # be placed in the first column followed by the corresponding host name.
    17 
    18 
    19 # The IP address and the host name should be separated by at least one
    20 
    21 
    22 # space.
    23 
    24 
    25 #
    26 
    27 
    28 # Additionally, comments (such as these) may be inserted on individual
    29 
    30 
    31 # lines or following the machine name denoted by a '#' symbol.
    32 
    33 
    34 #
    35 
    36 
    37 # For example:
    38 
    39 
    40 #
    41 
    42 
    43 # 102.54.94.97 rhino.acme.com # source server
    44 
    45 
    46 # 38.25.63.10 x.acme.com # x client host
    47 
    48 
    49 # localhost name resolution is handled within DNS itself.
    50 
    51 
    52 # 127.0.0.1 localhost
    53 
    54 
    55 # ::1 localhost
    56 
    57 
    58 #123.151.26.11 wt2-new-rso.lol.qq.com
    59 # IP地址                  主机名
    60 192.168.3.104  admin.zhujiajiao66.com
    61 192.168.3.104  cSharp.zhujiajiao67.com
    HOSTS

    打开之后直接在HOSTS文件中加入一行

      如:

         #   IP地址       主机名

        192.168.3.104    admin.zhujiajiao66.com

    取消时,在配置行前加上 #

        

           

  • 相关阅读:
    [LeetCode]4Sum
    [LeetCode]3Sum
    [LeetCode]Two Sum
    [LeetCode]Maximal Rectangle
    [LeetCode]Largest Rectangle in Histogram
    [LeetCode]Sudoku Solver
    [LeetCode]Group Anagrams
    jQuery验证控件jquery.validate.js使用说明+中文API
    js操作cookie,实现登录密码保存
    Java中getResourceAsStream的用法
  • 原文地址:https://www.cnblogs.com/xuan666/p/11866573.html
Copyright © 2011-2022 走看看