首页 > 其他分享 >通过 web deploy 发布 .net 网站到IIS

通过 web deploy 发布 .net 网站到IIS

时间:2023-02-01 14:33:35浏览次数:48  
标签:web IIS deploy https FileSystem net

安装web deploy

  1. 参考博客: https://www.jianshu.com/p/519f827b660b
  2. 注意一点: web deploy 官网下载的中文版本是3.6的, 会出现安装不上的情况。请使用英文版的, 4.0版本。

发布时排除文件

  1. 参考: https://cloud.tencent.com/developer/ask/sof/62971
  2. 第二个回答,在发布文件中加入 XML 元素, 亲测有效
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" 
         xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <PublishProvider>FileSystem</PublishProvider>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <PublishFramework />
    <ProjectGuid>afa9f185-7ce0-4935-9da1-ab676229d68a</ProjectGuid>
    <publishUrl>bin\Release\PublishOutput</publishUrl>
    <DeleteExistingFiles>False</DeleteExistingFiles>
  </PropertyGroup>
  <ItemGroup>

    <!-- CopyToPublishDirectory = { Always, PreserveNewest, Never } -->

    <!-- Copying a file located outside of the project into the published site's wwwroot folder. -->
    <ResolvedFileToPublish Include="..\ReadMe2.md">
      <RelativePath>wwwroot\ReadMe2.md</RelativePath>
      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
    </ResolvedFileToPublish>

    <!-- Excluding the wwwroot\Content folder. -->
    <Content Update="wwwroot\Content\**\*" CopyToPublishDirectory="Never" />

    <!-- Excluding the Views\Home\About2.cshtml file. -->
    <Content Update="Views\Home\About2.cshtml" CopyToPublishDirectory="Never" />
  </ItemGroup>
</Project>

标签:web,IIS,deploy,https,FileSystem,net
From: https://www.cnblogs.com/zhoushiya/p/17082486.html

相关文章

  • web相关概念回顾、服务器软件_概述
    web相关概念回顾软件架构:C/S:客户端/服务器端B/S:浏览器/服务器端资源分类:静态资源:所有用户访问相同资源后,得到的结构都是一......
  • IIS 配置 HTTPS
    1、导入证书a、开始->运行->MMC,打开MMC  b、文件->添加/删除管理单元c、双击证书,添加d、计算机用户      ......
  • 如何在 WebClient UI 里创建 Value Help
    我们先看一下按照本文介绍的步骤完成之后,实现的效果如何。下图BusinessPartnerID字段右侧,有一个正方形小图标,暗示着这个字段分配了一个F4Valuehelp.点击F4快捷键......
  • RabbitMQ在服务里查看显示已经成功,但无法访问web端
    参考链接:https://blog.csdn.net/weixin_42753193/article/details/128770009 网上大多数方法大致如下:1、进入安装目录cd你的RabbitMQ安装目录\sbin2、打开节点:r......
  • 初次使用 WebSocket -springboot 集成
    参考自:SpringBoot集成websocket_清泉影月的博客-CSDN博客,WebSocket中利用service层交互数据库_戒烟的李白的博客-CSDN博客_websocketservice核心依赖<dependency>......
  • 【Javaweb】什么是Listener监听器?
    1、Listener监听器它是Javaweb的三大组件之一。Javaweb的三大组件分别是:Servelt程序,Filter过滤器,Listener监听器。2、Listener它是JavaEE的规范,就是接口3、监听器的作用......
  • 【Javaweb】jsp | 简单学习
    什么是jsp,它有什么用?jsp的全称是javaserverpages。Java的服务器界面。jsp的主要作用是代替Servlet程序回传html页面的数据因为Servlet程序回传html页面数据是一件非常......
  • 【Javaweb】JavaEE项目的三层架构 | 快速搭建
    逻辑类图  分层的目的是为了解耦。解耦就是为了降低代码的耦合度。方便项目后期的维护和升级。不同的层有不同的包web层com.stguigu.web/servlet/con......
  • express_javscript_webframe
    D:\code3\socketio_express_mongodb\ExpressJS-SocketIO-Boilerplate\config.js/***Webserverport*/constSERVER_PORT=3005;/***Sessionsettings*/co......
  • selenium源码通读·12 |webdriver/remote分析
    (·12|webdriver/remote分析)1源码路径selenium/webdriver/remote2功能说明方法描述说明command.pyDefinesconstantsforthestandardWebDrivercom......