Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. WebService returns the entire HTML code when <sessionstate mode="InProc" ...="" />

WebService returns the entire HTML code when <sessionstate mode="InProc" ...="" />

Scheduled Pinned Locked Moved Web Development
wcfhelpxmlcsharpperl
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rafferty Uy
    wrote on last edited by
    #1

    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

    R 1 Reply Last reply
    0
    • R Rafferty Uy

      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

      R Offline
      R Offline
      Rafferty Uy
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups