By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,473 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

Question: How do I setup site/browser to see data via Response.write before error in ASP occurs?

P: n/a


I have an ASP program that is getting an error. When I get the error I
get Page Cannot Be Displayed along with the line that causes the error
and what the error is. What I am not getting is any data that I write
via response.write before the error occurs. The error is happening in a
loop, on the third line below:

RESPONSE.WRITE("x=" & x & ", " & aFieldsData(UpdateRecNum,x) &
"<BR>")
tFLD = trim(aFieldsData(UpdateRecNum,x))
tFLD = Replace(tFLD,chr(34),"&quot;")

In efforts to figure out what is causing the error I added the
Response.write line before the line that gets the error. However when I
run the webpage, I do not see any of the response.writes. I only see
the error (which I include below).
So I do I set things up so I will see the data that I write via
Response.write before the error occurs?

I am using IE 6.0, XP Pro.
I disabled the "Show Friendly HTTP Error Messages" and in IIS I checked
"Send Detailed ASP Error Messages to Client".

This is all that I see when it crashes:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot
be displayed.

------------------------------------------------------------------------
--------

Please try the following:

Click the Refresh button, or try again later.

Open the gclnt11 home page, and then look for links to the information
you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

------------------------------------------------------------------------
--------

Technical Information (for support personnel)

Error Type:
Microsoft VBScript runtime (0x800A005E)
Invalid use of Null: 'Replace'
/functions.asp, line 210
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)

Page:
POST 275 bytes to /patient_lab_visit.asp

POST Data:
AP_PHYS_NUM=%230000000085&AP_DATE=3%2F10%2F2004&AP _BP=&SUGGESTED_RETURN_
DATE=&AP_LAB_CODE=00036%23&AP_INR=12&AP_USER_UPDT= CCOLE&AP_PAT_DOSE=2.5&
AP_PAT_DRUGNUM=0&NT_NOTE=&frmAction=Submit&v_Updat ePat_N . . .

Time:
Wednesday, March 10, 2004, 11:17:35 AM
More information:
Microsoft Support
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Just before the line where the error occurs put in response.en

You should use this for debugging only, as it stops all execution of the page
Jul 19 '05 #2

P: n/a
Colin Colin wrote:
So I do I set things up so I will see the data that I write via
Response.write before the error occurs?


Put Response.End after the Response.Write

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #3

P: n/a
You can also tell IIS to not use the "fancy" error page.

Go into IIS admin, select the virtual directory, right-click and pick
properties.
select the custom errors tab
scroll down and select the 500;100 error
click "set to default"

After that you will get the page output up until the error occurs followed
by the error message.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Brad Simon" <an*******@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
Just before the line where the error occurs put in response.end

You should use this for debugging only, as it stops all execution of the

page
Jul 19 '05 #4

P: n/a
I prefer inserting a response.flush command into the loop. This is
especially useful for when you don't know exactly where in the loop the
error is occuring.

Cheers,
Nicolas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #5

P: n/a

I used: Response.Buffer = False and it seems to work. Any drawbacks in
doing it this way compared to the other suggestions?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #6

P: n/a
Using response.flush is simply over-riding the buffering. Which way you
do it is up to you.

Cheers,
Nicolas
http://www20.brinkster.com/intefacesa/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.