I am using RazorPDF to return PDF as a view. The problem is that when I run on my machine the code works fine, returning the PDF as I want, but when I upload the code to IIS in Windows Server 2008, the code returns "RazorPDF.PdfResult" that is the name of the class as a string. The rest of the application works fine on both environments.
This is the correct return result, on local machine: right_return
And this is the result when running on windows server:wrong_return
The code:
public ActionResult OrcamentosResultado(LogisticaModel model, string pdf)
{
//Some code
if (pdf == "pdf")
{
PdfResult retorno = new PdfResult(model, "ComprasPDF");
return retorno;
}
//Some more code
}
I am using ASP.NET 4.0 and System.Web.MVC 3.0