Ошибка 302 iis

2 Answers

Check at the IIS level, not ASP.NET level.

Check the IIS management console. Possible options are:

  • «URL rewrite module»
  • «HTTP redirect» (under the website settings, for IIS7)

answered May 21, 2015 at 18:53

Serge Shultz's user avatar

Serge ShultzSerge Shultz

5,8983 gold badges27 silver badges17 bronze badges

1

  • I checked the web config and the only URL Rewrite I found is this — Request.ServerVariables[«logon_user»].ToString(). I’m not finding HTTP Redirect in IIS. Where specifically is it?

    May 21, 2015 at 19:05

It can happen if you return a CSS file in ASP.NET over http when it should be over https, ive seen that happen in the past. Also if any web services tied into that application that are getting hit or making passes that fail, that could cause it too. Just shooting from my hip and trying to recall the last time I seen those issue’s arise.

answered May 21, 2015 at 18:57

TGarrett's user avatar

TGarrettTGarrett

5624 silver badges15 bronze badges

1

  • Do you know how a failed service call will generate a 302? Doesn’t make sense to me. The app is making plenty of these, however.

    May 21, 2015 at 19:07

2 Answers

Check at the IIS level, not ASP.NET level.

Check the IIS management console. Possible options are:

  • «URL rewrite module»
  • «HTTP redirect» (under the website settings, for IIS7)

answered May 21, 2015 at 18:53

Serge Shultz's user avatar

Serge ShultzSerge Shultz

5,8983 gold badges27 silver badges17 bronze badges

1

  • I checked the web config and the only URL Rewrite I found is this — Request.ServerVariables[«logon_user»].ToString(). I’m not finding HTTP Redirect in IIS. Where specifically is it?

    May 21, 2015 at 19:05

It can happen if you return a CSS file in ASP.NET over http when it should be over https, ive seen that happen in the past. Also if any web services tied into that application that are getting hit or making passes that fail, that could cause it too. Just shooting from my hip and trying to recall the last time I seen those issue’s arise.

answered May 21, 2015 at 18:57

TGarrett's user avatar

TGarrettTGarrett

5624 silver badges15 bronze badges

1

  • Do you know how a failed service call will generate a 302? Doesn’t make sense to me. The app is making plenty of these, however.

    May 21, 2015 at 19:07

User965212790 posted

You guys are correct, sorry. I thank you for your help.

I succeeded in setting up the logging.

Now the new file showed up in here: C:\inetpub\logs\FailedReqLogFiles\W3SVC1\fr000059.xml

There are many lines of log. I could find the problematic section in the log:

248.	ASP_SCRIPT_TRACE_START	FilePath="C:\INETPUB\WWWROOT\CT\DEFAULT.ASP"
249.	ASP_SCRIPT_TRACE_COM_CALL_START	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="88", CurrentStatement="If sDirectory <> Left(Request.ServerVariables("URL"), 8) Then", SizeOfStatement="61"
250.	ASP_SCRIPT_TRACE_COM_CALL_END	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="88", CurrentStatement="If sDirectory <> Left(Request.ServerVariables("URL"), 8) Then", SizeOfStatement="61"
251.	ASP_SCRIPT_TRACE_COM_CALL_START	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="88", CurrentStatement="If sDirectory <> Left(Request.ServerVariables("URL"), 8) Then", SizeOfStatement="61"
252.	ASP_SCRIPT_TRACE_COM_CALL_END	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="88", CurrentStatement="If sDirectory <> Left(Request.ServerVariables("URL"), 8) Then", SizeOfStatement="61"
253.	ASP_SCRIPT_TRACE_COM_CALL_START	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="89", CurrentStatement="If 0<>Len(Request.ServerVariables("QUERY_STRING")) Then", SizeOfStatement="55"
254.	ASP_SCRIPT_TRACE_COM_CALL_END	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="89", CurrentStatement="If 0<>Len(Request.ServerVariables("QUERY_STRING")) Then", SizeOfStatement="55"
255.	ASP_SCRIPT_TRACE_COM_CALL_START	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="89", CurrentStatement="If 0<>Len(Request.ServerVariables("QUERY_STRING")) Then", SizeOfStatement="55"
256.	ASP_SCRIPT_TRACE_COM_CALL_END	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="89", CurrentStatement="If 0<>Len(Request.ServerVariables("QUERY_STRING")) Then", SizeOfStatement="55"
257.	ASP_SCRIPT_TRACE_COM_CALL_START	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="92", CurrentStatement="Response.Redirect sDirectory & Mid(Request.ServerVariables("URL"), 9)", SizeOfStatement="69"
258.	ASP_SCRIPT_TRACE_COM_CALL_END	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="92", CurrentStatement="Response.Redirect sDirectory & Mid(Request.ServerVariables("URL"), 9)", SizeOfStatement="69"
259.	ASP_SCRIPT_TRACE_COM_CALL_START	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="92", CurrentStatement="Response.Redirect sDirectory & Mid(Request.ServerVariables("URL"), 9)", SizeOfStatement="69"
260.	ASP_SCRIPT_TRACE_COM_CALL_END	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="92", CurrentStatement="Response.Redirect sDirectory & Mid(Request.ServerVariables("URL"), 9)", SizeOfStatement="69"
261.	ASP_SCRIPT_TRACE_COM_CALL_START	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="92", CurrentStatement="Response.Redirect sDirectory & Mid(Request.ServerVariables("URL"), 9)", SizeOfStatement="69"
262.	ASP_SCRIPT_TRACE_COM_CALL_END	FilePath="C:\INETPUB\WWWROOT\CT\CERTSBRT.INC", LineNumber="92", CurrentStatement="Response.Redirect sDirectory & Mid(Request.ServerVariables("URL"), 9)", SizeOfStatement="69"
263.	ASP_SCRIPT_TRACE_END	FilePath="C:\INETPUB\WWWROOT\CT\DEFAULT.ASP"
264.	ASP_END_SCRIPT_EXECUTION	
265.	MODULE_SET_RESPONSE_SUCCESS_STATUS	ModuleName="IsapiModule", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="302", HttpReason="Object moved"
266.	NOTIFY_MODULE_COMPLETION	ModuleName="IsapiModule", Notification="EXECUTE_REQUEST_HANDLER", fIsPostNotificationEvent="false", CompletionBytes="0", ErrorCode="The operation completed successfully.
		 (0x0)"

Now let’s look at the CERTSBRT.INC

It is originally a part of CertSvr folder, which I copied to «Ct» folder

87. ' first, make sure we have the right URL to prevent cookie problems.
88.	If sDirectory <> Left(Request.ServerVariables("URL"), 8) Then
89.		If 0<>Len(Request.ServerVariables("QUERY_STRING")) Then
90.			Response.Redirect sDirectory & Mid(Request.ServerVariables("URL"), 9) & "?" & Request.ServerVariables("QUERY_STRING")
91.		Else
92.			Response.Redirect sDirectory & Mid(Request.ServerVariables("URL"), 9)
		End If
		Response.End
	End If

The original error is line 88. I looked up the value of sDirectory, there is first mention in that file on line 6:

6. sDirectory = "/ct"

Back to the line 88, the statement Left(Request.ServerVariables(«URL»), 8) is designed for string «/certsvr», therefore the length is 8.

Finally, the fix is to change the value in that statement on line 88. In my case «/ct» is 3 chars. The fixed line would be:

88.	If sDirectory <> Left(Request.ServerVariables("URL"), 3) Then

So, I brought this all on myself just by copying the CertSrv folder and not paying the attention to details.

Lucee Dev

Loading

Search code, repositories, users, issues, pull requests…

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Понравилась статья? Поделить с друзьями:
  • Ошибка 302 found nginx
  • Ошибка 302 apache
  • Ошибка 302 django
  • Ошибка 302 arduino
  • Ошибка 302 api