简体   繁体   English

Visual Studio Web,我要上传什么文件到服务器?

[英]Visual studio web, what file do i upload to server?

I'm a little confused, since a day or 2 i've been programming with visual studio 2013 web express. 我有点困惑,因为我已经在一两天内使用Visual Studio 2013 Web Express进行编程。 i've made a C# web form (.aspx). 我已经制作了一个C#网络表单(.aspx)。 i used to program normal html/css in Adobe Dreamweaver. 我曾经在Adobe Dreamweaver中对普通的html / css进行编程。 But unlike a normal .HTML document i cannot find a file to just click and open in my browser. 但是与普通的.HTML文档不同,我找不到在浏览器中单击并打开的文件。 and so i do not know how to upload my project to my hosting server. 所以我不知道如何将我的项目上传到我的托管服务器。 when i debug it, it shows up in my browser and it tells me it is the file with .aspx extension but when i try to manually open this file it just tells me there's something wrong with my page (incorrect code etc.) Anyone can tell me how i do this? 当我调试它时,它会显示在我的浏览器中,并告诉我它是扩展名为.aspx的文件,但是当我尝试手动打开此文件时,它仅告诉我页面存在问题(代码不正确等),任何人都可以告诉我我该怎么做? could not find a solution in google so i thought i'd give stackoverflow a chance :) 找不到在谷歌的解决方案,所以我想我会给stackoverflow一个机会:)

Thanks! 谢谢! Gr. Gr。

.aspx页,.ascx控件,带有.dll文件的bin文件夹,web.config,App_Themes,App_LocalResources等。然后,您需要在IIS上建立一个新的网站。

First off, a website programmed with ASP.Net requires Internet Information Services (IIS) to run. 首先,使用ASP.Net编程的网站需要运行Internet Information Services(IIS)。

Visual Studio has its own built-in mini version of IIS for development, but to deploy to production you'll need a Windows Server with IIS. Visual Studio具有自己的内置IIS迷你版用于开发,但是要部署到生产环境中,您将需要带有IIS的Windows Server。 You should check that your hosting provider supports IIS before you do anything else. 在执行其他任何操作之前,应检查主机提供商是否支持IIS。

Assuming you have IIS running, and you've configured a website in IIS with an empty directory, ready to host your project there are a couple of different options you have for deployment: 假设您正在运行IIS,并且已在IIS中用空目录配置了一个网站,准备托管您的项目,则可以使用以下两个不同的选项进行部署:

  1. Just copy everything in the website to the server (all files & folders). 只需将网站上的所有内容复制到服务器(所有文件和文件夹)。 This is simplest, and allows you to tweak things on the fly, but is the least secure. 这是最简单的方法,可让您即时调整内容,但最不安全。
  2. Use Visual Studio's packaging and deployment utility. 使用Visual Studio的打包和部署实用程序。 Not much to say here, other than read the manual. 除了阅读手册之外,这里没有太多要说的。

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

相关问题 从 Visual Studio 发布代码时如何将文件上传到 Azure 函数? - How do I upload file to Azure function while publishing the code from Visual Studio? 我可以将什么 Visual Studio 模板用于将与设备通信并使用 web 页面的服务器? - What visual studio template can i use for a server that will communicate with devices and uses web pages? 文件上传在 Visual Studio IIS Express 中工作但不在服务器上 - File upload working in Visual Studio IIS Express but not on server 如果我在visual studio中选择它,“转换为Web应用程序”选项会做什么? - What does the option “convert to web application” do if I select it in visual studio? 如何设置Visual Studio以便能够操作Excel文件? - What do I need to do to set up Visual Studio to be able to manipulate an Excel File? 上传下载文件Visual Studio - Upload Download File Visual Studio 我可以使用C#Web服务在Visual Studio 2005中上传超过4GB的视频文件吗 - Can I upload video file more than 4GB in visual studio 2005 using c# web service 如何在Visual Studio 2012中获取asmx Web服务文件? - How do I get the asmx web service file in Visual Studio 2012? 如何强制Visual Studio重新制作web.config文件 - How do I force visual studio to remake the web.config file 如何使用WSDL文件在Visual Studio.NET中创建Web服务? - How do I create a Web Service in Visual Studio.NET using a WSDL file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM