Kir*_*ril 2 asp.net-mvc publish publishing
我正在构建一个ASP.NET MVC应用程序,我正在尝试将它部署在一个支持ASP.NET的免费主机(0000free)上.我尝试了一些东西,但没有一个工作(即我浏览到我的网站时只看到目录结构):
通常我只是将html文件放在public_html文件夹中,但我感觉MVC应用程序的部署过程略有不同.我是否必须修改Web.config或其他文件管理器?如何通常部署MVC应用程序(在免费主机上)?
更新:
我了解到主机使用Mono并支持.NET 4.0,但我仍然无法部署.
我有Visual Studio 2010,我使用它的发布功能(即右键单击项目名称并单击发布),我尝试了几件事:
主机论坛的搜索实用程序有点弱,所以我使用谷歌搜索他们的论坛:http://www.google.com/search? q =publish + asp.net + site%3A0000free.com%2Fforum% 2F&即= UTF-8&OE = UTF-8&A Q = T&RLS = org.mozilla:EN-US:官方与客户端= firefox的-A
我一直在阅读Pro ASP.NET MVC框架,他们有一章关于发布,但它没有提供有关发布位置的任何具体信息,这就是他们所说的(这在我的案例中并不是很有帮助) ):
我应该把我的申请放在哪里?
您可以将应用程序部署到服务器上的任何文件夹.当IIS首次安装时,它会自动为c:\ Inetpub\wwwroot \创建一个名为Default Web Site的网站的文件夹,但您不应该有任何义务将应用程序文件放在那里.将应用程序托管在与操作系统不同的物理驱动器上是很常见的(例如,在e:\ websites\example.com中).这完全取决于您,并且可能会受到诸如您计划如何备份服务器等问题的影响.
这是我在尝试查看Index.aspx页面时遇到的错误:
Unrecognized attribute 'targetFramework'. (/home/devarmy/public_html/Web.config line 1)
Description: HTTP 500. Error processing request.
Stack Trace:
System.Configuration.ConfigurationErrorsException: Unrecognized attribute 'targetFramework'. (/home/devarmy/public_html/Web.config line 1)
at System.Configuration.ConfigurationElement.DeserializeElement (System.Xml.XmlReader reader, Boolean serializeCollectionKey) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationSection.DoDeserializeSection (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationSection.DeserializeSection (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.GetSectionInstance (System.Configuration.SectionInfo config, Boolean createDefaultInstance) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.GetSection (System.String path) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection (System.String sectionName) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.get_CompilationConfig () [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] in <filename unknown>:0
at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5171 次 |
| 最近记录: |