Error log not giving me a line number

I have an asp script on my 500 error page that sends me an email when someone hits the page.

the scripts works perfectly on all my sites, but 1 site on the same server it doesn't pass my the line number.
Is something set up incorrectly on IIS7
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Does it produce a line number in the IIS logs? (in teh IIS logs it says the error and description for classic asp errors)
Or does you custom page mess up this?
rivkamakAuthor Commented:
the custom page doesn't give me the right number. I want to be able to see the error and line number on the page as I hit the error, without having to go back into the server?
Where can I see the line number in the IIS error logs
David Johnson, CD, MVPOwnerCommented:

Note though that you cannot use this in your standard asp application pages and expect it to work. You need to modify the default error page (500-100.asp) which handles ASP error reporting and displays the results on the screen. To get the error emailed to you you can replace this page with your own version which will display a custom message to the user and then email the error report to you.
The syntax for returning the line number of the ASP error using the GetLastError object is :

set objError = Server.GetLastError()
strErrorLine = objError.Line

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rivkamakAuthor Commented:
Thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.