鏈接像這樣危險的Request的錯誤我保存在數據庫(Table.Field = Business.GoogleMap)從GoogleMap的:谷歌地圖嵌入的鏈接導致MVC 3.0
http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=22,+Cholul,+Yucat%C3%A1n,+M%C3%A9xico&aq=0&sll=21.029046,-89.634623&sspn=0.024395,0.033045&ie=UTF8&hq=&hnear=22,+Cholul,+Yucat%C3%A1n,+Mexico&ll=21.040207,-89.558401&spn=0.048465,0.06609&z=14&iwloc=A
然後,在我看來,我用它以這樣的方式
<iframe width="940" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
src="@Html.Raw(Model.Business.GoogleMap)">
</iframe>
然後我得到的錯誤:
A potentially dangerous Request.Path value was detected from the client (&).
我已經嘗試了 「驗證」 的修復,增加[ValidateInput(false)]
到控制器,甚至將<httpRuntime requestValidationMode="2.0" />
添加到web.config,但仍然存在錯誤。
感謝您的提示。我發現這個問題,錯誤只是當鏈接是空的!當它實際上有一個網址時,它顯示正常。是的,那很愚蠢,對不起,謝謝你的時間。 – Nestor 2011-02-04 08:13:33