Click here to Skip to main content
15,902,635 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Need broad brush guidance on web approach Pin
Duke Carey24-Jul-14 0:26
professionalDuke Carey24-Jul-14 0:26 
GeneralRe: Need broad brush guidance on web approach Pin
jkirkerx24-Jul-14 5:44
professionaljkirkerx24-Jul-14 5:44 
AnswerRe: Need broad brush guidance on web approach Pin
Wombaticus23-Jul-14 22:41
Wombaticus23-Jul-14 22:41 
GeneralRe: Need broad brush guidance on web approach Pin
Duke Carey24-Jul-14 1:40
professionalDuke Carey24-Jul-14 1:40 
GeneralRe: Need broad brush guidance on web approach Pin
Wombaticus24-Jul-14 1:57
Wombaticus24-Jul-14 1:57 
QuestionChat Application in ASP.NET Pin
rbala00622-Jul-14 20:49
rbala00622-Jul-14 20:49 
AnswerRe: Chat Application in ASP.NET Pin
ZurdoDev24-Jul-14 7:56
professionalZurdoDev24-Jul-14 7:56 
QuestionAsp.Net application after hosting(iis7.5) not executing wkhtmltopdf.exe Pin
Member 791718220-Jul-14 21:16
Member 791718220-Jul-14 21:16 
Hi All,

I'm using wkhtmltopdf.exe to convert HTML page to PDF. It is working fine when I run from solution and not working after hosting in IIS 7.5. I tried giving all permissions to that folder and tried with changing AppPoolIdentity but still not succeeded Frown | :( . Please can anyone help me to resolve the issue.

Below is the code that I'm using to convert html to pdf.

protected string WKHtmlToPdf(string Url)
{
try
{
var p = new Process();
string footerURL = ConfigurationManager.AppSettings["Footer"];
string fileName = "TestReport.pdf";
string switches = "-q -n";
switches += "--print-media-type ";
switches += "--margin-top 15mm --margin-bottom 15mm --margin-right 15mm --margin-left 15mm ";
switches += "--page--size A4";
switches += "--redirect-delay 100";
switches += " --orientation Landscape " + Url + " --footer-html " + footerURL + " " + fileName + "";

var startInfo = new ProcessStartInfo
{
FileName = Server.MapPath("~\\Utilities\\wkhtmltopdf.exe"),
Arguments = " --orientation Portrait " + Url + " --footer-html " + footerURL + " " + fileName,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
RedirectStandardInput = true,
WorkingDirectory = Server.MapPath("~\\Html")
};
p.StartInfo = startInfo;
p.Start();
p.WaitForExit(60000);
int returnCode1 = 0;
try
{
returnCode1 = p.ExitCode;
}
catch (InvalidOperationException)
{

}
p.Close();
return (returnCode1 == 0) ? fileName : null;
}
catch(Exception ex){
throw ex;
}
}

Thanks & Regards
Seema
AnswerRe: Asp.Net application after hosting(iis7.5) not executing wkhtmltopdf.exe Pin
Blikkies20-Jul-14 23:09
professionalBlikkies20-Jul-14 23:09 
GeneralRe: Asp.Net application after hosting(iis7.5) not executing wkhtmltopdf.exe Pin
niteoti21-Jul-14 1:39
niteoti21-Jul-14 1:39 
GeneralRe: Asp.Net application after hosting(iis7.5) not executing wkhtmltopdf.exe Pin
Member 791718221-Jul-14 3:55
Member 791718221-Jul-14 3:55 
AnswerRe: Asp.Net application after hosting(iis7.5) not executing wkhtmltopdf.exe Pin
Kornfeld Eliyahu Peter21-Jul-14 9:24
professionalKornfeld Eliyahu Peter21-Jul-14 9:24 
AnswerRe: Asp.Net application after hosting(iis7.5) not executing wkhtmltopdf.exe Pin
jkirkerx23-Jul-14 11:11
professionaljkirkerx23-Jul-14 11:11 
QuestionPlease help to insert data from Listbox into table in SQL Server Pin
Member 1079445920-Jul-14 16:42
Member 1079445920-Jul-14 16:42 
AnswerRe: Please help to insert data from Listbox into table in SQL Server Pin
meeram3920-Jul-14 19:53
professionalmeeram3920-Jul-14 19:53 
GeneralRe: Please help to insert data from Listbox into table in SQL Server Pin
Member 1079445920-Jul-14 20:17
Member 1079445920-Jul-14 20:17 
GeneralRe: Please help to insert data from Listbox into table in SQL Server Pin
meeram3920-Jul-14 22:34
professionalmeeram3920-Jul-14 22:34 
GeneralRe: Please help to insert data from Listbox into table in SQL Server Pin
vijendradudhe23-Jul-14 0:20
vijendradudhe23-Jul-14 0:20 
Questionhow to store text -box value in database Pin
Member 1095733819-Jul-14 2:03
Member 1095733819-Jul-14 2:03 
AnswerRe: how to store text -box value in database Pin
Dilan Shaminda19-Jul-14 16:35
professionalDilan Shaminda19-Jul-14 16:35 
Questionc# Code to save list of files from virtual directory to local drives Pin
pulkit_chopra1218-Jul-14 22:02
pulkit_chopra1218-Jul-14 22:02 
AnswerRe: c# Code to save list of files from virtual directory to local drives Pin
meeram3919-Jul-14 1:59
professionalmeeram3919-Jul-14 1:59 
QuestionReceiving requestTimeOut error on 200 concurrent users Pin
antony beula17-Jul-14 21:45
antony beula17-Jul-14 21:45 
AnswerRe: Receiving requestTimeOut error on 200 concurrent users Pin
ZurdoDev21-Jul-14 4:44
professionalZurdoDev21-Jul-14 4:44 
QuestionAsp Mvc 5 user registration fails Pin
AnCristina17-Jul-14 11:55
professionalAnCristina17-Jul-14 11:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.