'System.Web.Script.Services'不包含任何公共成员或无法找到

时间:2012-01-02 09:02:45

标签: asp.net web-config

我注意到我收到了编译器警告消息:

警告:BC40056:Imports的System.Web.Script.Services中指定的命名空间或类型不包含任何公共成员或无法找到。确保定义了名称空间或类型,并且至少包含一个公共成员。确保导入的元素名称不使用任何别名。

以下是web.config文件中的部分.... system.web.extensions没有解决这个问题吗?

<configuration>
  <configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
         <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>
 </configSections>
  <system.web>


<compilation debug="true" strict="false" explicit="true">
  <assemblies>
    <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  </assemblies>
</compilation>

<globalization requestEncoding="ISO-8859-1" responseEncoding="ISO-8859-1"/>
<httpRuntime executionTimeout="60" maxRequestLength="2048" />

<webServices>
  <protocols>
    <remove name="HttpSoap"/>
    <remove name="HttpPost"/>
    <remove name="HttpGet"/>
    <remove name="HttpPostLocalhost"/>
    <remove name="Documentation"/>
    <add name="HttpSoap"/>
    <add name="HttpPost"/>
    <add name="HttpGet"/>
    <add name="HttpPostLocalhost"/>
    <add name="Documentation"/>
  </protocols>
</webServices>


<sessionState mode="InProc" cookieless="false" timeout="70"/>
<customErrors mode="Off"/>
<pages>
  <controls>
    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </controls>
</pages>

<authentication mode="Forms">

  <forms defaultUrl="dashboard.aspx" loginUrl="index.aspx" slidingExpiration="true"  timeout="60">

  </forms>

</authentication>

1 个答案:

答案 0 :(得分:0)

好的,现在解决了。创建了新的asp.net 3.5网站作为我的复制并粘贴了几个与system.web.extensions相关的部分到了实时的网站。