|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi All,
An existing and unchanged web app is now giving "Response is not available in this context". It seems to be a solid failure, which makes sense given the error, but it used to work. The line that fails is: Code:
if (Request.Cookies[strCookieName] == null) // Cookie doesn't exist not like this is a big deal. This is within the code-behind of the class that inherits UI.Page Code:
public class Logon : System.Web.UI.Page What the page does is take a uid/pw and sets up a cookie if it's okay. Each page_load checks the cookie and redirects to logon if it fails. Oddly, the other pages don't throw an exception. 1) why would this fail when it used to work? 2) what just changed about iis (security update)? 3) what is an intelligent way to enforce user security? Thanks for your thoughts, Joe |
|
#2
|
|||
|
|||
|
Okay, this was just a simple debugging problem. Before, I had said it threw an exception in a component that inherited Page. Somehow I was in the wrong routine, and it threw the exception in a component that did not inherit Page. But, long ago, I stuck in some boilerplate code to handle the exception by redirecting to an error window, which from this component was out of context. The exception had never occurred before, so essentially it was untested code. More single-stepping uncovered the issue, which was actually a database exception - string would be truncated. So now I let the exception bubble up to the presentation layer, and it displays the exception window.
Joe |
|
#3
|
|||
|
|||
|
Thanks for posting your solution, I had no idea on this one
![]()
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > Response is not available in this context |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|