Logging to Sharepoint on Premises using C# from Visual Studio Word Addon


Please help. We have Sharepoint on premises 2016. My user is domain user. So I can go there by the web. But I am trying to connect via C#. My code is:

ClientContext context = new ClientContext("https://something.something/prok/Shared%20Documents");  ICredentials credentials = System.Net.CredentialCache.DefaultNetworkCredentials; // orCredentialCache.DefaultCredentials context.Credentials = credentials; System.Net.NetworkCredential("vladislav.zautin", passWord);          context.AuthenticationMode = ClientAuthenticationMode.Default;                 Web web = context.Web;                 context.Load(web);                 context.ExecuteQuery();                 Label label1 = new Label();                 label1.Text = web.Title; 

But I ceep getting error:

System.Net.WebException   HResult=0x80131509   Message=The remote server returned an error: (403) Forbidden. System.Net.WebException: 'The remote server returned an error: (403) Forbidden.'   Source=<Cannot evaluate the exception source>   StackTrace: <Cannot evaluate the exception stack trace>  

Our server has two types of login: 1. AD (which I am trying to use by default login) 2. Security token service.