Azure Web Service App; Invalid method deployed bot service via FTPS using the C# v4 template

Dan Holmes 21 Reputation points
2022-04-04T14:25:25.34+00:00

I am getting an invalid verb when i hit my bot service from the web chat . This worked locally and via ngrok using the bot emulator. Now when published to an azure web service i get the error. I don't know what else to try at this point.

Here's the handler section of the web.config.
<system.webServer>
<handlers>
<add name="aspNetCore" path="" verb="" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\imctest-regbogt.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>

I built the C# bot server with dotnet core using the command line and started with the 'echo' template.

HTTP Error 405.0 - Method Not Allowed</h3><h4>The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.</h4></div><div class="content-container"><fieldset><h4>Most likely causes:</h4><ul> <li>The request sent to the Web server used an HTTP verb that is not allowed by the module configured to handle the request.</li> <li>A request was sent to the server that contained an invalid HTTP verb.</li> <li>The request is for static content and contains an HTTP verb other than GET or HEAD.</li> <li>A request was sent to a virtual directory using the HTTP verb POST and the default document is a static file that does not support HTTP verbs other than GET or HEAD.</li> </ul></fieldset></div><div class="content-container"><fieldset><h4>Things you can try:</h4><ul> <li>Verify the list of verbs enabled for the module handler this request was sent to, and ensure that this verb should be allowed for the Web site.</li> <li>Check the IIS log file to see which verb is not allowed for the request.</li> <li>Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
941 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 48,906 Reputation points Microsoft Employee Moderator
    2022-04-05T07:17:11.047+00:00

    @Dan Holmes I believe you have used this solution to build the echo-bot locally and test it with the emulator?
    Have you used these guidelines to deploy the bot to Azure? I think the project files were not correctly created since the deployment file takes care of the hosting with the Azure app service. Could you please check to confirm if these are correctly created?

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.