title: Bot Framework Getting Internal Error Code 500
body: <p>I wanted to try the new bot framework by microsoft. I made a simple bot  and registered it in bot connector.
  When I now want to test my bot on the dev.framework.com site I get this message back:</p>
  
  <pre><code>{
   "error": {
      "code": "Internal",
      "message": "An error occurred while sending the request. Unable to connect to the remote server An attempt was made to access a socket in a way forbidden by its access permissions 172.17.1.41:3978  [GSisZ6ZkL7d]",
      "statusCode": 500
   }
  }
  </code></pre>
  
  <p>This is my app.js:</p>
  
  <pre><code>var builder = require('botbuilder');
  var restify = require('restify');
  var index = require('./dialogs/index.js');
  
  var bot = new builder.BotConnectorBot({ appId: 'myAppId', appSecret: 'myAppSecret' });
  bot.add('/', index);
  
  var server = restify.createServer();
  server.post('/api/messages',  bot.listen());
  server.listen(process.env.port || 8080, process.env.ip, bot.verifyBotFramework(), function () {
      console.log('%s listening to %s', server.name, server.url); 
  });
  </code></pre>
  
  <p>When I run my app on openshift I get the console log "restify listening to <a href="https://myipaddress:8080" rel="nofollow">https://myipaddress:8080</a>", so I guess my node app is working.</p>
  
  <p>I also tried both https and http as endpoint with calling the bot.verifyBotFramework() and without.</p>