Screenshare error -Cannot create a file when that file already exists

-1

I am using below code to share screen.

namespace host
{
    public partial class Form1 : Form
    {
        RDPSession x = new RDPSession();
       
        private void button1_Click(object sender, EventArgs e)
        {
            x.OnAttendeeConnected += Incoming;
            x.Open();
        }
               
    }
}

In Windows 7 pc randomly i will get the below error for code line RDPSession x = new RDPSession() on screen share.

Error:

Creating an instance of the COM component with CLSID {9B78F0E6-3E05-4A5B-B2E8-E743A8956B65} from the IClassFactory failed due to the following error: 800700b7 Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7).

What is the Reason and how to solve this error?

c#
asked on Stack Overflow Oct 7, 2020 by IT researcher

1 Answer

0

When you are done with RDPSession, close the connection using "Disconnect()" function. See if this resolves the issue for you.

answered on Stack Overflow Oct 7, 2020 by Riyas

User contributions licensed under CC BY-SA 3.0