如何将 NTLM 身份验证与 Perl 的 SOAP::Lite 模块集成? [英] How do I integrate NTLM authentication with Perl's SOAP::Lite module?
问题描述
此 Perl 代码适用于对 ASP.NET Web 服务的匿名访问,但是当打开集成安全性时,该服务会返回 401 错误.我想我需要将 NTLM 模块与 SOAP::Lite 结合使用,但不清楚如何这样做.如何集成这些组件?
This Perl code works with Anonymous access to an ASP.NET web service, but when integrated security is turned on, the service returns 401 errors. I think I need to use the NTLM module in conjunction with SOAP::Lite, but it's not clear how to do so. How can these components be integrated?
use SOAP::Lite;
use strict;
my $proxy = "http://localhost:28606/WebService.asmx";
my $method_name = "HelloWorld";
my $uri = "http://tempuri.org/";
my $methodAction = $uri . $method_name;
my $soap = SOAP::Lite
->uri( $uri )
->proxy( $proxy )
->on_action(sub{ $methodAction; });
my $method = SOAP::Data->name($method_name)->attr({xmlns=>$uri});
my $result = $soap->call($method);
print $result->result();
推荐答案
如果你这样做,你可以让 SOAP::Lite 打印一些调试输出:
You can get SOAP::Lite to print some debugging output if you do:
use SOAP::Lite +trace;
代替
use SOAP::Lite;
好的,我想我现在明白了.打开集成安全功能使 IIS 需要 NTLM 身份验证.在 perlmonks.org 上有一个 线程 似乎揭示了答案.
OK, I think I get it now. Turning on the integrated security feature makes IIS require NTLM authentication. There's a thread over at perlmonks.org that seems to reveal the answer.
这篇关于如何将 NTLM 身份验证与 Perl 的 SOAP::Lite 模块集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!