Non Serializable object for Web-Service
-
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 ??
-
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 ??
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 thisSystem.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