0

環境: IIS6 で実行されている ASP.Net 2.0 のサイトで作業しています。VS2005 と VB を使用して、IIS 5.1 を実行する WinXP でローカルに開発しています。

問題: System.web.caching.cache を使用して、いくつかのビジネス レイヤー オブジェクトのキャッシュを作成しようとしています (実際にはキャッシュ レイヤーを作成しています)。これは System.Web 名前空間で利用できるはずですが、アクセスできるのは AspNetHostingPermission、AspNetHostingPermissionAttribute、および AspNetHostingPermissionLevel (プロジェクトで System.Web への参照があり、クラスでインポートされている) だけです。表示されない他のクラス (HTTPRuntime など) もかなりあります (これは、「SQL キャッシュ依存関係の使用」チュートリアルhttp://www.asp.net/web-forms/tutorials/data-access/cachingによるものです)。 -data/using-sql-cache-dependencies-vb )。

私はロープの終わりにいて、これを説明するものをそこに見つけることができないようです. 誰かがこの状況にあり、これを以前に見たことがありますか? これを解決するための助けは大歓迎です!

4

1 に答える 1

0

OK, so not sure why I didn't think of this before but I checked the references tab under the project properties. In the list for System.web, the additional namespaces were unchecked; checking System.Web.Caching and recompiling fixed the issue.

Sometimes you're just toooooo close to something to realize the easy answer.

于 2012-03-16T14:24:00.113 に答える