We developed an application in Silverlight / C # / WCF.
Used in our service, custom binding.
The service implements methods beyond DUPLEX CRUD methods with the TCP protocol.
Due to the net, owning our endpoint URL: net.tcp://localhost:4502/Aplicacao/ncServico.svc"
Everything works on an intranet on port 80.
Now, did the port 8080 NAT router and configure IIS to port 8080 and we want to access the application from another network.
In the test we are using a 3G modem; typed into the browser: :8080/Aplication/
We arrived at the home screen of the application, but the service is not called by the application.
I can see the WSDL of the service on our application does not see the service.
Understand: there is no error, just the service was not found by the application of an external network.
I have in inetpub\wwwrooot files: clientaccesspolicy.xml and crossdomain.xml
I saw now that even in intranet service is not found in the published application and port 8080. The WSDL opens normally!
Does anyone know how to solve the problem?
thank you
Related
I have a WCF Service hosted as a Windows Service in the server.
The endpoint is net.tcp endpoint. We are accessing the endpoints from a Silverlight application.
Problem is when we are trying to access the service from the web app while browsing the Silverlight application using HTTP it works fine. But when we try to do so removing HTTP binding from the Silverlight app from IIS and browse the app using HTTPS the service endpoints are unavailable and gets access permission error from Sockets. I am attaching the error screenshot below:
Could not connect to service. The connection attempt lasted for a time span of 00:00:01.0865926. TCP error code 10061: No connection could be made because the target machine actively refused it. This could be due to attempting to access a service in a cross-domain way while the service is not configured for cross-domain access. You may need to contact the owner of the service to expose a sockets cross-domain policy over HTTP and host the service in the allowed sockets port range.
I want to use Duplex WCF between the host (a desktop app) and a web site, where the web site is the client and the desktop app runs the WCF host.
The user should click on a button on the web site, it does an ajax call to an asmx web service which in turn should send the command to the host (which then talks to a bunch of other desktop apps; but I've learned how to do this last part from all the tutorials I found online)
I essentially want two interfaces: one between the host and a bunch of other desktop clients (which I already know how to do) and one between the host and a website, which at this point only needs to receive a message/command from the website (this is the part I need help on).
I've seen examples of Duplex WCF between the host and the client where the client is a desktop application (GUI), but not where the client is a website/web service.
How do I go about doing this?
I have a WCF service which works fine when accessed internally. The WCF link is
.
I requested the network team at our organization to expose this WCF to outside world since public websites will access this WCF. I gave the network team DNS as somewebsite.com and IP address of the server on which WCF is hosted.
After getting the confirmation from Network team (they use Juniper network ) that they have made the required settings to make the WCF available to outside world I tested it as an external user.
If I type in http://somewebsite.com/LookUp.svc on address bar I get http 404 page not found error. However if I replace http with httpS as then I see the WCF information. To further test it , I added a simple html file to the root of the website and opened as
http://somewebsite.com/test.html. The Test.html does not open when http is used. However it I use httpS as then Test.html page is displayed to outside users.
The WCF is hosted to windows 2008 R2 and is communicating over port 80 and I have also added the site binding as somewebsite.com with Type as Http and port as 80.
Any idea why WCF caanot be accseed over http ?. I want it to be accessed over http only ?. The WCF uses basicHttpBinding
Is the setting wrong on server on which WCF is hosted ?
Any suggestion is greatly appreciated..
If the service worked before over http before your network guys opened the firewalls I would suggest that they have only enabled the firewall for https traffic.
Sounds like a firewall/routing problem to me...
HTH
I manage a web site for company that hired me after being unsatisfied with the original developer of the site. One function of this site is to add new patients. Part of adding the patient is to receive data from a USB port on the client machine via an applet. Since the Java 7 update 21 the applet does not work and the company has asked to remove the applet and replace it with a different solution. I am having trouble doing this, however, due to the applet listening to the client USB ports from the server to retrieve the data. I Have thought of a few ideas to solve this but am unsure if it is possible and haven't been able to find the answer online. I was hoping someone here could tell me if my idea is possible or point me in the right direction.
When the user adds a new patient the web site will call a web service on the server. This web service will then call a WCF hosted Windows Service on the client and active its serial port listener. Once the client's Windows Service has received the data the WCF will respond to the Web Service on the server and parse the data.
What I'm having trouble with is finding a way that the web service can call the WCF downloaded by the client and have it begin listening to the USB ports. If anyone could tell me how to do this, or suggest a better way to have the server initiate the client listening to the serial port I would appreciate it.
Do you have any system requirements?
When entering new patient, what kind of browsers are expected?
Will this be deployed as one solution, or clients expect that your application
can support any modern browser?
The main problem is that browsers are very restrictive in terms of what
kind of code you are allowed to execute. By default, browser won't allow
to execute any plugins / read any usb ports, let alone execution / installation
of arbitrary wcf service.
So, supposing that you have 'any modern browser' in requirements - you have following options:
Java / activex applet plugin. I believe this is the only sure-way to have access to usb
on a client machine. Also plugin must be signed with trusted certificate, or client must allow
execution of untrusted plugin (again, check requirements). I though silverlight would also
be a valid alternative, but according to my research (please correct if I am wrong) - its security
model does not allow any kind of USB access.
Prompt user to download and install browser plugin / helper object with access to usb.
And then communicate with your web page through this plugin.
Installing an entire wcf service on a client side would be an overkill in my opinion.
You would have to manage issues like firewalls, closed ports, security,
writing a self-hosting wcf solution, etc.
But if you managed to install and host a wcf service on a client side:
When the user adds a new patient the web site will call a web service on the server.
This web service will then call a WCF hosted Windows Service on the client and active its serial port listener.
Why not save a roundtrip and call client service directly from page?
Server would need to know client address to call it, which is not always possible.
Probably your web page can attempt to access localhost, at predefined port,
where your wcf service is listening.
Once the client's Windows Service has received the data the WCF
will respond to the Web Service on the server and parse the data.
It would be easier to respond on call from your web page (use polling if usb reading is slow),
and only then send to server. Browser already knows where to send data, and have permission
to do so. But if your server address is well known and can be accessed with domain name,
you can try to connect to it from your wcf on client.
Also there is a very similar topic, discussing connection to usb from client.
a colleague of mine wrote a webservice that runs on port 8081 of our Windows 2008 Server.
He uses the class ServiceHost, afaik this means its a standalone host (no IIS or ASP involvement). Note: I'm new into WCF ;)
Now there are some issues with clients behind a firewall blocking the requests to remote port 8081 of our server (where the webservice runs). The easiest solution would be: run the webservice host at port 80 ... But: there is also a Apache 2.2 webserver running on the Windows Server, hosting some websites. By default it runs on port 80.
My solution after some researching: use a virtual host to route requests to a virtual host (lets say http://webservice.[hostname]:80) to the webservice host (http://[hostname]:8081).
Is this a good idea? Can Apache handle forwards to standalone webservice hosts?
It would be nice if someone could lead me on to the right track :)
Best regards,
Niels
If your Apache server is your forward facing server and you want the requests to be forwarded to your internal service/IIS you should look at mod_proxy and configuring a reverse proxy.
The easiest solution would be to get a different IP address to run the WCF host on. Then, you could have both listening on the same port but different IP addresses.