Consuming WCF Restful Service hosted by IIS - wcf

I have successfully deployed my WCF restful web service to IIS 7. I have verified that my service is working when I call it from a browser in IE via a something like "https://myserver/mservice.svc/postuser/JohnSmith" . The method is a POST and I have verified that my IIS configuration allows for POSTS.
My issue is as follows. We are using a 3rd party Software as a Service application that allows for external web service calls. It allows you to configure the URL "https://myserver/mservice.svc/postuser/" and then you can choose a parameter. When I call the web service from the external application, a 404 error is registered in IIS.
I think there must be some difference between the way I call my webservice "https://myserver/mservice.svc/postuser/JohnSmith" and the way the SAAS application is calling my external web service. The web service is attempting to pass the username, but I cannot detect how it is constructing this.
Do I need to write a web enabled front end for my web service that is hosted in IIS that can handle XML? I'm assuming this is how the SAAS application is trying to pass the username onto my web service.
Thank you all in advance for your ideas and help.

Related

WCF in windows service hosting with silverlight application

I have written WCF and hosted in windows service now when accessing the services via basic http binding, it is showing "This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details." Please suggest solution step by step
Thanks to all for not replying but I got the solution. Please suggest if anything is not in order.
We have created WCF and hosted it in Windows Services as netTCP. Now, I created Silverlight Enabled WCF Services in Silverlight.Web Project and call netTcp service from here and Silverlight WCF enabled Services called in Silverlight Project and it is running fantastic. Before this I tried from Web Service but it is taking when large data calling from silverlight application.

Calling a net.tcp wcf service from Silverlight - in an external facing web site?

I have an external (public) website developed in Silverlight. The Silverlight app currently calls http based wcf services hosted in IIS.
I am now having to call a wcf service with net.tcp binding hosted in a different app server. I have the net.tcp wcf service hosted in a windows service on port range 4502-4530 and with an interface to expose clientaccesspolicy.xml file as part of the service. I am able to invoke this service from my Silverlight app in the web server. I want the SL app to make direct call to net.tcp, rather than routing the call to it from another http based service.
Question is will this work without any issues when exposed over internet.
Client browser --> IIS webserver with Silverlight website --> App Server with wcf service on net.tcp.
I am assuming in this case, from XAP SL would try to make direct call to the app server service using net.tcp ?
The communication between the web server and app server could be opened up for ports 4502-4535. But I am wondering what about the client. Does this setup require the ports to be available even in the clients machine (with browser)?
Any insight is much helpful.
Thanks.
Take a look at http://support.microsoft.com/kb/2425652; there is sample code included as well! If you setup clientaccesspolicy.xml correctly; it should work as long as clients can access your TCP server.
If your clients are behind some firewall which is blocking your server's ports; they may face connectivity issues!

Calling WCF service method from browser?

Since i am new to WCF and Having configured a WCF service endpoint in IIS at Virtual Directory Api ( url goes like
http://localhost/api/taskapi.svc)
i was looking for ways to make request through web browser something like
http://localhost/api/taskapi.svc/GetCompleted
would respond with returnd data .I know this requires the binding of web service with the webHttpBinding but i don't know how to do it any help would be great ?
Use WCFSVGHoST application to test WCF applications. Application enables you to key-in parameters value and execute method of your interest.
Link for the same:
http://msdn.microsoft.com/en-us/library/bb552363.aspx

How to call local WCF service from webpage?

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.

Why is ajax call to iis hosted wcf service still returning data when the site hosting the service is down?

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?