2009年2月9日 星期一

visual studio 2003 轉換到 2008 一些問題

1. Microsoft.Web.UI.WebControls.TreeView 運作不正確
請用 System.Web.UI.WebControls.TreeView 取代

visual studio debug 網路磁碟網站 出現錯誤訊息

1. 不支援在 Windows XP 平台的 UNC 共用上裝載... 因為已經到達網路 BIOS 命令限制...

用戶端上: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters
增加 REG_DWORD 項目: MaxCmds 並設定其值>=50

伺服端上:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
增加 REG_DWORD 項目: MaxMpxCt 並設定其值>=50


2. ASP.NET runtime error: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

Start > Control Panel > Administrative Tools > Microsoft .NET Framework 2.0 Configuration. After it fully loads (sometimes takes a bit), fully expand My Computer in the navigation tree and click Runtime Security Policy. In the right hand pane, choose Adjust Zone Security. Leave the default option (Make changes to this computer) and hit next. Choose Local Intranet and change the trust level to Full Trust.



以上設定完畢後必須重新啟動作業系統才會生效

2009年2月6日 星期五

visual studio 系統若使用到水晶報表時如何發佈到其他平台?

安裝visual studio 2008 時若同時安裝crystal report
則會將crystal report runtime 安裝程式放在底下的路徑
c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5\
選擇正確的檔案安裝在發佈平台上即可

Entity Framework 建立新物件並儲存後馬上取得關聯資料

使用 CreateProxy 建立物件,不要直接 new var newmodel = _contextXXX.CreateProxy<yyy>(); ... _contextXXX.yyy.Add(newmodel); await _contextXXX.SaveC...