简体   繁体   English

ASP.NET,部署网站的步骤

[英]ASP.NET, steps to deploy a website

I have recently inherited an ASP.NET website to look after. 我最近继承了一个ASP.NET网站来照顾。

I have a copy of all the files but coming from a PHP background I am not sure how to make changes and deploy it. 我有所有文件的副本,但是来自PHP背景,我不确定如何进行更改和部署。

After I make changes to the site I presume I need to compile it. 对网站进行更改后,我想我需要对其进行编译。 But can I then simply copy the site onto the server or do I need to create a setup package and 'install' it over the top of the production system? 但是,我是否可以仅将站点复制到服务器上,还是需要创建安装程序包并将其“安装”到生产系统的顶部?

Also, where does the code-behind DLL 'sit' in the file system? 另外,代码隐藏的DLL在文件系统中的什么位置?

Is there a decent guide to this kind of stuff? 是否有关于这种东西的不错的指南?

After making changes and testing them with your local copy (I'm assuming you know how to do that), click the "Copy Web Site" button at the top of the solution explorer. 进行更改并使用本地副本测试它们之后(假设您知道该怎么做),请单击解决方案资源管理器顶部的“复制网站”按钮。 This lets you connect to a remote server (your production box, presumably) and will compare your local version of the web site to the one on the server, and flag any files that have been changed locally. 这使您可以连接到远程服务器(可能是您的生产包装箱),并将网站的本地版本与服务器上的本地版本进行比较,并标记所有在本地更改的文件。 You can then update the server version so that it matches your local version. 然后,您可以更新服务器版本,使其与您的本地版本匹配。

If you're deploying the web app as a compiled DLL (instead of as uncompiled CS files), the DLL should sit in the application's \\bin folder. 如果将Web应用程序作为已编译的DLL(而不是未编译的CS文件)进行部署,则DLL应该位于应用程序的\\ bin文件夹中。 Even with a compiled DLL, you still need to deploy the ASPX files. 即使使用已编译的DLL,您仍然需要部署ASPX文件。

You don't have to go for a setup. 您不必进行设置。 The answers to your questions differ based on whether you are using a 'WebSite' or a 'Web Application Project'. 根据您使用的是“ WebSite”还是“ Web应用程序项目”,对问题的答案有所不同。 Please answer to following and we can follow up after that; 请回答以下内容,之后我们可以进行后续处理;

  1. Which version of .Net / ASP.Net you use? 您使用哪个版本的.Net / ASP.Net? (1.1, 2.0 or newer) (1.1、2.0或更高版本)
  2. When you open up the package in VS (Visual Studio) and right click on the top most group (solution explorer) do you see options like Build web Site, Publish Web Site? 当您在VS(Visual Studio)中打开软件包并右键单击最上面的组(解决方案资源管理器)时,您会看到诸如“构建网站”,“发布网站”之类的选项吗?

As a long-shot just try to create an IIS web site pointed to the root of your files and see if anything comes up. 从长远来看,只需尝试创建一个指向文件根目录的IIS网站,然后查看是否有任何问题。 If this works the work process will be; 如果这可行的话,工作流程将会是; 1. Do a change 2. Compile 3. Hit the web site URL and see whether it reflects 1.进行更改2.编译3.单击网站URL,看看它是否反映了

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

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