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. ASP.NET
  4. Non Serializable object for Web-Service

Non Serializable object for Web-Service

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netvisual-studio
2 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.
  • P Offline
    P Offline
    Pradhip
    wrote on last edited by
    #1

    Hi , I am using websevices in my asp.net application. The environment is VS.NET and all coding on vb.net One of the functions involves saving a file to the location. When i try passing the system.web.httpcontextfile to the webservice which would then save it on the web-server i get an error message that reads "System.web.httpcontextfile cannot be serialized because it does not have a default constructor." Can anybody suggest a work around for this. Or is this something that we have to live with when using a web-services. I did read a lot of articles that suggested using remote services and also raved about remote services being better than web-services for complex objects handling. But my issue is that System.web.httpcontextfile is a built in class and not really my own class to make it a remote object. If a Building is Completed then why do they call it BUILDING ??

    H 1 Reply Last reply
    0
    • P Pradhip

      Hi , I am using websevices in my asp.net application. The environment is VS.NET and all coding on vb.net One of the functions involves saving a file to the location. When i try passing the system.web.httpcontextfile to the webservice which would then save it on the web-server i get an error message that reads "System.web.httpcontextfile cannot be serialized because it does not have a default constructor." Can anybody suggest a work around for this. Or is this something that we have to live with when using a web-services. I did read a lot of articles that suggested using remote services and also raved about remote services being better than web-services for complex objects handling. But my issue is that System.web.httpcontextfile is a built in class and not really my own class to make it a remote object. If a Building is Completed then why do they call it BUILDING ??

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Typically in Web Servics, fils are sent as byte[] array (i.e., stream of bytes). Then you just reassemble the file on the other side. Technically, this is what HTTP packets are. Also, Remoting isn't necessarily better. It is Microsoft-proprietary. Yes, it uses SOAP, but how that SOAP is constructed and represents objects is hardly supported on most other platforms (and those that do often require much more work). Web Services are universally accepted and WSDL is must easier for frameworks to parse. Remoting also requires a lot more effort coding, even requiring changes from the ground-up if you didn't plan for it in the first place. Also, where's this System.Web.HttpContextFile you speak of? I find nothing about it in the docs. If I knew more about it, I might be able to help you more.

      Reminiscent of my younger years...

      10 LOAD "SCISSORS" 20 RUN

      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