我正在从应用程序中调用3rd api,它在开发环境中运行良好,但是当我将其托管在具有SSL认证的服务器上时,则会抛出403错误。 在使用ssl的本地主机应用程序中执行相同的操作,在坚果壳中执行api则无效;如果在应用程序中安装认证,则api无效。
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://ccc.xxxx.com/_c/std/api/test.aspx?clientID=545444&pwd=ccccccxxxxxx&QueryID=757575&QueryType=X&version=1");
request.KeepAlive = true;
request.ProtocolVersion = HttpVersion.Version10;
request.Method = "POST";
request.ContentType = "application/xml";
request.UserAgent = ".NET Framework Test Client";
request.Accept = "application/xml";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
我错过了一些东西或与此相关的任何建议。
谢谢