Question : Need help with 'System.Web.UI.ScriptManager is not defined error

Hello experts
I am having trouble adding components that use Ajax to an existing site.
When I try to compile the site, I get these errors:
'System.Web.UI.ScriptManager' is not defined
'System.Web.UI.UpdatePanel' is not defined.

Here is the webconfig I have now.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
    <configSections>
        <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
        <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>
    <appSettings >
{SECTION OMMITTED}
    </appSettings>
    <connectionStrings>
        
{SECTION OMMITTED}
    </connectionStrings>
    <system.web>
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.

            Visual Basic options:
            Set strict="true" to disallow all data type conversions 
            where data loss can occur. 
            Set explicit="true" to force declaration of all variables.
        -->
        <!--<compilation debug="false" strict="false" explicit="true" />-->
        <roleManager defaultProvider="AspNetSqlRoleProvider" enabled="true">
            <providers>
                <clear/>
                <add name="AspNetSqlRoleProvider" connectionStringName="gmembers" applicationName="/TestSiteApp" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
            </providers>

        </roleManager>
        <profile enabled="true">
            <providers>

            </providers>
            <!-- Define the properties for Profile... -->
            <properties>
                <add name="Country" type="string"/>
                <add name="Gender" type="string"/>
                <add name="Age" type="Int32"/>
            </properties>
        </profile>

        <compilation debug="true">
            <codeSubDirectories>
                <add directoryName="csharp"/>
                <add directoryName="vb"/>
            </codeSubDirectories>
            <assemblies>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Data.Services.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Data.Services.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <!--ADDITIONS-->
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
        <pages>
            <namespaces>
                <clear />
                <add namespace="System" />
                <add namespace="System.Collections" />
                <add namespace="System.Collections.Specialized" />
                <add namespace="System.Configuration" />
                <add namespace="System.Text" />
                <add namespace="System.Text.RegularExpressions" />
                <add namespace="System.Web" />
                <add namespace="System.Web.Caching" />
                <add namespace="System.Web.SessionState" />
                <add namespace="System.Web.Security" />
                <add namespace="System.Web.Profile" />
                <add namespace="System.Web.UI" />
                <add namespace="System.Web.UI.WebControls" />
                <add namespace="System.Web.UI.WebControls.WebParts" />
                <add namespace="System.Web.UI.HtmlControls" />
                <!--ADDITIONS-->
                <add namespace="System.Data"/>
                <add namespace="System.Data.SqlClient"/>
                <add namespace="System.IO"/>
            </namespaces>
            <!--ADDITIONS-->
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </controls>
        </pages>
        <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->

        <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
        <customErrors mode="Off" />
        <httpModules>
            <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
        </httpModules>
        <httpHandlers>
            <add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
        </httpHandlers>
        <httpRuntime executionTimeout="600" maxRequestLength="150000"/>
        <authentication mode="Forms">
            <forms name=".TestAuth" loginUrl="login.aspx" defaultUrl="~/default.aspx"></forms>
        </authentication>
        <!--<authorization>
      <deny users="?" />
    </authorization>-->
        <membership defaultProvider="MyAspNetSqlMembershipProvider">
            <providers>
                <clear/>
                <add name="MyAspNetSqlMembershipProvider"
                type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, &#xD;&#xA;Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

                connectionStringName="gmembers"
                enablePasswordRetrieval="false"
                enablePasswordReset="true"
                requiresQuestionAndAnswer="false"
                requiresUniqueEmail="false"
                passwordFormat="Hashed"
                maxInvalidPasswordAttempts="5"
                minRequiredPasswordLength="4"
                minRequiredNonalphanumericCharacters="0"
                passwordAttemptWindow="10"
                passwordStrengthRegularExpression=""
                applicationName="/TestSiteApp"/>
            </providers>
        </membership>
    </system.web>
    <location path="register.aspx">
        <system.web>
            <authorization>
                <allow users="*"/>
            </authorization>
        </system.web>

    </location>



    <rewriter>

        <!--*********** IMPORTANT!!!!!!!!!! **************
    Where there are sub folders ~/admin/code an alias CAN NOT be written for just the root folder, eg ~/admin -->
        <!--2 column articles with default side nav-->
        <rewrite url="~/MakeADifference/dosomething.aspx" to="~/MakeADifference/Instant.aspx" />
        <rewrite url="~/admin/(.+)/(.+).aspx" to="~/bands/default.aspx" />
        <rewrite url="~/news/(.+)/(.+).aspx" to="~/pages/article.aspx?id=$1&amp;title=$2" />
        <rewrite url="~/bands/(.+)/(.+).aspx" to="~/pages/band.aspx?id=$1&amp;title=$2" />
        <rewrite url="~/makeadifference/(.+)/(.+).aspx" to="~/pages/article.aspx?id=$1&amp;title=$2" />
        <!--2 column articles with no side nav-->
        <rewrite url="~/daylove/(.+)/(.+).aspx" to="~/pages/article_nonav.aspx?id=$1&amp;title=$2" />
        <rewrite url="~/info/order/(.+)/(.+).aspx" to="~/pages/article_nonav.aspx?id=$1&amp;title=$2"/>
        <rewrite url="~/info/notice/(.+)/(.+).aspx" to="~/pages/article_wide.aspx?id=$1&amp;title=$2"/>
        <rewrite url="~/info/bands/(.+)/(.+).aspx" to="~/pages/article_wide.aspx?id=$1&amp;title=$2"/>

    </rewriter>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules>
            <remove name="ScriptModule"/>
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </modules>
        <security>
            <authentication>
                <basicAuthentication enabled="false" />
            </authentication>
        </security>
        <defaultDocument>
            <files>
                <clear />
                <add value="default.aspx" />
            </files>
        </defaultDocument>
        <httpRedirect enabled="false">
            <clear />
        </httpRedirect>
        <httpProtocol>
            <customHeaders>
                <clear />
                <add name="X-Powered-By" value="ASP.NET" />
            </customHeaders>
        </httpProtocol>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </handlers>
        <!--<runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
          <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
          <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
          <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
          <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
      </assemblyBinding>
    </runtime>-->
        <directoryBrowse enabled="false" />
    </system.webServer>
</configuration>

Answer : Need help with 'System.Web.UI.ScriptManager is not defined error

>> 'ScriptManager' is ambiguous in the namespace 'System.Web.UI'
This error occurs when there are reference found in two assemblies.

>> Reference required to assembly 'System.Web.Extensions, Version=3.5.0.0, ...
Check whether the reference you added to 'System.Web.Extensions' is of right version of .Net Framework you are using. I think you are using Framework 3.5 and you have wrongly add reference some other version of 'System.Web.Extensions'
'View' Menu - 'Property Pages' - 'References' --- Here you can view the assemblies refered in your project and check whether all have the right version of .Net Framework selected. Especially for 'System.Web.UI' as mentioned in the first error.
Try my suggestion and please let me know
Raj
Random Solutions  
 
programming4us programming4us