Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 10th, 2006, 11:46 PM
jobo jobo is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 141 jobo User rank is Corporal (100 - 500 Reputation Level)jobo User rank is Corporal (100 - 500 Reputation Level)jobo User rank is Corporal (100 - 500 Reputation Level)jobo User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 23 h 11 m 14 sec
Reputation Power: 6
Thumbs down Response is not available in this context

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

Reply With Quote
  #2  
Old October 11th, 2006, 04:38 PM
jobo jobo is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 141 jobo User rank is Corporal (100 - 500 Reputation Level)jobo User rank is Corporal (100 - 500 Reputation Level)jobo User rank is Corporal (100 - 500 Reputation Level)jobo User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 23 h 11 m 14 sec
Reputation Power: 6
Thumbs up it all comes down to "oops"

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

Reply With Quote
  #3  
Old October 11th, 2006, 10:11 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 19 m 36 sec
Reputation Power: 181
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

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > Response is not available in this context


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT