2013-01-22 24 views
0

我每次使用WCF代理客戶端在VS 2010中,我得到至少3個錯誤信息:System.Net.Sockets.SocketException,System.ServiceModel.ClientBase和VS2010

A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.ServiceModel.dll 
A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.dll 
A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.dll 

我需要關心自己用這些?

+0

請提供消息和內部例外。 – gisek

回答

2

this SO post

第一次機會異常不是錯誤。這些通常會被捕獲,例如 。你應該忽略它們。

這裏的參考文獻how to disable these exceptions

+0

好的......但只有當你這麼說的時候:)順便說一句,我喜歡約翰·桑德斯的評論「你已經開始關注香腸是如何製作的,而你並不喜歡它。」非常準確。 – Darek

+0

哈哈很準確。希望他的帖子能夠舒適地引導你。 – Sam

+0

有趣的是,這個答案適用於數十甚至數百個關於SO和其他地方的問題。然而,由於SO的結構方式,結果一遍又一遍地被重寫,因爲這顯然不是重複的,所以人們不喜歡將它和親屬標記爲這樣。無論如何,謝謝你的回答@Sam –