Try this:
CredentialCache cc = new CredentialCache();
cc.Add(
new Uri("http://intranet/"),
"NTLM",
new NetworkCredential("username", "pass", "domain"));
client.Credentials = cc;
More Related Contents:
- “No Overload Method for GetLine” Help (C#) [closed]
- Elevating process privilege programmatically?
- How do I start a process from C#?
- How to shut down the computer from C#
- Detect Windows version in .NET
- How can I run another application within a panel of my C# program?
- Finding the default application for opening a particular file type on Windows
- How do I get the title of the current active window using c#?
- Check for device change (add/remove) events
- How do I disable a system device programmatically?
- Creating a temporary directory in Windows?
- Write to Windows Application Event Log without event source registration
- In .NET/C# test if process has administrative privileges
- How to render a WPF UserControl to a bitmap without creating a window
- Wrap C# application in .msi installer
- How to programmatically discover mapped network drives on system and their server names?
- How do I get a list of installed updates and hotfixes?
- How do I determine the true pixel size of my Monitor in .NET?
- C# – How to detect a Windows shutdown/logoff and cancel that action (after asking the user)
- Change Language in C#
- Return to an already open application when a user tries to open a new instance
- How to write an image from byte[] into MS WORD using C# Windows application
- Is .NET 4.0 Compatible with Windows XP SP2 or below? [closed]
- Uninstall Custom Action Not Deleting Registry Key
- How can I detect when Windows 10 enters tablet mode in a Windows Forms application?
- Why does “\n” give a new line on Windows?
- Memory limitations in a 64-bit .Net application?
- Send message to a Windows process (not its main window)
- .NET Simulate Ctrl+Alt+Del Sendkeys
- What does “Beta: Use Unicode UTF-8 for worldwide language support” actually do?