The page already has the 'SqlDependency="CommandNotification"' attribute specified in the OutputCache directive. On such ...

The page already has the 'SqlDependency="CommandNotification"' attribute specified in the OutputCache directive.  On such a page, it is an error to create a SqlCacheDependency object using a SqlCommand object.

There are two ways to solve this problem:
1.Do not use the 'SqlDependency="CommandNotification"' attribute in the OutputCache directive.
2.On the SqlCommand object set SqlCommand.NotificationAutoEnlist to false.  The side effect is that that SqlCommand object will not affect the output caching of the page.