Hosting WebMatrix Page

纵饮孤独 提交于 2019-12-11 04:18:47

问题


What exactly do I need from a host for my webmatrix project to work? I know Scott Hanselman from Microsoft gave out a few nice host sites but I was just wondering for fun.


回答1:


In order to publish to a host from WebMatrix using Web Deploy, the host needs to be in a compliant state. First of all, it has to run WebDeploy and the remote service WMSvc has to be in a desired state (enabled and started). Delegation rules have to be set up, so that the user has permissions and the right scope to deploy various components like IIS application, database, ACLs, etc. In order to check whether a host is WebMatrix-friendly, ServerValidator tool can be used (see the article for a full list of host requirements).

If you want to publish to a host though FTP, all you need to ensure is that FTP publishing is enabled on the host.

Hope this helps.




回答2:


You can use any .Net 4.0 host, but you'll need to copy a bunch of DLL files to yuor bin folder.

The exact files required depend on what libraries your site uses.
At a minimum, you'll probably need

  • Microsoft.Web.Infrastructure.dll
  • Microsoft.Web.Helpers.dll
  • System.Web.Helpers.dll
  • System.Web.Razor.dll
  • System.Web.WebPages.dll
  • System.Web.WebPages.Deployment.dll
  • System.Web.WebPages.Razor.dll
  • WebMatrix.Data.dll
  • WebMatrix.WebData.dll

These can be found in Program Files\Microsoft ASP.Net.

If it still doesn't work, copy any additional files from FileNotFound errors.




回答3:


To publish your website from WebMatrix - your hosting provider must support one of the two publishing technologies - FTP and/or WebDeploy.

In case of FTP, you would need to manually enter the following ftp settings: FTP Server, username, password and destination url. Optionally you can also specify the site path

In case of WebDeploy, you could just get the publishsettings file for your host and import the settings. Else, you can also manually enter these settings.



来源:https://stackoverflow.com/questions/4846352/hosting-webmatrix-page

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!