Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

screen capturing of webpage

Status
Not open for further replies.

shashi19

Programmer
Aug 2, 2011
1
IN
i am using IECAPT.exe for exporting the web page.IECAPT.exe exports it in image format
I m getting some problems related to IECAPT.exe.It is working perfectly on all operating system.
But when i deploy my ASP.NET application to windows Server 2003 then it is calling IECAPT.exe but exporting blank image with blackborder (frame).
Please help... I know this is rights relatedissue.
But i am not able to rectify it.Even On same server(2003) in debug mode it is working perfectly but not working in IIS.here is the code for using IECAPT.exe for exporting

private void Export()
{
string param;
param = "";



string url ;

if (Request.Params["weburl"] != null)
{
url = Request.Params["weburl"];
}

Guid path = System.Guid.NewGuid();

string savepath = String.Format(Server.MapPath(".") + "\\{0}.png", path);

System.Diagnostics.Process process = new System.Diagnostics.Process();

process.StartInfo.ErrorDialog = true;

process.StartInfo.FileName = Server.MapPath("bin/IECAPT.exe");

process.StartInfo.Arguments = String.Format("\"{0}\" \"{1}\" --delay=10000", url, savepath);

process.StartInfo.UseShellExecute = false ;
process.Start();
process.WaitForExit();

process.Close();

/// String strTmp = Server.MapPath("IECapt.exe") + " --url=" + url + " --out=" + savepath ;
// Interaction.Shell(strTmp, AppWinStyle.MinimizedFocus, true, 30000);


// Shell(strTmp, AppWinStyle.MaximizedFocus)


process.Dispose();


}
 
this sounds like an IIS or OS issue. possibly even a permissions issue. but this isn't a problem with asp.net.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
The ID that ASP.NET runs under does NOT have the privileges to start another process.

Try stating a simple NOTEPAD from ASP,NET. If it will not start then ASP.NET does not have the privileges. If you raise the privilege, you have a security risk.

That said, see
Google Search of ASP,NET Start Process
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top