title: The requested resource does not support http method 'GET'. Error Code 405
body: <p>Edit: Fixed now, apparently API classes cannot be static.</p>
  
  <p>I have a Web API</p>
  
  <pre><code> public sealed class DeploymentController : ApiController
  {
   [HttpGet]
  public static HttpResponseMessage Get([FromUri]Parameters deployment)
  {
    if (deployment == null) return new HttpResponseMessage(HttpStatusCode.BadRequest);
  
    DeploymentRepository.DetermineExtras(deployment);
    HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK);
    result.Content = new StreamContent(DeploymentRepository.GenerateStreamFromString
      (DeploymentRepository.GetDeployment(deployment)));
    result.Content.Headers.ContentType =
    new MediaTypeHeaderValue("application/cmd");
    result.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
    {
      FileName = "DeployApplication.vbs"
    };
    return result;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>that returns a file for download when invoked.</p>
  
  <p>This API is supposed to get called by Links the User clicks on.</p>
  
  <p>Like </p>
  
  <pre><code>http://localhost:52998/api/deployment?applicationname=something&amp;systemkind=anotherthing&amp;platformkind=Dotnet
  </code></pre>
  
  <p>But instead of the File, i get an Error 405.</p>
  
  <pre><code>A first chance exception of type 'System.Web.Http.HttpResponseException' occurred in System.Web.Http.dll
  iisexpress.exe Information: 0 : Response, Status=405 (MethodNotAllowed), Method=GET, Url=http://localhost:52998/api/deployment?applicationname=something&amp;systemkind=anotherthing&amp;platformkind=Dotnet, Message='Content-type='application/xml; charset=utf-8', content-length=unknown'
  iisexpress.exe Information: 0 : Operation=XmlMediaTypeFormatter.WriteToStreamAsync
  </code></pre>
  
  <p>I have already tried the methods suggested to similiar questions, so far without success.</p>