In a typical (prof开发者_开发技巧essional) 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?
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");
精彩评论