WebService returns the entire HTML code when <sessionstate mode="InProc" ...="" />
-
Hi, I have a web service that is being accessed by Perl scripts using SOAP::Lite. Simple code below:
use SOAP::Lite;
my $soap = SOAP::Lite
-> uri('http://tempuri.org')
-> on_action( sub { join '/', 'http://tempuri.org', $_[1] } )
-> proxy('http://localhost:8080/TestApp/WebService1.asmx');$soap->deserializer(SOAP::Custom::XML::Deserializer->new);
print $soap->HelloWorld()->result;
Now, if I run this script, as you may have guessed already... I should get the output:
Hello World
This is correct if my
<sessionState mode="Off" ...>
, however, if I set it to<sessionState mode="InProc" ...>
, I am getting the entire HTML file that is the same as right-clicking and viewing the source of the .asmx page when you open it via a web browser:mismatched tag at line 61, column 16, byte 2939 at C:/Perl/lib/XML/Parser.pm line 187
...
WebService1 Web Service <p class="heading1">WebService1</p><br> <span> <p class="intro">The following operations are supported. For a formal definition, please review the <a href="WebService1.asmx?WSDL">Service Description</a>. </p>
...
<a href="WebService1.asmx?op=HelloWorld">HelloWorld</a>
...
at WSTestUsingPerl.pl line 10
Does anyone know what I can do? Of course the actual web service I have is more complex than this, I just tried adding a new .asmx file to my solution and tried to find out where in the web.config is the problem, and I found this error. Note that the web services will work when I create a new .net app and consume this web service, or simply run the web methods via the browser. But when I use SOAP::Lite it won't (and so I assume that there might be other scripts that get the same error). Thank you in advance for your help.
Rafferty
-
Hi, I have a web service that is being accessed by Perl scripts using SOAP::Lite. Simple code below:
use SOAP::Lite;
my $soap = SOAP::Lite
-> uri('http://tempuri.org')
-> on_action( sub { join '/', 'http://tempuri.org', $_[1] } )
-> proxy('http://localhost:8080/TestApp/WebService1.asmx');$soap->deserializer(SOAP::Custom::XML::Deserializer->new);
print $soap->HelloWorld()->result;
Now, if I run this script, as you may have guessed already... I should get the output:
Hello World
This is correct if my
<sessionState mode="Off" ...>
, however, if I set it to<sessionState mode="InProc" ...>
, I am getting the entire HTML file that is the same as right-clicking and viewing the source of the .asmx page when you open it via a web browser:mismatched tag at line 61, column 16, byte 2939 at C:/Perl/lib/XML/Parser.pm line 187
...
WebService1 Web Service <p class="heading1">WebService1</p><br> <span> <p class="intro">The following operations are supported. For a formal definition, please review the <a href="WebService1.asmx?WSDL">Service Description</a>. </p>
...
<a href="WebService1.asmx?op=HelloWorld">HelloWorld</a>
...
at WSTestUsingPerl.pl line 10
Does anyone know what I can do? Of course the actual web service I have is more complex than this, I just tried adding a new .asmx file to my solution and tried to find out where in the web.config is the problem, and I found this error. Note that the web services will work when I create a new .net app and consume this web service, or simply run the web methods via the browser. But when I use SOAP::Lite it won't (and so I assume that there might be other scripts that get the same error). Thank you in advance for your help.
Rafferty
Found the problem. The problem was not in the
<sessionState ... mode="InProc" ... />
but in the<sessionState ... cookieless="AutoDetect" ... />
. Apparently,cookieless
should be="UseCookies"
. I thought"AutoDetect"
should detect it properly, is this an ASP.Net bug?Rafferty