Dear Experts,
Thanks in advance for helping me
I have installed an application (APWebGrabber) on my VPS, that application is being used in my website. APWebGrbNET.DLL is already in BIN Folder of my site.
I am getting this error.
Plz Help Me.
ERROR CODE:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0117: 'APWebGrbNET.APWebGrabber' does not contain a definition for 'PaperSize'
Source Error:
Line 148: wb.EngineToUse=0;
Line 149:
Line 150: wb.PaperSize=Convert.ToInt16(Request.Form["pg_"+i]);
Line 151: wb.Orientation=Convert.ToInt16(Request.Form["ori_"+i]);
Line 152: wb.Scaling=Convert.ToInt16(Request.Form["scaling_"+i]);
Source File: c:\Inetpub\wwwroot\ictm\soft\Reports\prev1.aspx Line: 150
Show Detailed Compiler Output:
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ictm\0a8b4f3e\13de1f41\assembly\dl3\98448668\00a65d41_49c5c801\APWebGrbNET.DLL"
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
c:\Inetpub\wwwroot\ictm\soft\Reports\prev1.aspx(150,16): error CS0117: 'APWebGrbNET.APWebGrabber' does not contain a definition for 'PaperSize'
c:\Inetpub\wwwroot\ictm\soft\Reports\prev1.aspx(151,16): error CS0117: 'APWebGrbNET.APWebGrabber' does not contain a definition for 'Orientation'
c:\Inetpub\wwwroot\ictm\soft\Reports\prev1.aspx(152,16): error CS0117: 'APWebGrbNET.APWebGrabber' does not contain a definition for 'Scaling'
c:\Inetpub\wwwroot\ictm\soft\Reports\prev1.aspx(162,7): error CS0117: 'APWebGrbNET.APWebGrabber' does not contain a definition for 'OutputDirectory'
c:\Inetpub\wwwroot\ictm\soft\Reports\prev1.aspx(186,160): error CS0117: 'APWebGrbNET.APWebGrabber' does not contain a definition for 'NewUniqueID'
c:\Inetpub\wwwroot\ictm\soft\Reports\prev1.aspx(190,49): error CS0117: 'APWebGrbNET.APWebGrabber' does not contain a definition for 'NewDocumentName'
---------
Original CODE :
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%--<%@ Import namespace="APServerNET"%>--%>
<%@ Import namespace="APWebGrbNET"%>
<%@ Import namespace="APToolkitNET"%>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%
OleDbConnection conn = new OleDbConnection(System.Configuration.ConfigurationManager.AppSettings["MM_CONNECTION_STRING_ictmdb"]);
try{
string comp=Request.Form["comp"];
string project=Request.Form["project"];
string app_name=Request.Form["app_name"];
string application=Request.Form["application"];
string ctitle_align=Request.Form["ctitle_al"];
string atitle_align=Request.Form["atitle_al"];
string ptitle_align=Request.Form["ptitle_al"];
string atitle=Request.Form["atitle"];
string ptitle=Request.Form["ptitle"];
// Response.Buffer=false;
Server.ScriptTimeout=2400;
string pdfurl="";
int no=Convert.ToInt32(Request.Form["no"]),i=0;
string ht=Request.Form["ht"];
string ft=Request.Form["ft"];
ht="<br><br><table cellpadding=0 celspacing=0 width='100%'><tr><td width='33%' valign='top'>";
bool f=false;
if (ctitle_align=="1") {
ht+=comp;f=true;
}
if(ptitle=="Y" && ptitle_align=="1") {
ht+=(f)?"<br>":"";
ht+=project;
f=true;
}
if(atitle=="Y" && atitle_align=="1") {
ht+=(f)?"<br>":"";
ht+=application;
f=true;
}
ht+="</td><td width='33%' valign='top' align='Center' >";
f=false;
if (ctitle_align=="2") {
ht+=comp;f=true;
}
if(ptitle=="Y" && ptitle_align=="2") {
ht+=(f)?"<br>":"";
ht+=project;
f=true;
}
if(atitle=="Y" && atitle_align=="2") {
ht+=(f)?"<br>":"";
ht+=application;
f=true;
}
ht+="</td><td width='33%' align='right' valign='top' >";
f=false;
if (ctitle_align=="3") {
ht+=comp;f=true;
}
if(ptitle=="Y" && ptitle_align=="3") {
ht+=(f)?"<br>":"";
ht+=project;
f=true;
}
if(atitle=="Y" && atitle_align=="3") {
ht+=(f)?"<br>":"";
ht+=application;
f=true;
}
ht+="</td></tr></table><hr>";
Response.Write(ht);
Response.Write(ctitle_align+"<br>");
Response.Write(atitle_align+"<br>");
Response.Write(ptitle_align+"<br>");
Response.Write(atitle+"<br>");
Response.Write(ptitle);
APWebGrbNET.APWebGrabber wb = new APWebGrbNET.APWebGrabber();
//APWebGrabber wb=new APWebGrabber();
//APServer aps=new APServer();
StringWriter wtr=new StringWriter();
i=Convert.ToInt32(Request.QueryString["n"]);
string pg=Request.Form["fn_"+i];
// if(Session.Contents["app_id"].ToString()=="63"){
Server.Execute(pg,wtr);
// }else{
//Server.Execute(pg+"?pl="+(Request.Form["ori_"+i]=="1"?"1":"0"),wtr);
//}
string htm=wtr.ToString();
htm=htm.Replace("/ictm/soft/tmp/","http://124.217.245.184/ictm/soft/tmp/");
htm = htm.Replace("/ictm/images/", "http:/124.217.245.184/ictm/images/");
pdfurl = "http://124.217.245.184" + Request.FilePath;
wb.URL=pdfurl;
wb.PrintBackgroundColors=0;
//wb.PrintBackgroundColors=2;
wb.HTMLTextToFile=true;
wb.CreateFromHTMLText=htm;
if (Request.Form["back_"+i]=="Y")
wb.EngineToUse=1;
else
wb.EngineToUse=0;
wb.PaperSize=Convert.ToInt16(Request.Form["pg_"+i]);
wb.Orientation=Convert.ToInt16(Request.Form["ori_"+i]);
wb.Scaling=Convert.ToInt16(Request.Form["scaling_"+i]);
wb.LeftRightMargin=(int)(Convert.ToDouble(Request.Form["lm_"+i])*600);
wb.TopBottomMargin=(int)(Convert.ToDouble(Request.Form["tm_"+i])*600);
wb.IELeftMargin=(float)Convert.ToDouble(Request.Form["lm_"+i]);
wb.IERightMargin=(float)Convert.ToDouble(Request.Form["rm_"+i]);
wb.IETopMargin=(float)Convert.ToDouble(Request.Form["tm_"+i]);
wb.IEBottomMargin=(float)Convert.ToDouble(Request.Form["bm_"+i]);
wb.HeaderHTML=ht;
wb.FooterHTML="<hr>";
wb.OutputDirectory=Server.MapPath("/ictm/soft/tmp/reports");
//wb.Prt2DiskSettings=wb.XMLData();
int ixi = wb.DoPrint("124.217.245.184", 54545);
//int ixi = wb.DoPrint("192.168.0.106", 64320);
if (ixi!=0) {
Response.Write("There is a error "+ ixi);
Response.End();
}
string wr = wb.Wait("124.217.245.184", 54545, 90, "");
if (wr!="019"){
if (wr == "099")
{ Response.Write("<font color='red'><em>Margin inconsistent with printable area. Please check your margins and page size.</em></font>"); }
else
{ Response.Write("There is a PDF Job " + wr); }
Response.End();
}
wb.Wait(400);
Response.Write(htm);
wb.FromString(wb.Prt2DiskSettings);
conn.Open();
OleDbCommand comm = new OleDbCommand("insert into ictm_print_TmpPdfs (proj_id,file_name) values ('" + Session.Contents["proj_id"].ToString() + "','" + wb.NewUniqueID + "')", conn);
comm.ExecuteNonQuery();
conn.Close();
Response.Redirect("/ictm/soft/tmp/reports/"+wb.NewDocumentName + ".PDF");
}catch(Exception ex){
//check error here naveed
Response.Write("----"+ex.ToString());
}
%>