0
good afternoon,
am making a webservice on Asp.net to consume the farm site’s Nfe service, however when trying to add service reference in the project with the url:
https://www1.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx
is giving me a mistake:
An error occurred while downloading 'https://www1.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx/$Metadata'. Request failed with HTTP status 403: Forbidden. Metadata contains a reference that cannot be resolved: 'https://www1.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx'. The HTTP request is prohibited with the 'Anonymous' client authentication scheme. Remote server returned an error: (403) Forbidden. If the service is defined in the current solution, try to compile the solution and add the service reference again.
Someone can help me?
Thanks in advance.
You probably want to use the address
https://www1.nfe.fazenda.gov.br/NFeDistribuicaoDFe?wsdl
instead ofhttps://www1.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx
– Jéf Bueno
I got the url of the site itself
– Stand Alone
But for add the service has to use the URL I indicated.
– Jéf Bueno
returns the same error...
– Stand Alone
If you are returning 403 it is because you do not have a valid certificate.
– Jéf Bueno
added the image for you to see
– Stand Alone
already installed the certificate, and is valid... install normally? I need to link somewhere in the code ?
– Stand Alone
Buddy, I tried to add it that way, too, and it didn’t work. I did so by following this tutorial by adding the methods via code and it worked: https://answall.com/questions/241783/consumr-soap12-nf-e-uf-ba good luck..
– Lucas Carvalho