Script does not exist in namespace. ScriptService could not be found

Preoncofopelo

New Member
I have been trying to get rid of three compiler errors for about a day now.The errors are as follows:\[code\]> Error 1 The type or namespace name 'Script' does not exist in the> namespace 'System.Web' (are you missing an assembly> reference?) D:\WebData\Intranet\depts\MSO\msow_reports\App_Code\SearchPract.cs 7 18 http://localhost/depts/MSO/msow_reports/> Error 2 The type or namespace name 'ScriptService' could not be found> (are you missing a using directive or an assembly> reference?) D:\WebData\Intranet\depts\MSO\msow_reports\App_Code\SearchPract.cs 14 2 http://localhost/depts/MSO/msow_reports/> Error 3 The type or namespace name 'Script' does not exist in the> namespace 'System.Web' (are you missing an assembly> reference?) D:\WebData\Intranet\depts\MSO\msow_reports\App_Code\SearchPract.cs 26 17 http://localhost/depts/MSO/msow_reports/\[/code\]The project is a .net 3.5 project that I'm trying to import into Visual Studio 2010. I've tried both updating to .net 4 and leaving it as .net 3.5. My understanding is that Script and ScriptService should be in the System.Web.Extensions dll. Adding a reference to this assembly doesn't appear to work.Please note the following excerpt from my Web.config file:\[code\]<compilation debug="true"> <assemblies> <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="eWorld.UI, Version=2.0.6.2393, Culture=neutral, PublicKeyToken=24D65337282035F2"/> <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <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"/> <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> </assemblies></compilation>\[/code\]The unhappy code is the following:\[code\]using System;using System.Collections.Generic;using System.Web.Services;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Web.Script.Services;/// <summary>/// Summary description for SearchPract/// </summary>[WebService(Namespace = "http://tempuri.org/")][WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)][ScriptService]// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService]public class SearchPract : System.Web.Services.WebService { public SearchPract () { //Uncomment the following line if using designed components //InitializeComponent(); } [System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod] public string[] GetPracts(string prefixText, int count) \[/code\]I wonder if I'm overlooking something obvious.Please let me know what other information I should provide.
 
Back
Top