1

Iam developing a project in MVC4. I want to generate a report on pdf. Iam using Rotativa to generate pdf report, so for it is working fine for local system

When i deployed in IIS it is not working and showing an error 'The directory name is invalid'. Error Details in Stack Trace

Please suggest me the solution

coder
  • 656
  • 3
  • 8
  • 22
  • You can see some suggestions here: [link]http://stackoverflow.com/questions/28940062/i-am-using-rotativa-tool-to-display-pdf-it-works-fine-on-localhost-but-does-no/30033336#30033336 Cheers! – peev May 04 '15 at 15:02

1 Answers1

0

I didn't use Rotativa. I can't see the stack trace screenshot image ( due to restirictions of my company. ) But if it says "the directory name is invalid" and it says that only on ISS hosting then consider to use Server.MapPath function... Look Rotativa library usage if you can set the root of paths. Like; rotativalib.Settings.RootDirectory.Set = Server.MapPath("~/pdfFiles/"); etc. etc...

For more information: http://msdn.microsoft.com/en-us/library/system.web.httpserverutility.mappath(v=vs.110).aspx

Lost_In_Library
  • 3,265
  • 6
  • 38
  • 70