English 中文(简体)
是否对错误作了解释,“在名称空间系统中不存在哪类或名称空间名称。 网页:
原标题:Is there an explanation behind the error "The type or namespace name Script does not exist in the namespace System.Web "

我做了“伙伴关系”。 NET Empty Web Site”,《2010年视觉演播》。

在《申请》的法典档案中,我有“使用系统.Web.Serialization”;

当我把档案推向服务器时,我发现以下错误:

Exception message: c:inetpub[....]Extensions.cs(10): error CS0234: The type or namespace name Script does not exist in the namespace System.Web (are you missing an assembly reference?)

(服务器是视窗服务器,2008年有IIS 7和ASP。) NET 4.0 安装。

由于这是一个网站,而不是一个网络项目,因此我无法使用这里所宣传的“出版”特征:。 名称空间系统中不存在哪类或名称的密码。 www.un.org/Depts/DGACM/index_spanish.htm

Finally, after some digging, I figured out that this namespace is included in the System.Web.Extension assembly, and that I had to manually include it via the web.config:

<compilation debug="true" targetFramework="4.0">
    <assemblies>
        <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </assemblies>
</compilation>

因此,my问题:? 是否有更好的途径来做到这一点?

Since none of this is needed on my local project, how can I first determine what assemblies I ll need to reference manually, and second, how can I get the information required to do the referencing (i.e., how do I get the PublicKeyToken)?

<>>>>>

由于这是一个网站,而不是一个网络项目,我的参考资料清单没有显示until after。 我在网上添加这些内容。

因此,选择“Copy Local”为“true”并不在此发挥作用。

问题回答

象你的供应商一样,没有“钟码” System.Web.Extensions in the GAC.

www.un.org/Depts/DGACM/index_french.htm

如果你能够解决你的问题。

  1. Select System.Web.Extensions in your project References
  2. Go to properties tab and set Copy Local to true

这确保了你也能够部署这支部队。

“entergraph

enter image description here

Just add System.Web.Extensions as a reference to your project. You don t have to do it manually through web.config. Set Copy Local to true to make sure it is included in your distribution.

您可在网站项目中点击项目名称/地点,并选择。 页: 1 从那里将显示一个方言。 选择。 NET 表格和选择该系统。 Web.Extensions。 这应当增加该项目。 你可以为你需要增加的任何名称空间这样做。

我的问题与此类似,因为我曾经申请过世界森林论坛。 此外,英涅狄氏剂还不足以探测我需要哪些用途,以便即时进行贾瓦·古斯塔尔。 我后来发现,我需要增加使用系统。 网络:





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!