I have written a WCF web service which is being hosted in Windows Server 2012 through IIS-7. The server's public IP is currently open (the firewall is disabled). I can get the metadata and the wsdl document just fine with a browser, and I can add the service reference to Visual Studio through that IP. However, when my asp.net web page invokes a WCF service method, it gives me a 405 - Method Not Allowed error.
I think the problem is with cross-domain posting. I could be wrong, but that would make sense, since I only get errors when accessing the wcf service from an application.
How would I go about avoiding this issue?
Here is my Interface:
[ServiceContract]
public interface IDataPortalWCFService
{
[OperationContract]
string HelloWorldTest(string u, string p);
[OperationContract]
string HelloWorldTest2(string u, string p, string str);
[OperationContract]
string HelloWorldTest3(string u, string p);
[OperationContract]
DataTable GetBAQResults(string u, string p, string BAQName, DataTable BAQParameters);
[OperationContract]
string GetBAQResultsAsJSON(string u, string p, string BAQName, string BAQParameters);
}