title: Service Reference could not be found
body: <p>I've created new website ( not web project ),
  In solution explorer right click on project and clicked <strong>Add Service Reference</strong></p>
  
  <p>then I've add a web service provider address, a new folder named <strong>App_WebReferences</strong> created. It contains ServiceReference1 folder in which there are three files(two .svcinfo and one .wsdl).</p>
  
  <p>Now I use this code as my provider guided:</p>
  
  <pre><code>var srv = new ServiceReference1.PaymentIFBindingSoapClient();
  double result = srv.verifyTransaction(refNum, "10004738");
  </code></pre>
  
  <p>there is no error in compilation and running in localhost.
  BUT
  when I upload my website files to my ftp on the server..<strong>I get this error message</strong>:</p>
  
  <pre><code>*Server Error in '/' Application.
  Compilation Error
  Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 
  **Compiler Error Message:** CS0246: The type or namespace name 'ServiceReference1'     could not be found (are you missing a using directive or an assembly reference?)
  Source Error:
  
  Line 69:             ///WebService Instance
  Line 70:             //
  Line 71:             var srv = new ServiceReference1.PaymentIFBindingSoapClient();
  Line 72:             
  Line 73:             double result = srv.verifyTransaction(refNum, "10004738");
  
  Source File: d:\domains\olomrayaneh.net\wwwroot\ebook\check_payment.aspx.cs    Line: 71 
  
  Show Detailed Compiler Output:
  Show Complete Compilation Source:
  
  Version Information: Microsoft .NET Framework Version:2.0.50727.3643; ASP.NET     Version:2.0.50727.3634*
  </code></pre>
  
  <p>I've stuck in this problem. 
  Whats the problem!?
  How should I solve it?</p>
  
  <p>I should say that I tried to add this line:</p>
  
  <pre><code>using ServiceReference1;
  </code></pre>
  
  <p>then the error message line changes to this line with the same message !</p>
  
  <p>and again no error message in localhost running!</p>
  
  <p>my website is build in .Net Framework 3.5</p>
  
  <p>web.config -- after adding server reference, these lines added to web.config file:</p>
  
  <pre><code>    &lt;system.serviceModel&gt;
                  &lt;bindings&gt;
     &lt;basicHttpBinding&gt;
      &lt;binding name="PaymentIFBindingSoap" closeTimeout="00:01:00"
                   openTimeout="00:01:00" receiveTimeout="00:10:00"     sendTimeout="00:01:00"
       allowCookies="false" bypassProxyOnLocal="false"     hostNameComparisonMode="StrongWildcard"
       maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
       messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
       useDefaultWebProxy="true"&gt;
       &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
       &lt;security mode="Transport"&gt;
        &lt;transport clientCredentialType="None" proxyCredentialType="None"
         realm="" /&gt;
        &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
       &lt;/security&gt;
      &lt;/binding&gt;
      &lt;binding name="PaymentIFBindingSoap1" closeTimeout="00:01:00"
       openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
       allowCookies="false" bypassProxyOnLocal="false"     hostNameComparisonMode="StrongWildcard"
       maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
       messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
       useDefaultWebProxy="true"&gt;
       &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
       &lt;security mode="None"&gt;
        &lt;transport clientCredentialType="None" proxyCredentialType="None"
         realm="" /&gt;
        &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
       &lt;/security&gt;
      &lt;/binding&gt;
     &lt;/basicHttpBinding&gt;
    &lt;/bindings&gt;
          &lt;client&gt;
     &lt;endpoint     address="https://acquirer.samanepay.com:2789/payments/referencepayment.asmx"
      binding="basicHttpBinding" bindingConfiguration="PaymentIFBindingSoap"
      contract="ServiceReference1.PaymentIFBindingSoap" name="PaymentIFBindingSoap" /&gt;
    &lt;/client&gt;
          &lt;/system.serviceModel&gt;
  </code></pre>