Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using rotativa to convert view to PDF ,it work on localhost but on server i am getting above error.please tell me solution.

What I have tried:

public ActionResult GeneratePDF()
{

return new Rotativa.ViewAsPdf("PDF");
}
Posted
Updated 22-Feb-16 22:51pm
v2
Comments
dan!sh 23-Feb-16 2:20am    
The error message is as clear as they come. You need to contact your administrator.
Member 11349094 23-Feb-16 2:25am    
thanks, i will check it
koolprasad2003 23-Feb-16 2:46am    
Have you deploy your application on some third party domain like Godaddy ?
Member 11349094 23-Feb-16 5:11am    
I have deployed on our own whitedomains sever

1 solution

do following changes in web.config and see if it works
HTML
<system.web>
    compilation debug="true" targetFramework="4.5.2"/>
    <httpruntime targetframework="4.5.2" />
    <trust level="Full" />             <!-- Just add this to the webconfig -->
 </system.web>

 <system.codedom>
              <!-- All is removed between the 2 tags-->
 </system.codedom>
 
Share this answer
 
Comments
Member 11349094 23-Feb-16 5:13am    
My project web config is already contain above setting.still i am getting same error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900