简体   繁体   English

在运行IIS 5.1的XP上使用Web.Caching不可用?

[英]Using Web.Caching on XP Running IIS 5.1 Not available?

Environment: I am working on a site in ASP.Net 2.0 running on IIS6; 环境:我正在IIS6上运行的ASP.Net 2.0网站上工作; I am developing locally on WinXP which runs IIS 5.1, using VS2005 and VB. 我正在使用VS2005和VB在运行IIS 5.1的WinXP上进行本地开发。

Issue: I am trying to create caching for some business layer objects (actually creating a caching layer) using System.web.caching.cache. 问题:我正在尝试使用System.web.caching.cache为某些业务层对象创建缓存(实际上是创建缓存层)。 This should be available under System.Web namespace but all that I seem to have access to are: AspNetHostingPermission, AspNetHostingPermissionAttribute and AspNetHostingPermissionLevel (I have a reference to System.Web in the project and imports in the class). 这应该在System.Web命名空间下可用,但我似乎可以访问的所有东西都是:AspNetHostingPermission,AspNetHostingPermissionAttribute和AspNetHostingPermissionLevel(我在项目中有对System.Web的引用,并且在类中具有导入)。 There are quite a few other classes (eg, HTTPRuntime) which also do not appear (this is per the "Using SQL Cache Dependencies" tutorial http://www.asp.net/web-forms/tutorials/data-access/caching-data/using-sql-cache-dependencies-vb ). 还有很多其他类(例如HTTPRuntime)也不会出现(这是根据“使用SQL缓存依赖项”教程http://www.asp.net/web-forms/tutorials/data-access/caching -data / using-sql-cache-dependencies-vb )。

I'm at the end of my rope and can't seem to find anything out there to explain this. 我已经走到尽头了,似乎找不到任何东西可以解释这一点。 Has anyone been in this situation and seen this before? 有人在这种情况下见过吗? Any help getting this solved is MUCH appreciated! 非常感谢您对此解决方案的任何帮助!

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; 在System.web的列表中,未选中其他名称空间。 checking System.Web.Caching and recompiling fixed the issue. 检查System.Web.Caching并重新编译可解决此问题。

Sometimes you're just toooooo close to something to realize the easy answer. 有时,您太接近某些东西了,无法实现简单的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Visual Studio 2005中使用Web安装程序项目影响IIS属性的配置 - How to affect configuration of IIS properties using Web Setup Project in Visual Studio 2005 问题,以查看在本地计算机上运行的Web服务 - Problem to see Web Services running on local machine C ++在Windows XP中使用VS2005,可以使用new运算符动态分配的最大字节数是多少? - C++ What's the max number of bytes you can dynamically allocate using the new operator in Windows XP using VS2005? IIS中的RESTful WCF托管 - RESTful WCF hosting in IIS 从XP到Windows 7的Visual Studio 2005安装项目 - visual studio 2005 setup project from xp to windows 7 在Windows XP下崩溃CAtlStringMgr :: GetInstance - Crash in CAtlStringMgr::GetInstance under Windows XP WiX,Visual Studio 2005,XP的问题 - Issues with WiX, Visual Studio 2005, XP ASMX Web服务 - “此Web服务使用http://tempuri.org/作为其默认命名空间。”消息 - 但它不应该是 - ASMX Web Service - “This web service is using http://tempuri.org/ as its default namespace.” message - but it shouldn't be 通过.NET应用程序运行CrystalReport是否不同于使用任何CrystalReport Designer运行它? - Is running a CrystalReport through a .NET application differs from running it using any CrystalReport Designer? 系统命令未使用变量作为参数运行exe文件 - system command not running exe file using variable as param
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM