c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.dll" /debug- /optimize+ /w:4 /nowarn:1659;1699  "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.1.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.2.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.7.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.4.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.8.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.6.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.3.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.5.cs"
Microsoft (R) Visual C# 2005 编译器 版本 8.00.50727.42
用于 Microsoft (R) Windows (R) 2005 Framework 版本 2.0.50727
版权所有 (C) Microsoft Corporation 2001-2005。保留所有权利。e:\www\PetShop\Web\App_Code\CategoryDataProxy.cs(6,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“Model”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\CategoryDataProxy.cs(7,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“BLL”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\CategoryDataProxy.cs(8,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“CacheDependencyFactory”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\ItemDataProxy.cs(6,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“Model”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\ItemDataProxy.cs(7,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“BLL”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\ItemDataProxy.cs(8,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“CacheDependencyFactory”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\WebUtility.cs(4,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“BLL”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\WebUtility.cs(6,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“CacheDependencyFactory”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\ProductDataProxy.cs(6,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“Model”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\ProductDataProxy.cs(7,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“BLL”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\ProductDataProxy.cs(8,15): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“CacheDependencyFactory”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\CategoryDataProxy.cs(21,29): error CS0246: 找不到类型或命名空间名称“CategoryInfo”(是否缺少 using 指令或程序集引用?)
e:\www\PetShop\Web\App_Code\CategoryDataProxy.cs(52,23): error CS0246: 找不到类型或命名空间名称“CategoryInfo”(是否缺少 using 指令或程序集引用?)
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.7.cs(19,28): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“BLL”(是缺少程序集引用吗?)
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.7.cs(28,28): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“BLL”(是缺少程序集引用吗?)
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\petshop_web\8aa52946\8db60f68\App_Code.qo1g8mv3.7.cs(37,28): error CS0234: 命名空间“PetShop”中不存在类型或命名空间名称“Model”(是缺少程序集引用吗?)
e:\www\PetShop\Web\App_Code\ItemDataProxy.cs(22,29): error CS0246: 找不到类型或命名空间名称“ItemInfo”(是否缺少 using 指令或程序集引用?)
e:\www\PetShop\Web\App_Code\ItemDataProxy.cs(53,23): error CS0246: 找不到类型或命名空间名称“ItemInfo”(是否缺少 using 指令或程序集引用?)
e:\www\PetShop\Web\App_Code\ProductDataProxy.cs(22,29): error CS0246: 找不到类型或命名空间名称“ProductInfo”(是否缺少 using 指令或程序集引用?)
e:\www\PetShop\Web\App_Code\ProductDataProxy.cs(54,29): error CS0246: 找不到类型或命名空间名称“ProductInfo”(是否缺少 using 指令或程序集引用?)
e:\www\PetShop\Web\App_Code\ProductDataProxy.cs(86,23): error CS0246: 找不到类型或命名空间名称“ProductInfo”(是否缺少 using 指令或程序集引用?)

解决方案 »

  1.   

    下面是源码,请问这是什么原因引起的,怎么解决?
    行 1:    using System;
    行 2:    using System.Web;
    行 3:    using System.Web.Caching;
    行 4:    using System.Collections.Generic;
    行 5:    using System.Configuration;
    行 6:    using PetShop.Model;
    行 7:    using PetShop.BLL;
    行 8:    using PetShop.CacheDependencyFactory;
    行 9:    
    行 10:   namespace PetShop.Web {
    行 11:       public class CategoryDataProxy {
    行 12:   
    行 13:           private static readonly int categoryTimeout = int.Parse(ConfigurationManager.AppSettings["CategoryCacheDuration"]);
    行 14:           private static readonly bool enableCaching = bool.Parse(ConfigurationManager.AppSettings["EnableCaching"]);
    行 15:   
    行 16:           /// <summary>
    行 17:           /// This method acts as a proxy between the web and business components to check whether the 
    行 18:           /// underlying data has already been cached.
    行 19:           /// </summary>
    行 20:           /// <returns>List of CategoryInfo from Cache or Business component</returns>
    行 21:           public static IList<CategoryInfo> GetCategories() {
    行 22:   
    行 23:               Category cat = new Category();
    行 24:   
    行 25:               if (!enableCaching)
    行 26:                   return cat.GetCategories();
    行 27:   
    行 28:               string key = "category_all";
    行 29:               IList<CategoryInfo> data = (IList<CategoryInfo>)HttpRuntime.Cache[key];
    行 30:   
    行 31:               // Check if the data exists in the data cache
    行 32:               if (data == null) {
    行 33:                   // If the data is not in the cache then fetch the data from the business logic tier
    行 34:                   data = cat.GetCategories();
    行 35:   
    行 36:                   // Create a AggregateCacheDependency object from the factory
    行 37:                   AggregateCacheDependency cd = DependencyFacade.GetCategoryDependency();
    行 38:   
    行 39:                   // Store the output in the data cache, and Add the necessary AggregateCacheDependency object
    行 40:                   HttpRuntime.Cache.Add(key, data, cd, DateTime.Now.AddHours(categoryTimeout), Cache.NoSlidingExpiration, CacheItemPriority.High, null);
    行 41:               }
    行 42:   
    行 43:               return data;
    行 44:           }
    行 45:   
    行 46:           /// <summary>
    行 47:           /// This method acts as a proxy between the web and business components to check whether the 
    行 48:           /// underlying category has already been cached.
    行 49:           /// </summary>
    行 50:           /// <param name="categoryId">Category Id</param>
    行 51:           /// <returns>CategoryInfo from Cache or Business component</returns>
    行 52:           public static CategoryInfo GetCategory(string categoryId) {
    行 53:   
    行 54:               Category category = new Category();
    行 55:   
    行 56:               if (!enableCaching)
    行 57:                   return category.GetCategory(categoryId);
    行 58:   
    行 59:               string key = "category_" + categoryId;
    行 60:               CategoryInfo data = (CategoryInfo)HttpRuntime.Cache[key];
    行 61:   
    行 62:               // Check if the data exists in the data cache
    行 63:               if (data == null) {
    行 64:   
    行 65:                   // If the data is not in the cache then fetch the data from the business logic tier
    行 66:                   data = category.GetCategory(categoryId);
    行 67:   
    行 68:                   // Create a AggregateCacheDependency object from the factory
    行 69:                   AggregateCacheDependency cd = DependencyFacade.GetCategoryDependency();
    行 70:   
    行 71:                   // Store the output in the data cache, and Add the necessary AggregateCacheDependency object
    行 72:                   HttpRuntime.Cache.Add(key, data, cd, DateTime.Now.AddHours(categoryTimeout), Cache.NoSlidingExpiration, CacheItemPriority.High, null);
    行 73:               }
    行 74:               return data;
    行 75:           }
    行 76:       }
    行 77:   }
    行 78:
      

  2.   

    你不能只能编译WEB项目,你打开petshop的解决方法,有很多项目
      

  3.   

    按照上面两位提供的方法在VS里编译并运行看到了页面,但回到IIS下又出现新问题了,提示如下:
    配置错误 
    说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。 分析器错误信息: 未能使用提供程序“RsaProtectedConfigurationProvider”进行解密。提供程序返回错误信息为: 打不开 RSA 密钥容器。源错误: 
    行 2:  <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    行 3:   <connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
    行 4:   <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
    行 5:   <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
    行 6:   <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
     源文件: E:\www\petshop\web\web.config    行: 4 
    --------------------------------------------------------------------------------
    版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.42 
      

  4.   

    网站 添加引用-》添加 System.Configuration
      

  5.   

    petshop4.0,,当你安装完毕后,,它有一个安装步骤,你照着它的安装进行操作就可以了..
    我就是这样做的,,,运行良好..
      

  6.   

    郁闷~还有很多问题没有解决,看书ing...
      

  7.   

    安装好后,要先生成解决方案,网站项目下会多出一个Bin文件夹,如果有没有相应程序集,请酌情添加。