开发者

Sharepoint: How to connect to a web service (MOSS Server not on a Domain)

开发者 https://www.devze.com 2022-12-10 21:56 出处:网络
In a typical (prof开发者_开发技巧essional) environment you would expect MOSS to reside on a domain

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");
0

精彩评论

暂无评论...
验证码 换一张
取 消