2014-03-28 51 views
1

我剛開始ASP.NET MVC開發,現在已經過了幾年的ASP.NET WebForms。 遵循一個簡單的教程,我開發了一個HelloWorld ASP.NET MVC網站,並使用Visual Studio 2012部署工具部署到FileSystem:從我的IIS訪問它沒有問題。 我嘗試了FTP部署到我的Internet服務提供商(我只是FTP複製了由VisualStudio製作的FileSystem部署中包含的文件和文件夾)。如果我嘗試訪問由ISP託管的同一網站,則會出現以下錯誤:部署後的ASP.NET MVC錯誤

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的信任問題?

預先感謝您

+0

做你的ISP提供的.NET MVC託管?請記住,並不是所有的.NET託管站點都這樣做。 – Bardo

+0

據我所知,它應該。這是aruba.it和谷歌搜索,我發現其他人使用ASP.NET MVC和Aruba作爲ISP。 – user1737538

+0

看看是否安裝了MVC ... http://stackoverflow.com/questions/2111936/how-do-i-see-which-version-of-mvc-is-installed –

回答

0

嘗試的

<div>@ViewBag.Message</div> 

代替

<div>@Me.ViewBag.Message</div>