سؤال

I should preface this by stating that my experience with IIS is very limited. I am trying to deploy a Web API service on IIS 7.5 on an Azure server running Windows Server 2008 R2 Datacenter. Whenever I post to the service using Postman I get an "HTTP verb used to access this page is not allowed" error. Looking at the response headers through fiddler I see the following line under the Miscellaneous category: "Allow: GET, HEAD, OPTIONS, TRACE".

I deployed this application using a WebDeploy package and configured it so it would be a virtual directory under the Default Web Site. My current IIS configuration is as follows: IIS Configuration

Some of the things I've tried include:

  • Verifying that WebDAV is not installed

  • Edited the following Handler mappings for the Default Web Site and the Sync project to allow all verbs: ExtensionlessUrlHandler-Integrated-4.0, ExtensionlessUrlHandler-ISAPI-4.0_32bit, ExtensionlessUrlHandler-ISAPI-4.0_64bit, and ISAPI-dll

  • The default Web Site and the Sync app are both running under the DefaultAppPool which is set to .NET Framework 4.0.

  • The Sync App is targeting .NET framework 4.5

  • I've looked at Request Filtering for the Default Web Site and the Sync app and made sure that the POST verb is allowed under the HTTP Verbs section.

I am at a loss as to what to look at next so any hints are greatly appreciated.

هل كانت مفيدة؟

المحلول

After working with a colleague, we managed to get the web api service running to an extent. It currently shows an error message but it's one that we created which means the code is actually being hit. We had to give database permissions to the IIS_APPPOOL\DefaultAppPool user and re-register .net 4 with iis via the aspnet_regiis command.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top