简体   繁体   English

调试时无需对IIS日志进行写访问

[英]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. 我不知道ASP ,我刚刚开始为一家大公司工作,并且把asp-classic Web应用程序丢在我的腿上,但它不起作用。 No one knows anything about it and apparently I am not allowed to write to IIS log files. 没有人对此一无所知,显然不允许我写IIS日志文件。 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 . 到目前为止,该程序似乎失败了,因为据我所知,在IE开发人员控制台中看到的POST ed HTTP参数被发送后再也无法发送到服务器,并且无法在其Request.Form找到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? 有谁知道该怎么做,以及如何在可以访问它的地方打印出Response.QueryString

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. 我可以看到日志文件,但是无法像在Linux上使用PHPApache一样添加自己的调试行。 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. 该程序失败的证明是,有一个名为ASPXTOASP.ASP的程序,我认为该程序将.Net请求参数转换为经典参数正在中断。 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. 我不确定我对Web应用程序的所有组件都了解得足够多,无法将其组织到桌面上的工作版本中进行调试。

  4. I've just used Response.Write and Response.End to write the Request.QueryString to the screen. 我刚刚使用Response.WriteResponse.EndRequest.QueryString写入屏幕。 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. 基于这一点以及一个事实,即紧接该程序之前的程序称为login.aspx ,该程序包括设置一些与AD身份验证有关的EV,我认为我的问题必定是身份验证配置问题。 We are using Active Directory for authentication. 我们正在使用Active Directory进行身份验证。 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? 谁能告诉我有关IIS中任何特定设置的信息,我可以要求管理员/高级开发人员解决这些问题?

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. 1)如果您正在现场进行调试,则可以将所有Request.Form值输出到HTML注释中,以使您的用户不受影响。

<!-- <%
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 . 2)如果可以使用Visual Studio调试计算机上的Web应用程序,请参见此答案以了解如何调试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. 我以为我现在需要阅读有关HTTP参数消失的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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