-1
I struggled to set up my web service on IIS. It goes up, showing the screen that WS is ok. It turns out that when I pass a parameter to it gives this error:
REQUEST ERROR
The server encountered an error processing the request. See server logs for more details.
IIS is on an AMAZON server (Cloud).
My method
public TPDV getCnpjParceiro(string cnpj)
{
V99_WEBEntities db = new V99_WEBEntities();
TPDV pdv = new TPDV();
List<string> lista = new List<string>();
var resultado = (from _lista in db.T_PDV
where _lista.CNPJ == cnpj
join _st in db.T_CRM_StatusPDV on _lista.CNPJ equals(_st.DE_Cnpj)
join _sc in db.T_Script on _st.IT_Status equals((int)_sc.TipoStatus)
select new
{
_lista.CNPJ,
_lista.RazaoSocial,
_lista.Endereco,
_lista.CaminhoLogo,
_lista.Bairro,
_lista.Cidade,
_st.IT_Status,
_st.DT_TransacaoV,
tecnico = _sc.TipoScript == "T" ? _sc.Script : null,
central = _sc.TipoScript == "C" ? _sc.Script : null
}).ToList();
foreach (var lis in resultado)
{
pdv.CNPJ = lis.CNPJ;
pdv.RazaoSocial = lis.RazaoSocial;
pdv.Endereco = lis.Endereco;
pdv.CaminhoLogo = lis.CaminhoLogo;
pdv.Bairro = lis.Bairro;
pdv.Cidade = lis.Cidade;
pdv.ScriptCentral = lis.central;
pdv.ScriptTecnico = lis.tecnico;
}
return pdv;
}
I pass the parameter like this:
meu_ip/WebServiceSuporteTecnico/SuporteTecnicoServiceWS.svc/pesquisa/um_cnpj_da_minha_base
Code of the method you are trying to call and the parameters passed in the call, please
– Tiago César Oliveira
OK, editing the question
– pnet
With me on my machine, it works well. Only in the cloud (IIS) is it giving way
– pnet
That service is
REST
? You have set the default parameterCNPJ
settings? Just to test, changestring cnpj
forstring id
. If it works is configuration problem– Tiago César Oliveira