'ScriptServiceAttribute' is ambiguous in the namespace 'System.Web.Script.Services'

Last post 08-15-2007 10:18 AM by alivemedia. 0 replies.

Sort Posts:

  • 'ScriptServiceAttribute' is ambiguous in the namespace 'System.Web.Script.Services'

    08-15-2007, 10:18 AM
    • Member
      43 point Member
    • alivemedia
    • Member since 06-21-2006, 5:34 PM
    • Posts 54

    I am using the AJAX Toolkit AutoCompleteExtender and it works great on my Dev machine but posted live I get the following error:

     'ScriptServiceAttribute' is ambiguous in the namespace 'System.Web.Script.Services' - Line 11 is the culprit apparently.

    1    Line 9:  <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
    2    Line 10: <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    3    Line 11: <System.Web.Script.Services.ScriptService()> _
    4    Line 12: Public Class SearchSuggest
    5    Line 13:      Inherits System.Web.Services.WebService
    I am using the 3.5 BETA 2 Framework and everything has run flawlessly, and this runs flawlessly on my dev mahcine.
     Here's my webservice code:
    1    Imports System.Web
    2    Imports System.Web.Services.Protocols
    3    Imports System.Collections.Generic
    4    Imports System.Web.Services
    5    
    6    ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    7    ' <System.Web.Script.Services.ScriptService()> _
    8    <WebService(Namespace:="http://tempuri.org/")> _
    9    <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
    10   <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    11   <System.Web.Script.Services.ScriptService()> _
    12   Public Class SearchSuggest
    13        Inherits System.Web.Services.WebService
    14   
    15       <WebMethod()> _
    16       Public Function SuggestSearch(ByVal prefixText As String) As String()
    17           Dim db As New DataClassesDataContext
    18           Dim products = (From p In db.Products Where p.ProductName.Contains(prefixText) Select p.ProductName)
    19           Dim installtions = (From p In db.Installations Where p.BoatDescription.Contains(prefixText) Select p.BoatDescription)
    20   
    21           Dim resultsArray As New List(Of String)
    22           resultsArray.AddRange(products.ToList)
    23           resultsArray.AddRange(installtions.ToList)
    24   
    25           Return resultsArray.ToArray
    26       End Function
    27   
    28   End Class
    
      Here is my scriptmanager / autocompleteextender code:
     
    1     <asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
    2            <Services>
    3                    <asp:ServiceReference Path="SearchSuggest.asmx" />
    4             </Services>
    5        </asp:ScriptManager>
    6       <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtSearchBox" ServicePath="SearchSuggest.asmx" ServiceMethod="SuggestSearch" MinimumPrefixLength="3" CompletionSetCount="20" EnableCaching="True" CompletionInterval="300" CompletionListCssClass="searchList" ></cc1:AutoCompleteExtender>
    7       
    
     
    Anyone else run into this problem?
Page 1 of 1 (1 items)