List Info

Thread: OutputCache & SqlDependency & PreCompiled asp.net BUG?




OutputCache & SqlDependency & PreCompiled asp.net BUG?
user name
2006-05-11 07:57:04
Is this a bug?

We have several user controls attached with a OutputCache
directive,
but without setting any SqlDependency.

It seems that the asp.net precompiler changes this into a
PartialCaching attribute, but with a "" (empty
string) value for the
SqlDependency. At runtime this fails, the format of
SqlDependency
string cannot be empty, it should contain a ref to a table
or
"CommandNotification".

I think the precompiler should have put null for the
SqlDependency
value (or the partial caching code should have handled null
and empty
strings as equal aka string.IsNullOrEmpty ... )

I have also tried to set the PartialCaching attribute myself
on the
usercontrol, with an explicit null value for the
SqlDependency, but
even in this case the precompiler changes the value into
"" (empty
string) <grr>

Now we have sticked "CommandNotification" into
it which seems to work,
but I have suddenly seen exceptions like

Exception:System.Web.HttpException: Unable to connect to SQL
Server
session database. ---> System.InvalidOperationException:
This
SqlCommand object is already associated with another
SqlDependency
object.

maybe it is not related but those exceptions were not
popping up before ...

// Ryan

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

OutputCache & SqlDependency & PreCompiled asp.net BUG?
user name
2006-05-16 06:39:55
In case some one is interested:

MS has managed to reproduce this bug, it has something to do
with ilmerge.
MS responded that current solution is to deploy the site
being updatable.
The team responsible for ilmerge will be contacted to see if
they can fix it.

For the time being, we took another route: we changed the
'CommandNotification' into a DB:Table form. The table
doesnt change
frequently so it should no be a problem. This approach seems
to solve
the exceptions we were having.

// Ryan

On 5/11/06, Ryan Heath <ryan.q.heathgmail.com> wrote:
> Is this a bug?
>
> We have several user controls attached with a
OutputCache directive,
> but without setting any SqlDependency.
>
> It seems that the asp.net precompiler changes this into
a
> PartialCaching attribute, but with a ""
(empty string) value for the
> SqlDependency. At runtime this fails, the format of
SqlDependency
> string cannot be empty, it should contain a ref to a
table or
> "CommandNotification".
>
> I think the precompiler should have put null for the
SqlDependency
> value (or the partial caching code should have handled
null and empty
> strings as equal aka string.IsNullOrEmpty ... )
>
> I have also tried to set the PartialCaching attribute
myself on the
> usercontrol, with an explicit null value for the
SqlDependency, but
> even in this case the precompiler changes the value
into "" (empty
> string) <grr>
>
> Now we have sticked "CommandNotification"
into it which seems to work,
> but I have suddenly seen exceptions like
>
> Exception:System.Web.HttpException: Unable to connect
to SQL Server
> session database. --->
System.InvalidOperationException: This
> SqlCommand object is already associated with another
SqlDependency
> object.
>
> maybe it is not related but those exceptions were not
popping up before ...
>
> // Ryan
>

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )