Connecting to WCF Service on the same network - c#

I have a WCF service deployed on IIS7.5 on windows 7. It is using basicHttpBinding since this service is to be consumed through a windows mobile 6.5 application.
If I try to connect from the same machine (192.168.0.201) everything works as it should. However if I try to connect from another machine on the same network, (here's the weird part) It manages to find the service however any successive calls fail.
If I browse to the service's wsdl page from a web browser it responds with "the page cannot be found", although the "you have created a service" page is found!
Note that browsing to wsdl page from the local machine works fine as well.
Can anyone help please ?
Thanks in advance

There is more to it than just the endpoint. Do you have a behavior? It is all in the documentation.
How to: Publish Metadata for a Service Using a Configuration File

Related

Error IIS and Android

I'm Brazilian, and I apologize for my English, which is very bad
I've been facing a problem for some time, and I'm tired of looking for a solution in Portuguese.
I created a WCF service to be consumed by Android, hosted on a computer that I have at home with Windows server and iis installed, configured all the correct port releases for the application to work on the phone, but it has the following error in the execution: System.Reflection .TargetInvocationException
So I decided to host the WCF service on an external server, I used the number service. I just uploaded the files to it and changed the address references in the application to communicate with the WCF, and then it worked, so I guess some configuration that has to be done in IIS or in Windows itself, I'm waiting for some help. Thank you

Run a webservice inside a windows service not IIS

creating my first webservice and need some assistance. i'm trying to create a web service to send data on a machine that doesn't have IIS. I have seen examples of this on msdn Host web service outside IIS.
My question so far is the address for the web server as the one in the example uses Http://localhost/WSEHostedWebService, i'm not sure what to use here as there is no web application or even IIS running on the intended machine. Should this point to a directory on the intended machine i.e. c:\webservice\myFirstService.asmx ?
To quote them "The following code example creates a Windows service named WindowsServiceToHostASMXWebService that hosts a Web service named Service at the soap.tcp://localhost/Service endpoint." - Try saying that fast with a mouth full of water :D
Anyhoo, unless you specifically need ye olde worlde asmx service do it in a WCF web service inside a windows service instead read this and this other link with example
As the link above says WCF handles the HTTP stuff outside of IIS anyhow.

C# Web service works in console but not from asp.net website on IIS server

I'm using a web service which works fine when I run it on my machine in an ASP.NET application using the default IIS Express VS 2010 comes with. However, when I move it to our server with IIS I get the error:
Error: There was no endpoint listening at 'web service name here' that could accept the message. This is often caused by an incorrect address or SOAP action.
'web service name here' is just a placeholder I put for this post. It has the right web service name.
So I pulled out the small login code that this is failing on into a console application and ran that from the IIS server and it worked! So I have to assume this is some kind of permissions issue with the IIS server on how it's running my web service code? In my ASP.NET program I have a separate DLL that handles the web service. The ASP.NET application fires off a separate thread that uses the DLL I made that uses the web service. Is it something to do with the separate thread permissions maybe? Any ideas?
Your first step when faced with this sort of issue is to search your config files for "web service name here" (or if this isn't actually the message you're getting the address given in the message). My suspicion is somewhere you'll have a WCF reference set up which needs a proper IP address.
Once you've got the address (assuming it looks valid) you need to check you can access it from the machine which is having the difficulties - it may be a firewall issue.
Now that you've established that your console application is connecting correctly from the same machine the next step is to check that both your IIS App Pool and Console application are running under the same user account/permissions. It may be that one identity has permission to access the network/internet and the other one doesn't.

How to host a web service so other clients connected to same network can access

I am hosting web service in a one machine using Visual studio 2008. I tried accessing the web service from a web site i created in the same solution and it was successfully called. Now i want to access the web service from a remote client.
I initially developed the web service to used in an android application. As you can see if I wan to access the web service I will have to host is with a static IP. So at least to test the application i want access the web service from the android mobile by connecting both server and android mobile to one wifi network. For the initial test I connected two laptops(one is server) to the wifi router. And i pingd the server from the client machine and it got successfully pingd. But when i try to access the web service with given port from the browser it wont allow me to connect. I tried http://localhost:26796/ by replacing the localhost with ip of the server and also i tried making a small web site(asp) and try to access it from the client via IP. Both did not work. I have searched here and on web could not find a proper answer. for,
how to host a webservice so other clients in the same network can access..?
can it be fulfilled with VSD server..?
is it compulsory to use iis..?
How should i achieve this..?
NOTE: Moved from comments to answer as per user suggestion.
Publish the web service to your local machine's IIS as an Application. Then you can access the site from anywhere in your network. Running it directly from VS means it's hosted inside VS's ASP.NET Development Server (which, by default is only accessible locally). You can try opening up the port specified in the ASP.NET development server that starts up on your machine's local firewall, then you can access the debug instance being hosted

Publishing WebServices and IIS

I'm having problems when publishing services on IIS.
First, I will describe my scenario.
At the moment I have an WPF app in C#.
Also I have a web site (published in IIS through HTTPS) that need to communicate with the c# application, therefore I decide to publish the methods I needed through a REST web service also through https:
WebServiceHost serviceHost = new WebServiceHost(typeof(QESWebService), new Uri("https:xxx/WS/");
When I tested it on Windows 7 there were no problem. Everything works fine.
But now, when I try the application in Windows XP, it is not working! I cannot launch the application because the port 443(for the web service https) is already in use.
I cannot find a solution different to dont use https on one of the sides, but I really need it, What can I do?
Thanks in advance
If you already have a web application/service running on the IIS using SSL then you need to change some configuration settings
Here is an article about Multiple SSL Web Applications on Port 443

Categories