這是我asmx
WebService的方法:將List <KeyValuePair <string,string >>傳遞給WebService有什麼困難?
[WebMethod]
public string GetHeader(List<KeyValuePair<string, string>> signature_additional_parameters)
{
return "ok";
}
,但是當我把它從另一個應用程序:
var signature_additional_parameters = new List<KeyValuePair<string, string>>();
signature_additional_parameters.Add(new KeyValuePair<string, string>("test", "my data"));
var header = MyWS.GetHeader(signature_additional_parameters);
它說:爲「WSArchieSocial.WSModuloSocial.GetHeader的最佳重載的方法匹配(WSArchieSocial。 KeyValuePairOfStringString [])'有一些無效參數?
爲什麼使用那WSArchieSocial.KeyValuePairOfStringString[]
?我該如何解決它?
看看[如何將名稱/值對傳遞給ASMX Web方法?](http://stackoverflow.com/questions/4788571/how-to-pass-name-value-pairs-to -an-asmx-web-method) –