2015年9月10日 星期四

excel com 元件存取檔案在 iis 中如何成功

1. 應用程式集區設為 localsystem <= 避免權限不足無法使用元件
2. C:\Windows\System32\config\systemprofile\ 新增目錄 desktop <= 避免無法存取excel檔案

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

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