部署WCF数据客户端

部署WCF数据客户端

问题描述:

我在将使用WCF数据服务的应用程序部署到运行3.5 SP1的IIS服务器时遇到了问题。

Hi, I'm having trouble deploying an application that consumes a WCF data service to an IIS server running 3.5 SP1.

我收到错误BC30002:类型'System.Data.Services.Common.EntitySetAttribute'未定义。

I'm getting an error BC30002: Type 'System.Data.Services.Common.EntitySetAttribute' is not defined.



我复制了版本为3.5的System.Data.Services.Client.dll。 30729.5004到服务器的bin目录。在


I copied System.Data.Services.Client.dll with version of 3.5.30729.5004 to the server's bin directory. In

web.config程序集中,引用为:

web.config assemblies the reference is:

< add assembly =" System.Data.Services.Client,Version = 3.5。 0.0,Culture = neutral,PublicKeyToken = B77A5C561934E089" />

<add assembly="System.Data.Services.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

代码在使用3.5框架中的datasvcutil生成的类中停止。

The code stops in a class generated using datasvcutil from the 3.5 framework.

第82行:     &LT; Global.System.Data.Services.Common.EntitySetAttribute(QUOT; MYTABLE&QUOT;),&NBSP; _
$
第83行:      Global.System.Data.Services.Common.DataServiceKeyAttribute(QUOT;&的myKey QUOT)&GT;&NBSP; _
$
第84行:    部分公共类mytable

Line 82:     <Global.System.Data.Services.Common.EntitySetAttribute("mytable"),  _
Line 83:      Global.System.Data.Services.Common.DataServiceKeyAttribute("mykey")>  _
Line 84:     Partial Public Class mytable



我使用了datasvcutil,因为我无法在VS 2008中添加服务引用,可能是因为该服务是WCF Data 4.0。 &NBSP;该应用程序在VS 2008中构建并运行良好。


I used datasvcutil because I wasn't able to add a service reference in VS 2008, maybe because the service is WCF Data 4.0.  The application builds and runs fine in VS 2008.

任何疑难解答提示都将受到赞赏。

Any troubleshooting hints would be appreciated.

谢谢,肖恩

通过将VS dev网站内容添加到新的ASP.Net网站项目,构建并发布,将precompiled_web文件夹复制到IIS服务器来解决。
Solved by adding VS dev site contents to new ASP.Net web site project, build and publish, copy precompiled_web folder to IIS server.