I am using IEcapt.exe for generating website image in ASP.net(VB code) which l have listed below. I had created virtual directory on of my machine and hosted the published files of my appication. Its not working and seems to be some timeout error. But
its working fine when I had hosted in other machines and tested.
Please help me to solve this. Is this error due to some IIS configuration. But all machines in my firm are in same configuration. Please help me to rectify this.
Code listed below:
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
Try
Dim url As String = "http://www.google.co.in/ "
Dim TMP_NAME As String = "VJscreen.png"
Dim myProcess As New Process()
If Not Process.GetProcessesByName("IECapt").Length > 0 Then
For Each proc As Process In Process.GetProcessesByName("IECapt")
proc.Kill()
Next
End If
Label1.Text = "Process Started...."
vijuviswan
Member
13 Points
5 Posts
IECapt.exe is Not working
May 22, 2012 12:34 PM|LINK
I am using IEcapt.exe for generating website image in ASP.net(VB code) which l have listed below. I had created virtual directory on of my machine and hosted the published files of my appication. Its not working and seems to be some timeout error. But its working fine when I had hosted in other machines and tested.
Please help me to solve this. Is this error due to some IIS configuration. But all machines in my firm are in same configuration. Please help me to rectify this.
Code listed below:
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
Try
Dim url As String = "http://www.google.co.in/ "
Dim TMP_NAME As String = "VJscreen.png"
Dim myProcess As New Process()
If Not Process.GetProcessesByName("IECapt").Length > 0 Then
For Each proc As Process In Process.GetProcessesByName("IECapt")
proc.Kill()
Next
End If
Label1.Text = "Process Started...."
myProcess.StartInfo.FileName = Server.MapPath("~") & "\IECapt.exe"
' p.StartInfo.Arguments = [String].Format("""{0}"" ""{1}""", url, rootDir & "\" & TMP_NAME)
myProcess.StartInfo.Arguments = String.Format("{0} {1}", "--url=" + url, "--out=" + Server.MapPath("~") + "\\" + TMP_NAME)
myProcess.StartInfo.UseShellExecute = False
myProcess.StartInfo.CreateNoWindow = False
myProcess.Start()
myProcess.WaitForExit()
myProcess.Dispose()
Label1.Text = "Process Completed...."
Catch ex As Exception
Label1.Text = "Process failed due to " & ex.Message
End Try
End Sub
Thanks and regards,
Viju.
ASP.NETVB.NET