title: Web Service reference error (asp/vb.net)
body: <p>i'm trying to use a web service on my web application writed on visual studio 2012.</p>
  
  <p>this is my web service:</p>
  
  <pre><code>Imports System.Web.Services
  Imports System.Web.Services.Protocols
  Imports System.ComponentModel
  
  ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
  &lt;System.Web.Script.Services.ScriptService()&gt; _
  &lt;System.Web.Services.WebService(Namespace:="http://tempuri.org/")&gt; _
  &lt;System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)&gt; _
  &lt;ToolboxItem(False)&gt; _
  Public Class WebService1
      Inherits System.Web.Services.WebService
  
      &lt;WebMethod()&gt; _
      Public Function HelloWorld() As String
         Return "Hello World"
      End Function
  
  End Class
  </code></pre>
  
  <p>web.config configuration:</p>
  
  <pre><code>&lt;system.web&gt;
  
      &lt;httpHandlers&gt;
        &lt;remove verb="*" path="*.asmx"/&gt;
        &lt;add verb="*" path="*.asmx"
          type="System.Web.Script.Services.ScriptHandlerFactory"
           validate="false"/&gt;
      &lt;/httpHandlers&gt;
  
  ....
  
  &lt;/system.web&gt;
  </code></pre>
  
  <p>decleared on the site.master</p>
  
  <pre><code>&lt;asp:ScriptManager runat="server"&gt;
          &lt;Services&gt;
              &lt;asp:ServiceReference
              path="../WebService1.asmx" /&gt;
          &lt;/Services&gt;
  
  .....
  
  &lt;/asp:ScriptManager&gt;
  </code></pre>
  
  <p>The call from javascript triggered from a button</p>
  
  <pre><code>function provaWebService() {
              alert("entrato")
              WebService1.HelloWorld(onSuccess);
          }
  
          function onSuccess(result) {
              alert(result)
          }
  </code></pre>
  
  <p>I'm getting this error from firefox console: ReferenceError: WebService1 is not defined </p>
  
  <p>and</p>
  
  <p>ReferenceError: Type is not defined</p>
  
  <p>Some help?</p>