Uruchom metody WCF z przeglądarki
Tworzę bardzo podstawowe usługi WCF z C # w Visual Studio 2010. Chcę wiedzieć, czy mogę uruchomić moje metody bezpośrednio z przeglądarki, wpisując coś takiego://localhost:49815/Service1.svc/methodName(parameterValue)
?
Oto esencja mojego kodu.
Berło:
using ...
namespace WcfService1{
[ServiceContract]
public interface IService1{
[OperationContract]
[WebGet]
string echoWithGet(string s);
[OperationContract]
[WebInvoke]
string echoWithPost(string s);
}
}
Metody:
public string echoWithGet(string s ){
return "Get: "+s;
}
public string echoWithPost(string s){
return "Post: " + s;
}