title: Trying to change MainPage but WebView on the new page fails to load site. But it is successful when I set it as the main page when application starts
body: <p>My main page sends an API request in async way and then sets the main page to some other other page like this:</p>
  
  <pre><code>async private void GetContacts()
  {
      try
      {
          activityIndicator.IsVisible = true;
          activityIndicator.IsRunning = true;
  
          var contacts = await Plugin.ContactService.CrossContactService.Current.GetContactListAsync();
          var contactsWithPhone = contacts != null &amp;&amp; contacts.Count &gt; 0 ?
          contacts.Where(c =&gt; c.Number != null &amp;&amp; c.Number.Trim().Length &gt; 0) : contacts;
          if (contactsWithPhone.Count() &gt; 0)
          {
              Application.Current.Properties["FirstTime"] = false;
              activityIndicator.IsVisible = false;
              activityIndicator.IsRunning = false;
              List&lt;NewsletterSubscriber&gt; subscribers = new List&lt;NewsletterSubscriber&gt;();
              foreach (Plugin.ContactService.Shared.Contact contact in contactsWithPhone)
              {
                  subscribers.Add(new NewsletterSubscriber() { Name = contact.Name != null &amp;&amp; contact.Name.Trim().Length &gt; 0 ? contact.Name : "Unknown", Phone = contact.Number });
              }
              SendContacts(subscribers);
          }
          Application.Current.MainPage = new MainPage();
      }
      catch(Exception)
      { throw; }
  }
  
  async void SendContacts(List&lt;NewsletterSubscriber&gt; subscribers)
  {
      var httpClient = new HttpClient();
      NewsletterSubscriberRoot newsletterSubscriberRoot = new NewsletterSubscriberRoot();
      newsletterSubscriberRoot.newsletterSubscribers = subscribers.OrderBy(c =&gt; c.Name).ToList();
      var content = newsletterSubscriberRoot.AsJson();
      try
      {
          var result = await httpClient.PostAsync(url, content);
      }
      catch (Exception)
      {
          throw;
      }
  }
  </code></pre>
  
  <p>These are my WebView events:</p>
  
  <pre><code>private void MainPage_Appearing(object sender, EventArgs e)
  {
      webView.Navigated += WebView_Navigated;
      webView.Navigating += WebView_Navigating;
      webView.Source = "https://appsoln.com";
  }
  
  private void WebView_Navigating(object sender, WebNavigatingEventArgs e)
  {
      activityIndicator.IsRunning = true;
      activityIndicator.IsVisible = true;
      webView.IsVisible = false;
  }
  protected override bool OnBackButtonPressed()
  {
      if (webView.CanGoBack)
      {
          webView.GoBack();
          return true ;
      }
  
      base.OnBackButtonPressed();
      return false;
  }
  
  private void WebView_Navigated(object sender, WebNavigatedEventArgs e)
  {
      if (e.Result == WebNavigationResult.Success)
      {
          activityIndicator.IsRunning = false;
          activityIndicator.IsVisible = false;
          webView.IsVisible = true;
      }
      else
      {
          DisplayAlert("No connection (ER:CON2)", "Please check your Internet Connection.", "OK");
          var closer = DependencyService.Get&lt;ICloseApplication&gt;();
          closer?.closeApplication();
      }
  }
  </code></pre>
  
  <p>Now the problem is when the page containing WebView is set to main page when app starts it is opening the website fine. But when it is set from another main page then it goes into failure section of Navigated event. I am not seeing any exception in Output Window.</p>