简体   繁体   中英

RestSharp issues integrating with zscaler product will not work on IIS Server 2012 R2

Our organization is removing our proxy web servers and integrating Zscalar. We were informed that all we had to do is remove the proxy property/settings. So I have removed the proxy setting from my code and it seems to work fine locally but it will not work on our server. Is there something I am missing here? We are also using RestSharp 105.2.30

Dim js As New System.Web.Script.Serialization.JavaScriptSerializer
Dim utils As New Utilities.Common
Dim rc As RestSharp.RestClient
rc = New RestSharp.RestClient("https://www.someendpointurl")
Dim rr As New RestSharp.RestRequest(RestSharp.Method.POST)
rr.AddHeader("Authorization", "Basic " & RetrieveTokens("MSIC"))
Dim rs As New RestSharp.RestResponse()
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
rs = rc.Execute(rr)
dctValues = js.Deserialize(Of Dictionary(Of String, String))(rs.Content)


After hours of trouble-shooting, turns out in this case it was not a code issue. It was a inte.net and firewall connection issue on the server. So the code above is valid and works grea

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM