0

I have little problem... I'm trying to run Skype Bot on new Microsoft Bot Framework on my own host with IIS. Because it's written in Node.js, I used iisnode to host it. Node is working on it, but when I test I get this error:

MethodNotAllowed
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>
<title>405 - P��kaz HTTP pou�it� k p��stupu na tuto str�nku nen� povolen.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} 
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;} 
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} 
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Chyba serveru</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>405 � P��kaz HTTP pou�it� k p��stupu na tuto str�nku nen� povolen.</h2>
<h3>Hledanou str�nku nelze zobrazit, proto�e do�lo k pokusu o p��stup pomoc� neplatn� metody (p��kazu HTTP).</h3>
</fieldset></div>
</div>
</body>
</html>

(It's in Czech, sorry)

This is app.js (Main script):

// Add your requirements
var restify = require('restify'); 
var builder = require('botbuilder');

// Setup Restify Server
var server = restify.createServer();
server.listen(process.env.PORT || 3000, function() 
{
console.log('%s poslouchá na %s', server.name, server.url); 
});

// Create chat bot
var connector = new builder.ChatConnector
({ appId: 'CENSORED', appPassword: 'CENSORED' }); 
var bot = new builder.UniversalBot(connector);
server.post('/api/messages', connector.listen());

// Create bot dialogs
bot.dialog('/', function (session) {
session.send("Hello World!");
});

It's just example I found here (https://blogs.msdn.microsoft.com/sarahsays/2016/06/01/microsoft-bot-framework-part-1/) I made it working locally with Microsoft Bot Framework Channel Emulator, so code is right.

I don't want to buy Azure for this...

Thanks for response :)

1 Answer 1

0

This post is quite old but you most probably have CORS issues - How are you testing ? Seems like the OPTIONS method (part of CORS preflight) is not being allowed. You have to enable CORS and most probably a config setting in IIS to allow HTTP methods other than the standard GET/PUT. (HEAD also comes to mind)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.