JS 调用webservice工具问题

在运行时遇到错误:请求HTTP状态401 失败:Unauthorized

:Status:ProtocolError

解决办法:

在form1代码try块中增加如下代码即可:

CrmAuthenticationToken token = new CrmAuthenticationToken();

token.AuthenticationType = 0;
token.OrganizationName = "AdventureWorksCycle";//修改组织名称
service.CrmAuthenticationTokenValue = token;


 

 

posted @ 2009-04-20 16:25  wendy-丽  阅读(165)  评论(0编辑  收藏  举报