调用webservice接口 怎么去掉账号密码验证

2025-05-08 15:04:34

1、如果发布的webservice接口,需要账号密码验证,我们改下其代码即可。

调用webservice接口 怎么去掉账号密码验证

3、 //若要允许使用ASP.NETAJAX从脚本中调用此Web服务,请取消对下行的注释。//[System.Web.Script.Services.ScriptService]publicclassService1:System.Web.Services.WebService{[WebMethod]publicstringHelloWorld(){return"HelloWorld";}

调用webservice接口 怎么去掉账号密码验证

5、 SqlDataAdaptersda=newSqlDataAdapter(sql,GetConn());DataTabledt=荏鱿胫协newDataTable();sda.Fill(dt);returndt;}publicvoidDBExcute(stringsql){SqlConnectionconn=GetConn();conn.Open();try{SqlCommandcomm=newSqlCommand(sql,conn);comm.ExecuteNonQuery();}catch{}conn.Close();}}}

调用webservice接口 怎么去掉账号密码验证
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢