如何Publish自己的网站

本文详细介绍了如何在Visual Studio中启用并使用WebDeploy进行Web应用程序的部署,包括配置步骤、注意事项及常见操作指引。
1) To use Web Deploy in Visual Studio, you must first Enable It.  To enable, please login to your Control Panel -> IIS Manager -> VS Web Deploy.

You'll also find all the necessary publishing setting there.  Please be sure to enable 'Allow Untrusted Certificate' when you publish.

The following instructions apply to Web Applications Projects.  If you created your site using "New/Web Site" web deploy will not be available for that web application.  The web site must be created as a Project.  Web Deploy can be activated on Visual Studio or Visual Web Developer Express

2) To Publish your web project using Web Deploy:
  1. Open the project in Visual Studio.
  2. Click on Build/Publish.  This will bring up the "Publish Web" window.
  3. Click on the drop down box on "Publish Method" and choose Web Deploy.
  4. On the "Service URL" text box input --> [Please find this in your control panel -> IIS Manager -> VS Web Deploy] 
    e.g: https://demouser-001-site1.smarterasp.net:8172/MsDeploy.axd
  5. In the Site/application text box --> [Please find this in your control panel -> IIS Manager -> VS Web Deploy]
    e.g: demouser-001-site1

If you are planning to upload your web application to a subdirectory you will also enter the name of that folder. 
For example: "demouser-001-site1/subfolder"

      6. Check "Mark as IIS application on destination" (If you are uploading to a subfolder instead of your site root).
      7. Check "Leave extra files on destination (do no delete)".
      8. Check "Allow untrusted certificate".
      9. In the User name text box --> [Please find this in your control panel -> IIS Manager -> VS Web Deploy]
      10. In the Password text box --> [Please find this in your control panel -> IIS Manager -> VS Web Deploy]
在 Gerrit 中,**Publish Edit** 是将你对变更(Change)的临时编辑(Draft Edit)正式发布为一个新的补丁集(Patch Set)的操作。以下是详细说明和操作步骤: --- ### **1. 核心概念** #### **Edit(编辑)** - Gerrit 允许在 Web 界面直接编辑文件(通过 **Edit** 按钮),此时修改会保存在 Gerrit 服务器的临时区域(类似本地 `git stash`),**不会立即生成 Patch Set**。 - 编辑后需手动 **Publish** 或 **Delete Edit**。 #### **Publish Edit** - 将编辑的内容提交为一个新的 Patch Set,进入代码评审流程。 - 相当于将临时修改 `git commit --amend` 后推送。 --- ### **2. 操作步骤** #### **通过 Web 界面** 1. 进入变更页面 → 点击 **Edit** 按钮修改文件。 2. 保存编辑后,顶部会显示黄色提示栏: - **Publish Edit**:发布为新 Patch Set。 - **Delete Edit**:放弃所有编辑(不保存)。 3. 点击 **Publish Edit**,填写提交信息(可选),确认后生成新 Patch Set。 #### **通过命令行** 若已通过 Gerrit Web 编辑文件,但未发布: ```bash # 查看 Gerrit 临时编辑的文件 git fetch origin refs/changes/XX/YYYY/EDIT git checkout FETCH_HEAD # 手动提交并推送(等效于 Publish Edit) git add . git commit --amend # 修改提交信息 git push origin HEAD:refs/for/master ``` --- ### **3. 常见问题** #### **无法 Publish Edit?** - **原因1**:无编辑内容(Gerrit 检测到未修改文件)。 → 需实际修改文件内容后再发布。 - **原因2**:权限不足(缺少 `Push` 或 `Edit` 权限)。 → 联系管理员调整权限。 - **原因3**:变更已合入/废弃(状态非 `Open`)。 → 需创建新变更。 #### **冲突解决** 若其他人已推送新 Patch Set: 1. 先 **Delete Edit** 放弃本地临时编辑。 2. 拉取最新代码后重新操作: ```bash git pull --rebase origin master ``` --- ### **4. 注意事项** - **临时性**:未发布的编辑会在几天后自动过期删除(取决于服务器配置)。 - **历史记录**:已发布的 Patch Set 会永久保留,包括文件修改差异。 --- ### **示例流程** 1. 编辑文件 → 修改 `README.md` 并保存。 2. 点击 **Publish Edit** → 填写提交信息 "Update documentation"。 3. 结果:生成 `Patch Set 2`,评审者可查看变更。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值