0

I want to check either user already install the chrome extension or not. Use code below directly check their chrome's extension, which I not sure it's possible or not.

I get this error with HttpBrowserCapabilities.

Error: The type or namespace name HttpBrowserCapabilities does not exist in the namespace 'System.Web'

using System;
using System.Web;


namespace chromeCheck
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Web.HttpBrowserCapabilities browser = Request.Browser;
            if (browser.Browser == "chrome")
            {
                //check for extension alert user if not found the extension
            }
        }
    }
}
TheSmith1222
  • 345
  • 1
  • 4
  • 11
Demodev
  • 94
  • 10
  • Due to various security concerns, even inside Chrome itself websites should not be able to detect if you have specific extension enabled, let alone an external C# program. Can you expand on why you require this functionality? Maybe there are other approaches to this. – pevecg Jul 26 '22 at 07:50
  • I have a c# app working with a chrome extension. The chrome extension is required to get the desired output in the respective c# app. Therefore, it is necessary to know whether the chrome extension has been installed through the c# app. – Demodev Jul 26 '22 at 08:07
  • How do the C# app and the extension communicate? Are you able to use that communication to check if the extension is running? Aka, lack of communication means extension isn't working – pevecg Jul 26 '22 at 09:03
  • The c# app and the chrome extension communicate through webSocket. – Demodev Jul 26 '22 at 09:20
  • Okay, I did a little bit more of research, you have two options really: 1. If there is no webSocket communication there is either no extension installed, or browser isnt launched ( asuming that the C# app is the webSocket server ). 2. Using C#, check for extensions in the Chrome AppData https://stackoverflow.com/questions/14543896/where-does-chrome-store-extensions – pevecg Jul 26 '22 at 09:25
  • Ok.Through the first option you mentioned, I can try to get a response from this extension to the c# app and check the relevant condition through that, right? – Demodev Jul 26 '22 at 09:33

0 Answers0