在ASP.NET WebForms工作了几年之后,我现在开始进行ASP.NET MVC开发。在一个简单的教程之后,我开发了一个HelloWorld IIS网站,并使用Visual Studio2012部署工具部署到FileSystem :从我的IIS访问它没有问题。然后,我尝试通过FTP部署到我的互联网服务提供商(我只是通过FTP复制了VisualStudio的FileSystem部署中包含的文件和文件夹)。如果我尝试访问ISP托管的同一站点,则会收到以下错误:
Exception Details: System.TypeAccessException: Attempt by method 'DynamicClass.CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object)' to access type 'System.Runtime.CompilerServices.CallSite`1<Microsoft.VisualBasic.CompilerServices.IDOUtils+SiteDelegate0>' failed.
Source Error:
Line 4:  
Line 5:  <h2>Indewx</h2>
Line 6:  <div>@Me.ViewBag.Message</div>
Source File: D:\Inetpub\webs\pgsoftwareit\Views\Home\Index.vbhtml    Line: 6 有什么建议吗?web.config中是否有要调优的参数?或者ISP的信任问题?
提前谢谢你
发布于 2015-12-05 06:26:26
试一试
<div>@ViewBag.Message</div>而不是
<div>@Me.ViewBag.Message</div>https://stackoverflow.com/questions/22711796
复制相似问题