Im trying to close an internet explorer window using a dll file in C#.
The attempt is successful if run it in my local pc but if i use the dll in my website im getting this error: Attached the exact error msg from IISRetrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error.
This is my function to close the window
    public void CloseExistingEvar()
    {
        SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows();
        string filename;
        foreach (SHDocVw.InternetExplorer ie in shellWindows)
    {
        filename = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
        if (filename.Equals("iexplore"))
        {
            string[] urlParts = (ie.LocationURL.ToString()).Split('/');
            if (urlParts.Contains("E_VAR"))
            {
                ie.Quit();
            }
        }
    }
}
I dont know how to get the process identity of the IIS7.5 and give permission to this process.
 
    