2
I developed a function that passing the Item id it generates a PDF file.
[HttpPut]
public void GerarPDF(long idItem)
{
....Função
}
It already works perfectly, I did the test through the Google Chrome app called Postman, and passing the path it generates the PDF and download everything straight, but if I send this same path in the body of an email through a <a></a>
so that the person who received the email can generate the PDF, this path does not work:
"<a href=http://localhost:11599/Item/GerarPDF?idItem=" + IdItem.ToString() + "> link Download PDF </a>"
Now I don’t know if it’s because I’m trying to open by localhost or not, if anyone can help me thank you.
Have you tried hosting at any address other than localhost to see if it works?
– Thiago Leon
I will do this, I believe it is due to the same localhost.
– Brayan
Is your system hosted or just on localhost? Does your email work on your computer? Remove the
[HttpPut]
or change to[HttpGet]
– Randrade