简体   繁体   English

将ASP.NET MVC应用程序发布到Web主机 - 在VS项目结构而不是应用程序中部署文件

[英]Publishing ASP.NET MVC application to a web host - deploys files in the VS project structure instead of the application

I created a web application using ASP.NET MVC and want to publish to an online web hosting company that don't have any special extensions for VS etc. 我使用ASP.NET MVC创建了一个Web应用程序,并希望发布到一个没有VS等特殊扩展的在线Web托管公司。

I tried publishing by "FTP" but it has just copied all the files to the host, for example, the 'Views' folder with Index.cshtml has gone into (webhost)/Views/Index.cshtml and I still have the placeholder page supplied by my web host for the actual "root" of the domain (when I go to www.mysite.com) 我尝试通过“FTP”发布,但它刚刚将所有文件复制到主机,例如,带有Index.cshtml的'Views'文件夹已进入(webhost)/Views/Index.cshtml,我仍然有占位符页面由我的网站主机提供的域名的实际“根”(当我访问www.mysite.com时)

What am I doing wrong? 我究竟做错了什么? What should I be doing? 我该怎么办?

The application works perfectly well deployed locally and in debug mode.. 该应用程序在本地和调试模式下完美地部署。

Ugh!! 啊!! I feel stupid for having to ask this but I think it's just a config issue and not something fundamental I've missed....hopefully! 我不得不问这个问题我觉得很愚蠢,但我认为这只是一个配置问题,而不是我错过的根本......希望!

I assuming that Your hosting provider supports ASP.Net. 我假设您的托管服务提供商支持ASP.Net。

You should try to publish Your site in Visual Studio using Web Deploy from generated publish settings file like so: https://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx 您应该尝试使用Web Deploy从生成的发布设置文件中在Visual Studio中发布您的站点,如下所示: https//msdn.microsoft.com/en-us/library/dd465337(v = vs.110).aspx

, also remember to modify You web config file by setting <compilation debug="true"> property to false. ,还记得通过将<compilation debug="true">属性设置为false来修改您的Web配置文件。

usually You can download Your publish settings file from your hosting configuration control panel after making few settings 通常您可以在进行少量设置后从主机配置控制面板下载您的发布设置文件

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

相关问题 将ASP.NET MVC Core应用程序的[部分]发布到Web主机 - Publishing [part] of ASP.NET MVC Core application to web host 将Asp.Net Mvc,Web Api应用程序发布到Windows Azure - Publishing an Asp.Net Mvc,Web Api Application to Windows Azure ASP.Net Web应用程序VS ASP.net MVC Web应用程序 - ASP.Net web application VS ASP.net MVC web application How do I setup a ASP.net Core MVC web application to IIS when publishing it creates.dll, .pdb, and.json files - How do I setup a ASP.net Core MVC web application to IIS when publishing it creates .dll, .pdb, and .json files 从ASP.NET MVC Web应用程序下载文件时出错 - Error downloading files from asp.net mvc web application 我可以在 127.0.0.1 而不是本地主机上运行我的 asp.net 核心 mvc web 项目吗 - Can i run my asp.net core mvc web project on 127.0.0.1 instead of local host 发布我的asp.net Web应用程序时捕获到异常 - Exception catched when publishing my asp.net web application 可扩展的ASP.NET MVC Web应用程序 - Extensible ASP.NET MVC Web Application ASP.NET 使用 Web.Config 控制端口号来托管 Web 应用程序项目 - ASP.NET Use Web.Config to control Port Number to host Web Application Project ASP.NET Core Web Application(.NET Framework)项目模板缺少System.Web.MVC dll - ASP.NET Core Web Application (.NET Framework) project template is missing System.Web.MVC dll
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM