classic asp in vb script HTML Render Error - asp-classic

ABCpdf error '80070000'
HTML render is blank.
D:\TPABENEFITS\WEB810678\REPORTS../../pages/reports/makepdf.asp, line 240
Hi, recently our website started showing this errors:
ABCpdf error '80070000'
HTML render is blank.
/admin/trucks_printpdfpayments_pdf.asp, line 12
i looked up the error to see what would need to be done to fix it, please note i have no idea how asp works, the original programer of this site is no longer with the company.
Here is a link to the suppourt website: http://www.websupergoo.com/support.htm#security
on 6.7 on ABCpdf it tells me i can add a line of code before (i think the line having an error)
the code would be: Doc.SetInfo 0, "HostWebBrowser", "0"
i have tried and tested it on several places on the file, though since i have no idea what the code is doing i would not really know were to place it.
on a side note, if you know of any places online to study this code let me know

Related

CS0117: 'System.Web.UI.HtmlControls.HtmlAnchor' does not contain a definition for 'Text'

I received this error when trying to put a couple of C# projects live. The sites were working locally in VS 2010 but on live they threw the following error:
CS0117: 'System.Web.UI.HtmlControls.HtmlAnchor' does not contain a definition for 'Text'
This was the code having the issue in the code file of the master page:
litHome.Text = "active";
In the source the master page I had this:
<li>home</li>
The error being thrown appeared to think I was setting the text property of an HTML Anchor.
I've just fixed this myself but after not being able to find the solution on here (or Google) I thought I'd post it for anyone else having the problem. Please see my comments below as I'm not allowed to answer this yet.
sir
html controls doesn't have (.Text) extensions in this case you can use (.Value) instead to solve your problem ,it will return u same thing which in returned in case of .Text.If u still face ant problem just let me know which control u r using
in code behind
string abc=htmlTextbox.Value;
Issue was down to having a literal inside an anchor tag (used to dynamically set a CSS class) with quotes instead of apostrophes. Done this many times but only today when putting 2 new sites live did this problem come up (perhaps someone can explain why it's only coming up now, new validation in VS service pack perhaps?) Anyway, the following code errors:
<li>home</li> Needs to be:
<li>home</li> Hope that helps someone

FPDF with Classic ASP, Image Error

Let's preface this post by saying... Yes, I know I'm a dinosaur for using Classic ASP in this day and age!
I'm using FPDF.asp to generate a PDF on the fly.
Everything works fine and as expected on my test server. On my live server, however, I encounter an error, if I try to output an image as part of my PDF. I know the syntax is correct, since it works on the test server as it should.
The error I receive on my live server is: "File does not begin with '%PDF-'."
If I comment out the line that adds the image, the file loads up properly and error-free!
Does anyone have any idea, as to what may need to be corrected on the live server to eliminate this problem???
Any help would be most appreciated.
Mitch
Update!
Not sure why having an image or not makes the difference, BUT the solution turned out to be that I had some HTML code mixed in with the output and this caused FPDF to fail when an image was included.
Removed the HTML code and problem solved!
-Mitch

Outputting Images in ASP FPDF problem

Hi
I'm attempting to use the ASPFPDF class to output an image on a pdf using the very simple code below:
<!--#include file="fpdf.asp"-->
<%
Dim pages
Dim pdf
Set pdf=CreateJsObject("FPDF")
pdf.CreatePDF "P", "mm", "A4"
pdf.SetPath "fpdf/"
pdf.Open()
pdf.AddPage("P")
pdf.Image "invoiceheader.jpg"
pdf.Output ()
%>
When run, this script should open the pdf but with Adobe Reader I get a "File does not begin with %pdf" message. I've tried using other readers with similar results.
If I remove the image line and output some text (e.g. pdf.Cell 40,5,"Date",0,1,"R"), everything works perfectly.
Anyone got any ideas before I go mad!
Thank you.
Try this one
pdf.Image "IMAGES/invoiceheader.jpg", 140, 22, 50, 40
Here 140 is the x position, 22 is the y-position 50 is the width and 40 is the height.
I don't know AspFPdf, but don't you need to specify a folder where the image is to be found ?
Did you try ?
pdf.Image "fpdf/invoiceheader.jpg"
As I said, I don't know the component, just my thoughts (although you have propably tried this yourself).
[EDIT] Look at the website of Asp Fpdf and saw the following in the documentation:
file
Path or URL of the image.
Asp fPdf : Image parameter
Anyway: thanks for pointing me in the direction of this component (even though this was not your intention). I can use this too ;-)
Just thought I'd update people as I've spent ages and have finally got this working. What you don't see due to random error messages is that the FPDF application creates a temporary PDF as it's building it. By default, it will create it in the same folder as your asp page that runs it.
e.g. My page was in my web root \createpdf.asp
I worked out that it was trying to create a file called D10456.tmp (name changes each time) in my web root but it couldn't due to security.
I added an output file name and changed the security in another folder to allow write access and it worked first time.
Code for output file:
pdf.Output server.mappath("pdfs\list.pdf"),"F"
The PDFS folder must have write access to work.
Hope that helps people.
The answer by Paul is also correct for the format of adding an image in ASP.
Also, I had to change the images.asp file which is located in the includes directory.
I had to change the line:
this.Buffer.LoadFromFile(Server.MapPath("\\") + ("\\") + ("Images") + ("\\") + pFileName);
to
this.Buffer.LoadFromFile(Server.MapPath(pFileName));
because it was looking in the wrong folder for my images.
The answer to the above question is that the FPDF seems to need to be on a fully qualified domain - I was running on a machine with using a custom hosts file to point the URL at the development server. As soon as I moved the code to the live server, everything worked!
I don't fully understand why, but this might help someone else...
I found that the only way I could add images was as follows:-
pdf.Image "./byimage.jpg",x,y,width
This is how i manage to display my image in ASP classic page:
pdf.Image "fpdf/header.jpg", 10, 10,80,20, "jpg"
if not mistakes, this is how to define the variables (correct me if i'm wrong):
pdf.image "folder/image.type", x-coordinate, y-coordinate, img width, img height, "image type"
hope it helps. because i've spent many days just to find how to display the image in my asp classic page..

Error: Object Expected Code 0 Char 1 Line 474

done some html code updates on my company's asp.net website and the above error appears.
i dont have a line 474 on the errored file.
this error only on IE, and not FF.
anybody?
Check inside the source control and try eliminating the changes 1 by 1 until the problem is under control. Then you should have the change that caused it.
It's a javascript error. You're trying to dereference a null pointer in javascript.
These go quietly unless Script Debugging is turned on in IE. If that's the case, you can debug the error by choosing to debug with Visual Studio. Visual Studio Express Web Developer may do as well.
You may be able to see the bug in Firefox as well. Go to "Tools" > "Error Console" in Firefox. Select "Errors", then "Clear" toolbar buttons. Refresh the page then you may see the actual javascript line that's causing the error.
I'll bet you DO have a line 474. Maybe not in your aspx page in Visual Studio, but probably in your browser window. Run the page and view source inside your browser. Then go to line 474 (maybe by pressing CTRL-G). That should point you to the spot.
Another possibility is that the JS error is talking about line 474 in a linked .js file.
Have you tried debugging the page in Visual Studio have you been editing in Notepad? If you debug in VS, you'll see the JS error right away.
As mentioned this codingforums thread, in JScript (IE's equivalent to JavaScript) you should avoid using variable names that are equal to your HTML field names or reserved words for JavaScript/JScript (and possibly HTML?).
So avoid the likes of:
var myname = document.myform.myname.value;
var text = document.myform.myname.value;

umbraco tiny MCE 3 internet explorer insert link error

I have an instalation of Umbraco 4.0.2.1. In internet explorer (6 / 7) i get an error when trying to insert a link using the tiny MCE rich text editor. basicaly what happens is i can choose the node in the site i want to link to but when i click insert it reloads but the tiny MCE popup does not dissapear and i get the following page error.
Line: 368
Char: 9
Error: 'the Form._SCROLLPOSITIONX.value' is null or not an object
code: 0
URL: "mydev server"/umbraco/plugins/tinymce3/insertLink.aspx
I dont get this problem in Firefox and i have other instalations of umbraco 4.0.2.1 in which this error does not occur. I have tried using WinMerge to comparing the code of the two instalations and they seem identical in all the places i can think would have an effect on tinyMCE ("bin", "umbraco_client\tinymce3", "umbraco\plugins\tinymce3")
I am pulling my hair out over this and any help would be very much appreciated.
I'm not sure about this, but at first glimps I noticed the URL in the error message:
"mydev server"..
My guess: the javascript code cant handle the quotes in the url.
possible solution: remove the space from your server name.
again, its just a guess, hopefully will solve your problem.

Resources