"HttpSendRequest" failed, Windows error code=

loadrunner跑场景时,会出现"HttpSendRequest" failed, Windows error code的错误,这个错误的出现有两个原因1.响应时间过长2.勾选了Run-time settings->Internet protocol->preferences->Winlnet replay instead of Sockets选项

第一种原因网上有很多解决方案可以随便百度

第二种原因是因为LR sockets默认SSL的版本为SSL2和SSL3。当录制https时,如果SSL版本不一致,就会使sockets端口连接失败,被服务器拒绝连接,因此为使回放成功,很多人会勾选“winlnet replay instead of sockets(windows only)”。而这个勾选,也就是造成后面报错的罪魁祸首。"HttpSendRequest" failed, Windows error code=

 解决方法

在脚本中含有https的前边添加web_set_sockets_option("SSL_VERSION","TLS");方法

不勾选Winlnet replay instead of Sockets选项