C# windows phone 8.1 webview terminate my app RRS feed

  • Question

  • I'm using C# and Windows Phone 8.1 (as Universal). I have a WebView by this code:

            <WebView x:Name="webView"          HorizontalAlignment="Stretch"         VerticalAlignment="Stretch"         ScrollViewer.ZoomMode="Disabled"         ScrollViewer.VerticalScrollBarVisibility="Disabled"/>

    I Load HTML String or URI but when I scroll or tap on WebView it is terminate my Application:s.

    What is the problem? How can I fix this?
    Sunday, March 15, 2015 8:35 AM

All replies

  • Your app is crashing because you are generating an exception when you load the content into the WebView.  I would put a breakpoint in the app.xaml.cs unhandled exception event to see what the error is.
    Sunday, March 15, 2015 12:40 PM
  • Please explain me, how can I do that(creating a breakpoint )?
    • Edited by Nnnas Sunday, March 15, 2015 1:46 PM
    Sunday, March 15, 2015 1:45 PM
  • Thanks again, I set this code on app.xaml.cs:

            public App()
                this.Suspending += this.OnSuspending;
                this.UnhandledException += App_UnhandledException;
            void App_UnhandledException(object sender, UnhandledExceptionEventArgs e)
                Debug.WriteLine("e.Exception.Source >>>>" + e.Exception.Source +"\r\n\r\n\r\n\r\n");
                Debug.WriteLine("e.Exception.Message  >>>" + e.Exception.Message);
                Debug.WriteLine("e.Message >>>" +e.Message);

    but nothings changed. it can't show exceptions. when application terminates, Visual Studio is still running and it think my application debugger is still running too.

    Please help.

    Sunday, March 15, 2015 6:28 PM
  • Hi

    If you are not able to see the exceptions. GO to the debug menu, Exceptions

    Check the First 2 of the check box managed one.

    Run the app just see the crash.


    Varun Ravindranath Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you.

    Monday, March 16, 2015 5:45 AM