Hi @Ankita,
This issue seems to be caused by WebBrowser control(it renders pages in compatibility mode by default - IE). See if adding this tag to the header works => <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
.
Also, please check if this document: Controlling WebBrowser Control Compatibility helps.
There are also some methods to suppress this error, for example => adding webBrowser.ScriptErrorsSuppressed=true;
.
Perhaps you can consider using other control like WebView2.
BTW, on my side, the script error appeared no matter using <link href="/resources/sample.css" rel="stylesheet" /> or using <link href="http://localhost:XXXX/resources/sample.css" rel="stylesheet" />.
Sincerely,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.