「嘗試執行專案時發生錯誤:無法啟動程式....
這個應用程式無法啟動,因為應用程式組態不正確。...」

到事件檢視器--系統--中查看,「Generate Activation Context 因 C:\Inetpub\wwwroot\xxxxxxxx\mailMoiError\bin\Debug\mailMoiError.exe 失敗。
參照錯誤訊息 : 操作順利完成。」
從這此訊息真的看不出錯在哪裡!
App.Config存成Big5內碼,其 encoding="Big5" ,在 VS2008 看起來一很正常!

如果存成 Big5內碼,但 encoding="utf-8" ,則看到中文字變亂碼了!

最後,將 App.Config 又改回 utf-8存檔,讀取資料來源(Big5內碼之文字檔),則指定
StreamReader stmRdr = new StreamReader(FileName, Encoding.GetEncoding("Big5"));
讓程式改以 Utf 來處理!
沒有留言:
張貼留言