Well, What is normal to send streams? The goal is to send data from iphone to SQL database on some windows server including files, images and other primitive types. Should I be thinking sockets as opposed to WCF? When I googled such thing, everything seemed to point to webservices, I realized that classic webservice doesn't work well with JSON. So, I tried WCF, only to find out it accepts one Stream parameter! So, let me ask this:
Basically I want to send some parameters mostly strings, couple of images, txt file, and audio file from iphone app to SQL database. I would like to send one http post request with all that, but how much of performance hit would it be if I do 3 or 4 http requests as in post parameters, then post image, then post file since WCF is built to handle one Stream parameter at a time?
Ok, got it to where I read the stream, parse it and extract text and images from it. I do have a new problem, the binary data request sent from the iPhone is posted as the body of http post request. Everything works fine as long as the request doesn't exceed 65535 bytes. When it does exceed, the Wcf method doesn't even get called or invoked at all. I am not sure to where the problem might be.
Here is my web.config
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="524288"/> //made this # bigger, didn't work
Found it. It's my mistake, I have my WCF hosted in localhost IIS7.5, but The changes I applied to my web.config in my project were not translated to the web.config that is being consumed under IIS7.5.
Thanks for the help and for hanging in with my many posts. You did steer me to the correct solution by inheriting a custom stream object to handle images and file uploads within one request, but I might rethink this approach, and stick with the 'more standard' REST approach of one stream parameter, even though this may require multiple http requests to achieve the same thing - depending on performance. But, I know both ways and I can use either.
For the first time I am daring to ask a question on codeproject, so please bear with me.
I wish to write a WCF service on which various clients will be posting data. Based on the data received, the Windows work flow will start transitioning states (as opposed to sequential one).
The Expense Reporting sample is way too heavy and am unable to get that running.
So any step-by-step resource which I can refer to get the integration of WCF and WF in 4.0?
- I created HelloWorld WCF service.
- I followed instructions to host it on IIS 7.0
I can do this fine: localhost:4567/Service1.svc
I can do this fine: 192.168.1.101:4567/Service1.svc
This still shows port# though, I want to be able to do something like this without the need to specify the port: localhost/Service1.svc. so I can access it from my other machine 192.168.1.102. How can I set it up that way on my local machine? The end goal is to access my local machine from iOS and read JSON data.
My reference.cs file shows error. The proxy class has been generated but an error shows as "The type of namespace name 'NameValueCollection does not exist in the namespace' "System.Collection.Specialized". This error occur in Proxy file Reference.cs.
Before anybody answers let me point deep down to what is causing this. I am creating XMLMembershipProvider. My class inherits the membership provider and have implemented all its method including Initialize method which take two parameters one of which is NameValueCollection. All methods are now consume in WCF but NameValueCOllection is incompatible with WCF,s serialization and cannot pass through WCF serialization. The error message is as such because WCF incorrectly marked for its CollectionDataContract serialization, but then choked because it had no Add(object) method.
I cannot use Dictionary here because i finally have to initialize the provider with base.initialize(string, NameValueCollection).
Can someone show me the getaround to this problem. Also if anybody knows the procedure of contacting the Microsoft WCF team, please let me know. I don't think there is enough flexibility the use of NameValueCollection in WCF - Nightmare
I have a wcf applicaion that alows multiple clients to conect to the host and register their intrest in broadcats messages then when they close they unregister this all works fine i have a dummy loop running in the wcf host that sends a test message out to all the registered clients over their call back chanel. Now comes the question i need to call the broadcatd method inside my wcf host from the code that is hosting it!! hope that makes sense. It is curently in a command line app i will move be moving it to a windows service at a later time.
Any help pointing me in the right direction would be aprecited.
Hi all, I have a WCF service and I have tags like
-- Some Data Here --
-- Some Data Here --
And I tested my service in SoapUI, but it is showing contracts with some extension as:
-- Some Data Here --
-- Some Data Here --
But I want my contracts appear as they are in contracts.
If somebody can give the solution, Thanks in advance.
I am using [MessageContract]
I have to call a WCF service to transform an image. Since an image is a stream (can be large) I want to have a method in which I can send a stream as well as couple of parameters (image transformation information) to a method. How can I define the method signature for the operation contract? Note that I am making a jason call and use an Http post method to send the image. So that I don’t have .
so that you dont have to care?
there is a lot of discusses out there why you should handle image-transformation on client machines... If you really need to do this on server-side, you should at least be able to write an handler for for this web-op-.#
this is my 1st que on this site...hope u would undrstand...
currently i m working in dot net 1.1 and i want to Encrypt the xml file...
now i have code for it but it is in uppper version...
so can it possible to use it in .net 1.1...?
if yes then how??
thanx in advance...
Last Visit: 31-Dec-99 19:00 Last Update: 31-Jan-15 18:18