测试托管是否支持mvc3
我问过我的托管公司,他们说“是的,我们支持 .net4/mvc3”但是,我不相信,因为我的 hellomvc 测试应用程序不会像在本地计算机上那样返回 home/index 路由。
开发人员:显示 /hello/index
托管:显示目录列表被拒绝
回到经典的 ASP 时代,一点 Response.Write 就会告诉您 ASP 正在运行。
在再次联系我的托管公司之前我是否已完成测试,或者我可以尝试更具体的方法吗?
谢谢
I have asked my hosting company and they said "yes, we support .net4/mvc3" However, I am not convinced since my hellomvc test app does not return the home/index route as it does on my local machine.
Dev: shows /hello/index
Hosting: shows Directory listing denied
Back in the classic asp days a little Response.Write would tell you that ASP was working.
Have I completed my test before I contact my hosting company again, or is there something more specific i can try?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的托管公司只需要安装与 MVC 兼容的 ASP .NET 版本。只需将所需的程序集复制到应用程序的 bin 文件夹中即可部署 MVC 本身。
(它也可以选择安装到服务器上的 GAC 中,这将允许多个 Web 应用程序共享相同的程序集,并为您节省一点空间和可维护性,但这只是一个选项)
Martin
编辑:
我唯一可以做的考虑一下,如果服务器未以集成模式运行,即它仅将 asp .net 扩展映射到 asp .net 处理程序,则可能会阻止在任何 ASP.NET 托管上运行的基本 MVC 网站,您可能需要配置路由使用以 .aspx 结尾的网址
Your hosting company only needs to have a version of ASP .NET installed which is compatible with MVC. MVC itself can be deployed by simply copying the required assemblies into the bin folder of your application.
(It can also optionally be installed into the GAC on the server which would allow multiple web applications to share the same assemblies and give you a small saving on space, and maintainablity but this is just one option)
Martin
EDIT:
The only thing I can think of which might stop a basic MVC website working on any ASP.NET hosting is if the server is not running in integrated mode i.e. it only maps the asp .net extensions to the asp .net handler, you may need to configure routing to use urls ending in .aspx
尝试托管由 MSFT 构建的示例 MVC 应用程序。
Try hosting a sample MVC App, built by MSFT.