VS2013中的MVC5模板部署到mono上的艰辛历程

在Xamarin.Studio创建的asp.net项目,部署过程非常顺利,没有遇到什么问题;但在VS2013中创建的asp.net项目,部署过程会有一些波折。现在想想,原因是Xamarin.Studio中的项目模板比较简单,只是显示几个文字,并没有用到mvc5中的东西。

vs2013新建一个asp.net的项目(目标框架是.net4.5),选择mvc,并且更改身份验证为不适用身份验证。

编译,并发布到jexus默认站点指向的目录,访问之。报出的错误信息如下图。

根据异常堆栈信息,应该是调用HtmlHelper的ActionLink方法的时候,Helper友用到了RouteCollectionExtention的获取虚拟路径方法,问题就处在这个方法中。

看提示应该是RouteCollection少了AppendTrailingSlash这个属性(bool,用来控制在转换成虚拟路径的时候是否在最后添加“/”)。

http://c.tieba.baidu.com/p/3368455020
http://c.tieba.baidu.com/p/3368455422
http://c.tieba.baidu.com/p/3368354593
http://c.tieba.baidu.com/p/3368387614
http://c.tieba.baidu.com/p/3368367578
http://c.tieba.baidu.com/p/3372330234
http://c.tieba.baidu.com/p/3370423610
http://c.tieba.baidu.com/p/3369940353
http://c.tieba.baidu.com/p/3383281409
http://c.tieba.baidu.com/p/3368165592
http://c.tieba.baidu.com/p/3368191774
http://c.tieba.baidu.com/p/3368211935
http://c.tieba.baidu.com/p/3368243322
http://c.tieba.baidu.com/p/3368244804
http://c.tieba.baidu.com/p/3368355506
http://c.tieba.baidu.com/p/3368255950
http://c.tieba.baidu.com/p/3368029477
http://c.tieba.baidu.com/p/3367999752
http://c.tieba.baidu.com/p/3367992763
http://c.tieba.baidu.com/p/3367997120
http://c.tieba.baidu.com/p/3367992268
http://c.tieba.baidu.com/p/3367986507
http://c.tieba.baidu.com/p/3367985812
http://c.tieba.baidu.com/p/3367978950
http://c.tieba.baidu.com/p/3367978305
http://c.tieba.baidu.com/p/3383733822
http://c.tieba.baidu.com/p/3383737270
http://c.tieba.baidu.com/p/3383739865
http://c.tieba.baidu.com/p/3383741889
http://c.tieba.baidu.com/p/3383743520
http://c.tieba.baidu.com/p/3383745194
http://c.tieba.baidu.com/p/3383746988
http://c.tieba.baidu.com/p/3383755871
http://c.tieba.baidu.com/p/3383757091
http://c.tieba.baidu.com/p/3383759567
http://c.tieba.baidu.com/p/3383772559
http://c.tieba.baidu.com/p/3383775234
http://c.tieba.baidu.com/p/3383778266
http://c.tieba.baidu.com/p/3383779644
http://c.tieba.baidu.com/p/3383783363
http://c.tieba.baidu.com/p/3383787063
http://c.tieba.baidu.com/p/3383788071
http://c.tieba.baidu.com/p/3383820987
http://c.tieba.baidu.com/p/3383822083
http://c.tieba.baidu.com/p/3383835609
http://c.tieba.baidu.com/p/3383876267
http://c.tieba.baidu.com/p/3383878090
http://c.tieba.baidu.com/p/3383882587
http://c.tieba.baidu.com/p/3383887537
http://c.tieba.baidu.com/p/3383890270
http://c.tieba.baidu.com/p/3384426094
http://c.tieba.baidu.com/p/3384436587
http://c.tieba.baidu.com/p/3384440506
http://c.tieba.baidu.com/p/3384487758
http://c.tieba.baidu.com/p/3384492915
http://c.tieba.baidu.com/p/3384529711
http://c.tieba.baidu.com/p/3384639003
http://c.tieba.baidu.com/p/3385281060
http://c.tieba.baidu.com/p/3385378318
http://c.tieba.baidu.com/p/3385469596
http://c.tieba.baidu.com/p/3385515560
http://c.tieba.baidu.com/p/3385562494
http://c.tieba.baidu.com/p/3385857963
http://c.tieba.baidu.com/p/3361144327
http://c.tieba.baidu.com/p/3387202138
http://c.tieba.baidu.com/p/3387211053
http://c.tieba.baidu.com/p/3387215910
http://c.tieba.baidu.com/p/3387223791
http://c.tieba.baidu.com/p/3387229381
http://c.tieba.baidu.com/p/3387235592
http://c.tieba.baidu.com/p/3387242466
http://c.tieba.baidu.com/p/3387249728
http://c.tieba.baidu.com/p/3387254697
http://c.tieba.baidu.com/p/3387265297
http://c.tieba.baidu.com/p/3387270831
http://c.tieba.baidu.com/p/3387290027
http://c.tieba.baidu.com/p/3387299933
http://c.tieba.baidu.com/p/3387306047
http://c.tieba.baidu.com/p/3385335187
http://c.tieba.baidu.com/p/3385340711
http://c.tieba.baidu.com/p/3385342471
http://c.tieba.baidu.com/p/3385350783
http://c.tieba.baidu.com/p/3385354121
http://c.tieba.baidu.com/p/3382541750
http://c.tieba.baidu.com/p/3382537336
http://c.tieba.baidu.com/p/3382532943
http://c.tieba.baidu.com/p/3382528558
http://c.tieba.baidu.com/p/3382524206
http://c.tieba.baidu.com/p/3382519908
http://c.tieba.baidu.com/p/3382515619
http://c.tieba.baidu.com/p/3382510606
http://c.tieba.baidu.com/p/3382510606
http://c.tieba.baidu.com/p/3382504524
http://c.tieba.baidu.com/p/3382498894
http://c.tieba.baidu.com/p/3382494682
http://c.tieba.baidu.com/p/3382490345
http://c.tieba.baidu.com/p/3382461739
http://c.tieba.baidu.com/p/3382451160
http://c.tieba.baidu.com/p/3382438097
http://c.tieba.baidu.com/p/3382425138
http://c.tieba.baidu.com/p/3382425138
http://c.tieba.baidu.com/p/3382420917
http://c.tieba.baidu.com/p/3382416307
http://c.tieba.baidu.com/p/3382411934
http://c.tieba.baidu.com/p/3382407570
http://c.tieba.baidu.com/p/3382403284
http://c.tieba.baidu.com/p/3382398971
http://c.tieba.baidu.com/p/3382394866
http://c.tieba.baidu.com/p/3382390638
http://c.tieba.baidu.com/p/3382386544
http://c.tieba.baidu.com/p/3382382538
http://c.tieba.baidu.com/p/3382378599
http://c.tieba.baidu.com/p/3382374623
http://c.tieba.baidu.com/p/3382370615
http://c.tieba.baidu.com/p/3382367336
http://c.tieba.baidu.com/p/3382364528
http://c.tieba.baidu.com/p/3382356162
http://c.tieba.baidu.com/p/3382352717
http://c.tieba.baidu.com/p/3382352717
http://c.tieba.baidu.com/p/3382349009
http://c.tieba.baidu.com/p/3382345234
http://c.tieba.baidu.com/p/3382333901
http://c.tieba.baidu.com/p/3382303592
http://c.tieba.baidu.com/p/3382298642
http://c.tieba.baidu.com/p/3382293811
http://c.tieba.baidu.com/p/3382288919
http://c.tieba.baidu.com/p/3382283973
http://c.tieba.baidu.com/p/3382279057
http://c.tieba.baidu.com/p/3382274162
http://c.tieba.baidu.com/p/3382269259
http://c.tieba.baidu.com/p/3382264357
http://c.tieba.baidu.com/p/3382259490
http://c.tieba.baidu.com/p/3382254624
http://c.tieba.baidu.com/p/3382249656
http://c.tieba.baidu.com/p/3382244623
http://c.tieba.baidu.com/p/3382237271
http://c.tieba.baidu.com/p/3382230332
http://c.tieba.baidu.com/p/3382226145
http://c.tieba.baidu.com/p/3382216718
http://c.tieba.baidu.com/p/3382203031
http://c.tieba.baidu.com/p/3382182148
http://c.tieba.baidu.com/p/3382171603
http://c.tieba.baidu.com/p/3380241034
http://c.tieba.baidu.com/p/3380236520
http://c.tieba.baidu.com/p/3380231872

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。