Rom's Rants

Free-Roaming Hostility From A QA/Developer Perspective.

Friday, December 12, 2008

WORKAROUND: ASP.NET "Response filter is not valid."

Problem:

ASP.NET 3.5 web site. You are trying to set the Response.Filter property and you are getting an HttpException with the message "Response filter is not valid."

Cause:

There is a bug in ASP.NET 3.5 where you cannot set the Response.Filter property unless you read it first. When the Response.Filter property is first read, it instantiates some internal fields in the HttpWriter class.

Workaround:

Just read the property first so that it initializes the internal properties accordingly.

In VB:
Dim f = Response.Filter ' Assumes Option Infer On
Response.Filter = New FilterStream(Response.OutputStream) ' Where FilterStream is your stream
In C#:
var f = Response.Filter;
Response.Filter = new FilterStream(Response.OutputStream);

Labels: ,

posted by Michael Russell at | 2 Comments Links to this post | View blog reactions

Friday, December 05, 2008

Workaround: Ektron CMS400 7.5 Integrated Editing Breaks After Upgrade

Symptoms:

Your ASP.NET website is in a nested virtual folder underneath your Ektron CMS400 installation folder. For example, your Ektron 7.0 install folder is /CMS/ and your website is located at /CMS/Website/.

After upgrading to CMS400 7.5, integrated editing no longer works. You no longer get the green border or the white editing bubble.

Cause:

The session cookie for the CMS no longer matches the session cookie for the site.

Workaround:

Create a page on your site that contains three things. One, an IFRAME pointing to the login.aspx file in your Ektron CMS400 folder. Two, a button that calls in order in the code-behind the functions Session.Clear() and Session.Abandon() in that order. (I've tried them individually, but for some reason, it takes both of them for this to work in my testing environment.) Three, a link back to the home page of the site you want to edit.

Log into the CMS through your IFRAME.

After logging into the CMS, click the session kill button.

After clicking the session kill button, click the link back to the home page.

You'll have your editing environment back.

Labels: ,

posted by Michael Russell at | 1 Comments Links to this post | View blog reactions

Tuesday, February 05, 2008

WORKAROUND: The value for the property "Settings Property Name" is not valid for the current language.

Symptoms: You are setting up your DBML file in Visual Studio 2008 so that you can use LINQ to SQL, and when you try to compile, you get the following error message:
The value for the property "Settings Property Name" is not valid for the current language.
Cause:You are using a named connection string and the key for that connection string has a period in it, like "Sql.Finance.ReadWrite."

Solution: Rename your connection string key to get rid of the periods, and nag Microsoft to fix this issue.

Labels: , ,

posted by Michael Russell at | 0 Comments Links to this post | View blog reactions

Search



Previous Posts

Archives

View Michael Russell's profile on LinkedIn

I use Blogger. Do you?

Subscribe to
Posts [Atom]

Add to Technorati Favorites
I'm an atheist.