如何使用C#在运行时提供凭据连接到Windows Server

问题描述:

我面临控制台应用程序使用visual studio 2010连接到Windows服务器的问题我在运行时提供了凭据但是它给出了异常

用户没有足够的权限来执行操作。

i am facing problem with console application to connect to windows server using visual studio 2010 i have provided credentials at run time but it is giving exception
The user does not have sufficient permission to perform the operation.