In my app I'm connecting to WFC service.
I'm trying to get video file from this service.
I'm using this code to connect to service:
TransferServiceClient client = new TransferServiceClient(new BasicHttpBinding(), new EndpointAddress(#"http://localhost:4100/Service1.svc?singleWsdl"));
WWW class can get video stream and play it from url string.
Is it possible to use my WCF service with WWW. In other case, are there any suggessions how can I get video from wcf in my unity project?
Related
I wrote a small test WCF REST service using C#, within the WCF service, if it receive POST info from client, the WCF will collect the HTTP Request message from client and write it to a text file. I am using Stream to collect HTTP request and using StreamWriter to write it to a text file. I can specify any folder/path for the text file.
At this point, everything is working when I host the WCF REST service using a local console app.
However, I want to host the WCF service by using Windows service, the Windows service self is fine, it can be started/stoped no issue, my issue is, when client send HTTP POST request, the WCF suppose to create the text file but I can't see the text file. I tried to search the file on the PC, I could not find it, the text file actually never generated (in my view, Windows Service is not responsible to write the file, it is still WCF responsibility)
btw, the HTTP GET works from client (means the WCF Windows service works at least for GET).
any hints are much appreciated
Trying to implement https on a WCF webservice which we are not running in IIS. Currently using the following code for each class and interface which describes and implements a service.
WSHttpBinding binding = new WSHttpBinding();
binding.Security.Mode = SecurityMode.Transport;
WebServiceHost host = new WebServiceHost(typeof(ServiceClass), "https://localhost:8085/ServiceClass");
host.AddServiceEndpoint(typeof(IServiceClass), binding, "");
host.Open();
The service starts without any exceptions, but when I try to connect a browser to :
https://localhost:8085/ServiceClass/Item?format=xml
I get a ERR_CONNECTION_RESET error. Additionally I hook host.Faulted and host.Closed and am not getting any error messages.
I can't find an example anywhere of implementing WCF web service over https using basic authentication, which is what we're looking for.
I'm developing a webpage that is supposed to consume WCF webserice that is located on client's computer. First, user installs some software that hosts WCF service on his computer, then he'll view my webpage which is supposed to call the WCF service. Do you have any idea how to do it without having to use AtiveX and IE?
Add your wcf service as service reference to your web project. You have to specify the url of your wcf service. A clientproxyclass will be generated for you. In your webpages or whathever you can create a instance of this proxyclass and just code what you want.
I want to host a WCF Data Service (formerly known as ADO.NET data Service) in windows form.Is it possible? If yes,then is there any blog, which talks about it?
I know WCF can be hosted in Windows Form, but I am not sure about WCF data service, as all the examples I see, is asking to create ASP.NET web project.
-Brajesh
It is very easy to host a WCF Data Service in a WinForms application (or in my case a unit test).
// add reference to System.Data.Services
// identify your endpoint uri
Uri endpoint = new Uri("http://localhost:12345/MyDataService");
// create the data service host
DataServiceHost host = new DataServiceHost(typeof(MyDataService), new Uri[] { endpoint });
I'm developing a windows sidebar gadget that calls out to a wcf service via a javascript xmlhttprequest. If you stop the iis site hosting the service, shouldn't all calls to that service from the client return a 404 or something similar? The gadget and wcf service are running on separate machines. When I stop the iis site hosting the service and then drag the gadget from the gallery on to the sidebar, It is still populating correctly with data returned from the web service. However pasting the url for the service method into the browser correctly returns a 404. I must be missing something here.
I'm trying to reproduce a scenario where the gadget cannot reach the service so that I can test my xmlhttprequest error listener code.
Any suggestions are appreciated.
Is it using cached results from a previous request?