アプリケーションでをオーバーライドしようとしていますがDateTime.MinValue
、それを実行することで、Webサービスがタイムアウトしていることに気付きました。以下はサンプルコードです。何が間違っているのか/何が欠けているのかわからない。
public MainWindow()
{
//Introducing this.. Causes timeout of the webservice call...
typeof(DateTime).GetField("MinValue").SetValue(typeof(DateTime),new DateTime(1900, 1, 1));
var yesitworks= DateTime.MinValue;
InitializeComponent();
ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
//Below call will timeout...
var value =client.GetData(10);
}
PS:これは私たちが解決しようとしていることに対する最善の解決策ではないかもしれませんが、なぜそれが機能しないのかについての好奇心が高まっていますか?それはどのように関連していますか。