小新二三事 二三事 電視精/戲院 ASP .NET 新手工作日誌
顯示包含「Warning」標籤的文章。顯示所有文章
顯示包含「Warning」標籤的文章。顯示所有文章

2009年9月13日星期日

ASP.NET Warning: 具有潛在危險 Request.Form 的值已從用戶端偵測到 (2)

ASP.NET Warning: 具有潛在危險 Request.Form 的值已從用戶端偵測到 (2)

又中
http://hk-siusun.blogspot.com/2009/07/aspnet-warning-requestform.html

2009年7月11日星期六

ASP.NET Warning: 具有潛在危險 Request.Form 的值已從用戶端偵測到

ASP.NET Warning: 具有潛在危險 Request.Form 的值已從用戶端偵測到

具有潛在危險 Request.Form 的值已從用戶端偵測到

若是出現這樣的錯誤訊息,代表頁面上有文字內容是包含Html這類的語法,通常在使用一些Html的編輯器(留言板、討論區之類常用)做資料送出的動作的時候會發生。

解決辦法如下:

在頁面的Page指示語加入 validateRequest="false"


http://blog.blueshop.com.tw/greenwings/archive/2007/02/22/49690.aspx

ASP.NET Warning: 並未將物件參考設定為物件的執行個體

ASP.NET Warning: 並未將物件參考設定為物件的執行個體

System.NullReferenceException:
並未將物件參考設定為物件的執行個體

通常...這種錯誤就是
"使用了某種物件, 但卻未宣告"
朝這個方向去找吧, 仔細檢查一下程式裡面有沒有哪裡有這樣的情形
該用new 沒有new

如果用的是vs.net2003...
那這個錯誤下中斷點,瞬間就能找出

2009年7月10日星期五

ASP.NET Warning: Cannot insert explicit value for identity column in table 'Table' when IDENTITY_INSERT is set to OFF

ASP.NET Warning: Cannot insert explicit value for identity column in table 'Table' when IDENTITY_INSERT is set to OFF

Things to check

1. Set table id as (Is Identity) to Yes
1a. Set table id as (Primary Key)

2. Make a new SqlDataSource with INSERT command
Coz after you change table id, SqlDataSource will not be updated auto.

3. Check the INSERT command with original SqlDataSource
Should have difference