0

I am new to sharepoint and trying to learn CSOM. I have written a simple code in a console application using VS 2012 to get list details from a sharepoint 2013 site:

        static void Main(string[] args)
        {
            NetworkCredential credentials = new NetworkCredential("xxxx", "xxxx", "xxxx");
            ClientContext context = new ClientContext("http://xxxxxxxxxx-vm2:6667/");
            context.Credentials = credentials;
            List list = context.Web.Lists.GetByTitle("SchoolsList");
            context.Load(list);
            context.ExecuteQuery();

            Console.ReadLine();
        }

On context.ExecuteQuery(); I am getting an error: An attempt was made to access a socket in a way forbidden by its access permissions xxx.xx.xx.xx:6667 enter image description here Could someone please let me know what I am doing wrong here?

Indie.Dev
  • 134
  • 1
  • 12

1 Answers1

0

Check that firewall/antivirus doesn't block this address or port

ovolko
  • 2,777
  • 2
  • 21
  • 26