'WindowsApp1.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\spduvvur\source\repos\WindowsApp1\WindowsApp1\bin\x86\Debug\WindowsApp1.exe'. Symbols loaded. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Users\spduvvur\source\repos\WindowsApp1\WindowsApp1\bin\x86\Debug\Microsoft.Toolkit.Forms.UI.Controls.WebView.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\system32\WinMetadata\Windows.Foundation.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\system32\WinMetadata\Windows.Web.winmd'. Module was built without symbols. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.WindowsRuntime\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.WindowsRuntime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'WindowsApp1.exe' (CLR v4.0.30319: WindowsApp1.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices.WindowsRuntime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.WindowsRuntime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. The thread 0x55c0 has exited with code 0 (0x0). The thread 0x53f8 has exited with code 0 (0x0). An unhandled exception of type 'System.InvalidOperationException' occurred in WindowsApp1.exe An error occurred creating the form. See Exception.InnerException for details. The error is: The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed. (Exception from HRESULT: 0x80010007 (RPC_E_SERVER_DIED)) The thread 0x4a1c has exited with code 0 (0x0). The thread 0x5640 has exited with code 0 (0x0). Unhandled Exception: System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details. The error is: The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed. (Exception from HRESULT: 0x80010007 (RPC_E_SERVER_DIED)) ---> System.Exception: The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed. (Exception from HRESULT: 0x80010007 (RPC_E_SERVER_DIED)) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlProcess.<CreateWebViewControlHostAsync>d__16.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Toolkit.Forms.UI.Controls.WebViewControlProcessExtensions.CreateWebViewControlHost(WebViewControlProcess process, IntPtr hostWindowHandle, Rectangle bounds) at Microsoft.Toolkit.Forms.UI.Controls.WebView.Initialize() at Microsoft.Toolkit.Forms.UI.Controls.WebView.System.ComponentModel.ISupportInitialize.EndInit() at Microsoft.Toolkit.Forms.UI.Controls.WebViewCompatibilityAdapter.Initialize() at Microsoft.Toolkit.Forms.UI.Controls.WebViewCompatible..ctor() at WindowsApp1.Form1.InitializeComponent() in C:\Users\source\repos\WindowsApp1\WindowsApp1\Form1.Designer.vb:line 26 at WindowsApp1.Form1..ctor() --- End of inner exception stack trace --- at WindowsApp1.My.MyProject.MyForms.Create__Instance__[T](T Instance) in :line 190 at WindowsApp1.My.MyProject.MyForms.get_Form1() at WindowsApp1.My.MyApplication.OnCreateMainForm() in C:\Users\source\repos\WindowsApp1\WindowsApp1\My Project\Application.Designer.vb:line 35 at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at WindowsApp1.My.MyApplication.Main(String[] Args) in :line 81 The program '[11836] WindowsApp1.exe' has exited with code 0 (0x0). The program '[11836] WindowsApp1.exe: Program Trace' has exited with code 0 (0x0).
rjmurillo commented on 16 Jun 2019:... there is a limitation of the web view where it cannot run under admin mode--there is a system process that runs that would enable any code executing within the web view to also run as administrator and have some system level permissions.
rjmurillo commented on 17 Jun 2019:... The WebBrowser and WebView controls use different engines. Web Browser uses Trident (Internet Explorer) while Web View uses EdgeHTML (Edge). If you open your web page in each of those browsers, you should be able to see the differences as you mention. There is also some documentation about how to debug the web view control using the F12 tools in the documentation.
MSDN wrote:WebView browser The WebBrower.ObjectForScripting property and WebView.AddWebAllowedObject(String, Object) are not supported. Instead, use the WebViewControl.InvokeScriptAsync method.You can't programmatically navigate by using a new window.You can't programmatically navigate to a specific frame.You can't programmatically print information from a WebView control.There's no way to programmatically refresh content with cache validation. By default, pages refresh without cache validation by sending a "Pragma:no-cache" header to the server.
WebBrower.ObjectForScripting
WebView.AddWebAllowedObject(String, Object)
WebViewControl.InvokeScriptAsync
The WebBrowser and WebView controls use different engines. Web Browser uses Trident (Internet Explorer) while Web View uses EdgeHTML (Edge). If you open your web page in each of those browsers, you should be able to see the differences as you mention. There is also some documentation about how to debug the web view control using the F12 tools in the documentation.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)