WPF Web browser control, page loading issue, when Window has TopMost and program running under auto elevated permission

Sachin Jose 61 Reputation points
2022-02-14T12:17:25.79+00:00

Condition:

  • WPF Application with Window contains System.Windows.Forms.WebBrowser has TopMost=true setted, in code or XAML.
  • Program has uiAccess="true" flag in manifest file.
  • Code sign program.
  • Start program from subfolders of 'c:\program files'

I tried the above conditions in a test application, and it seems like navigation is not happening here. If the TopMost property is false, navigation occur.

Is this a base issue ? Any suggestions ?

Developer technologies Windows Presentation Foundation
Windows development Windows API - Win32
Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. Hui Liu-MSFT 48,676 Reputation points Microsoft External Staff
    2022-02-16T06:45:18.037+00:00

    If your problem is the same as mine, you can try the following steps to see if it works.

    1. Right Click on Visual Studio> Open File Location. 174716-image.png
    2. Right Click on Visual Studio Shortcut > Select Troubleshoot compatibility. 174758-image.png
    3. Select Troubleshoot Program. 174811-image.png
    4. Check The program requires additional permissions. 174796-image.png
    5. Click on Test the program. 174740-image.png
    6. Wait for a moment till the program starts.
    7. Click Next.
    8. Select “Yes, save these settings for this program”. 174821-image.png
    9. Wait for resolving the issue.
    10. Make sure the final status is fixed. 174759-image.png
    11. Click Close.

    If the response is helpful, please click "Accept Answer" and upvote it. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.