title: Deploying WCF Tutorial App on IIS7: "The type could not be found"
body: <p>I've been trying to follow this <a href="http://msdn.microsoft.com/en-us/library/ms733766.aspx">tutorial</a> for deploying a WCF sample to IIS .
  I can't get it to work. This is a hosted site, but I do have IIS Manager access to the server. However, in step 2 of the tutorial, I can't "create a new IIS application that is physically located in this application directory". I can't seem to find a menu item, context menu item, or what not to create a new application. I've been right-clicking everywhere like crazy and still can't figure out how to create a new app. I suppose that's probably the root issue, but I tried a few other things (described below) just in case that actually is not the issue. Here is a picture of what I see in IIS Manager, in case my words don't do it justice:</p>
  
  <p><a href="http://www.freeimagehosting.net/uploads/d6edbaaf3c.png">No add Application Here http://www.freeimagehosting.net/uploads/d6edbaaf3c.png</a></p>
  
  <p>This is "deployed" at <a href="http://test.com.cws1.my-hosting-panel.com/IISHostedCalcService/Service.svc">http://test.com.cws1.my-hosting-panel.com/IISHostedCalcService/Service.svc</a> . The error says: </p>
  
  <pre><code>    The type 'Microsoft.ServiceModel.Samples.CalculatorService', 
  provided as the Service attribute value in the ServiceHost directive, 
  or provided in the configuration element
   system.serviceModel/serviceHostingEnvironment/serviceActivations 
  could not be found.
  </code></pre>
  
  <p>I also tried to create a virtual dir (IISHostedCalc) in dotnetpanel that points to IISHostedCalcService . When I navigate to <a href="http://test.com.cws1.my-hosting-panel.com/IISHostedCalc/Service.svc">http://test.com.cws1.my-hosting-panel.com/IISHostedCalc/Service.svc</a> , then there is a different error: </p>
  
  <pre><code>This collection already contains an address with scheme http.  
  There can be at most one address per scheme in this collection.
  </code></pre>
  
  <p>Interestingly enough, if I click on View Applications, it seems like the virtual directory is an application (see image below)... although, as per the error message above, it doesn't work.</p>
  
  <p><a href="http://www.freeimagehosting.net/uploads/f3230be046.png">Is this an app or not? http://www.freeimagehosting.net/uploads/f3230be046.png</a></p>
  
  <p>As per the tutorial, there was no compiling involved; I just dropped the files on the server as follow inside the folder IISHostedCalcService:</p>
  
  <pre><code>service.svc
  Web.config
  &lt;dir: App_Code&gt;
     Service.cs
  </code></pre>
  
  <p>service.svc contains:</p>
  
  <pre><code>&lt;%@ServiceHost language=c# Debug="true" Service="Microsoft.ServiceModel.Samples.CalculatorService"%&gt;
  </code></pre>
  
  <p>(I tried with quotes around the c# attribute, as this looks a little strange without quotes, but it made no difference)</p>
  
  <p>Web.config contains:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service name="Microsoft.ServiceModel.Samples.CalculatorService"&gt;
  
          &lt;!-- This endpoint is exposed at the base address provided by host:                                        http://localhost/servicemodelsamples/service.svc  --&gt;
          &lt;endpoint address=""
                    binding="wsHttpBinding"
                    contract="Microsoft.ServiceModel.Samples.ICalculator" /&gt;
  
          &lt;!-- The mex endpoint is explosed at http://localhost/servicemodelsamples/service.svc/mex --&gt;
          &lt;endpoint address="mex"
                    binding="mexHttpBinding"
                    contract="IMetadataExchange" /&gt;
        &lt;/service&gt;
      &lt;/services&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.web&gt;
      &lt;customErrors mode="Off"/&gt;
    &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Service.cs contains:</p>
  
  <pre><code>using System;
  using System.ServiceModel;
  
  namespace Microsoft.ServiceModel.Samples
  {
  
      [ServiceContract]
      public interface ICalculator
      {
          [OperationContract]
          double Add(double n1, double n2);
          [OperationContract]
          double Subtract(double n1, double n2);
          [OperationContract]
          double Multiply(double n1, double n2);
          [OperationContract]
          double Divide(double n1, double n2);
      }
  
  
      public class CalculatorService : ICalculator
      {
          public double Add(double n1, double n2)
          {
              return n1 + n2;
          }
          public double Subtract(double n1, double n2)
          {
              return n1 - n2;
          }
          public double Multiply(double n1, double n2)
          {
              return n1 * n2;
          }
          public double Divide(double n1, double n2)
          {
              return n1 / n2;
          }
      }
  }
  </code></pre>