简体   繁体   中英

Debug without write access to IIS logs

I don't know ASP , I've just started working for a large corporation and had task with an asp-classic web app dumped in my lap and it doesn't work. No one knows anything about it and apparently I am not allowed to write to IIS log files. So far it would seem that the program is failing because as far as I can tell, the POST ed HTTP parameters, which I can see in IE developer console, being sent in never make it to the server and can not be found in its Request.Form . Does anyone know what to make of that and how I might be able to print out the Response.QueryString where I might have access to it?

Clarifications :

  1. I can see the log files but I can not add my own debugging lines as I am used to with PHP and Apache on Linux. I'm a fish out of water.

  2. Proof the program is failing is that there is a program called ASPXTOASP.ASP which I think turns .Net request parameters into classic parameters is breaking. It gets an index out of bounds exception and I think it's because it is being passed an empty query string. When I tried to write the query string somewhere it never showed up. Where might I be able to write this query string where I can view it?

  3. I am not certain I know enough about all of the components of the web app to organize it into a working version on my desktop for debugging.

  4. I've just used Response.Write and Response.End to write the Request.QueryString to the screen. It's empty. Based on this and the fact that the program immediately preceding the one that breaks is called login.aspx and consists of setting some EVs haing to do with AD authentication I think my issue must be an authentication configuration issue. We are using Active Directory for authentication. Could anyone tell me about any specific settings in IIS that I ask the admins/senior dev to poke at which might fix such an issue?

A couple of ideas to help you debug:

1) If you're debugging this on the live site, you could output all of the Request.Form values into an HTML comment so that your users aren't affected.

<!-- <%
dim key
for each key in Request.Form
    Response.Write key & "=" & Request.Form(key) & vbCrLf
next
%> -->

2) If you can debug the web app on your computer using Visual Studio, see this answer for how to debug ASP .

Based on the feedback I've received, the best solution to troubleshoot the application was to try to print the query string to the browser and then stop the program. To do this, I wrote something like this:

Response.Write("Query String: " & Request.QueryString)
Response.End  

Ultimately this led me to discover that my parameters had disappeared. The query string is empty. I supposed I'll now need to read Questions about disappearing HTTP parameters.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM