views:

180

answers:

1

In a typical (professional) environment you would expect MOSS to reside on a domain

so this code is used to create the credentials to a web service method :

dwsService.Credentials = new NetworkCredential("Tanveer", "Test", "MyDomain");

Anyone have any experience when MOSS does not reside on a domain? How then can you pass a local admin account through to the credentials?

+2  A: 

NetworkCredential has a second contructor without a domain parameter:

NetworkCredential networkCredential = new NetworkCredential("userName", "password");

Also, you can provide the server name as the domain parameter:

NetworkCredential secondNetworkCredential = new NetworkCredential("userName", "password", "serverName");
Sérgio Costa