2014-03-18 43 views
-1

我得到這個例外,但不能似乎找到我的問題:變得異常System.Net.Http.HttpRequestException

A first chance exception of type 'System.Net.Http.HttpRequestException' occurred in System.Net.Http.dll 

我登錄用戶名和密碼的服務器,並且過程是工作就好了。

繼承人我的代碼:

protected override void OnNavigatedTo(NavigationEventArgs e) 
{ 
    teamScreen = "https://thewebsite.com/teambeta/Login.aspx?" + "username=" + 
     logInUserIdString + "&password=" + logInPasswordString + 
     "&mobile=1&offsetHours=" + timezone; 
    webView1.Navigate(targetUri); 
} 

,但我不希望提交一個應用程序商店有沒有解決的問題。

有誰知道這個問題是什麼,因爲我似乎無法追查爲什麼我得到異常?謝謝。

+0

你能檢查你的異常是否有內部異常集? – ryudice

回答

0

仍然沒有解決,但我沒有解決以下問題,因爲我沒有正確設置Uri。

下面是正確的代碼:

protected override void OnNavigatedTo(NavigationEventArgs e) 
{ 
    teamScreen = "https://thewebsite.com/teambeta/Login.aspx?" + "username=" + 
     logInUserIdString + "&password=" + logInPasswordString + 
     "&mobile=1&offsetHours=" + timezone; 
    Uri targetUri = new Uri(teamScreen); 
    webView1.Navigate(targetUri); 
} 

不知道爲什麼它實際上是我從來沒有設置URI工作過。很奇怪,但仍然出現錯誤。