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. General Programming
  3. WCF and WF
  4. sending stream through wcf

sending stream through wcf

Scheduled Pinned Locked Moved WCF and WF
csharpwcftutorial
6 Posts 2 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.
  • B Offline
    B Offline
    bhavna4321
    wrote on last edited by
    #1

    Im my application, on click of button i am running a service where i am reading a image from file . Converting the image to stream and sending back in the form of Stream .But on the application i am not getting the stream data . It is empty. CAN someone guide me in this. :zzz:

    M 1 Reply Last reply
    0
    • B bhavna4321

      Im my application, on click of button i am running a service where i am reading a image from file . Converting the image to stream and sending back in the form of Stream .But on the application i am not getting the stream data . It is empty. CAN someone guide me in this. :zzz:

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Since you're making us guess... First thing I can think of is the stream is never flushed and/or closed. Are you using buffered transfer mode or streaming transfer mode?

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      B 1 Reply Last reply
      0
      • M Mark Salsbery

        Since you're making us guess... First thing I can think of is the stream is never flushed and/or closed. Are you using buffered transfer mode or streaming transfer mode?

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        B Offline
        B Offline
        bhavna4321
        wrote on last edited by
        #3

        i have not mentioned any transfer mode. my config file is like <service name="LumedxPatientStudy.PatientStudy" behaviorConfiguration="LumedxPatientStudy.PatientStudyBehavior"> <host> <baseAddresses> <add baseAddress = "http://localhost:8731/Design\_Time\_Addresses/LumedxPatientStudy/PatientStudy/" /> </baseAddresses> </host> <!-- Service Endpoints --> <!-- Unless fully qualified, address is relative to base address supplied above --> <endpoint address ="" binding="wsHttpBinding" bindingConfiguration ="WSHttpBinding_IPatientStudy" contract="LumedxPatientStudy.IPatientStudy"> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IPatientStudy" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="102400000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false" > <readerQuotas maxDepth="32" maxStringContentLength="102400000" maxArrayLength="2000000" maxBytesPerRead="4096" maxNameTableCharCount="1000000" /> </binding> </wsHttpBinding> </bindings>

        M 1 Reply Last reply
        0
        • B bhavna4321

          i have not mentioned any transfer mode. my config file is like <service name="LumedxPatientStudy.PatientStudy" behaviorConfiguration="LumedxPatientStudy.PatientStudyBehavior"> <host> <baseAddresses> <add baseAddress = "http://localhost:8731/Design\_Time\_Addresses/LumedxPatientStudy/PatientStudy/" /> </baseAddresses> </host> <!-- Service Endpoints --> <!-- Unless fully qualified, address is relative to base address supplied above --> <endpoint address ="" binding="wsHttpBinding" bindingConfiguration ="WSHttpBinding_IPatientStudy" contract="LumedxPatientStudy.IPatientStudy"> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IPatientStudy" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="102400000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false" > <readerQuotas maxDepth="32" maxStringContentLength="102400000" maxArrayLength="2000000" maxBytesPerRead="4096" maxNameTableCharCount="1000000" /> </binding> </wsHttpBinding> </bindings>

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          What does the contract and its implementation look like?

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          B 1 Reply Last reply
          0
          • M Mark Salsbery

            What does the contract and its implementation look like?

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            B Offline
            B Offline
            bhavna4321
            wrote on last edited by
            #5

            <endpoint address ="" binding="basicHttpBinding" bindingConfiguration ="BasicHttpBinding_IPatientStudy" contract="LumedxPatientStudy.IPatientStudy"> <basicHttpBinding> <binding name="BasicHttpBinding_IPatientStudy" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="204003200" messageEncoding="Mtom" transferMode="Streamed" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="2000000" maxArrayLength="16384" maxBytesPerRead="54096" maxNameTableCharCount="16384" /> <!--<security mode="TransportCredentialOnly">--> <!--<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />--> <!--<message clientCredentialType="UserName" algorithmSuite="Default" /> </security>--> </binding> </basicHttpBinding>

            M 1 Reply Last reply
            0
            • B bhavna4321

              <endpoint address ="" binding="basicHttpBinding" bindingConfiguration ="BasicHttpBinding_IPatientStudy" contract="LumedxPatientStudy.IPatientStudy"> <basicHttpBinding> <binding name="BasicHttpBinding_IPatientStudy" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="204003200" messageEncoding="Mtom" transferMode="Streamed" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="2000000" maxArrayLength="16384" maxBytesPerRead="54096" maxNameTableCharCount="16384" /> <!--<security mode="TransportCredentialOnly">--> <!--<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />--> <!--<message clientCredentialType="UserName" algorithmSuite="Default" /> </security>--> </binding> </basicHttpBinding>

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              That's configuration - I asked about the service contract - the LumedxPatientStudy.IPatientStudy interface and its implementation (just the service operation you're having trouble with is fine).

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              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