{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/682","repository_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/682/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/682/comments","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/682/events","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/issues/682","id":177019526,"number":682,"title":"Host crashes when using tedious to connect to a database.","user":{"login":"ahmelsayed","id":645740,"avatar_url":"https://avatars.githubusercontent.com/u/645740?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmelsayed","html_url":"https://github.com/ahmelsayed","followers_url":"https://api.github.com/users/ahmelsayed/followers","following_url":"https://api.github.com/users/ahmelsayed/following{/other_user}","gists_url":"https://api.github.com/users/ahmelsayed/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmelsayed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmelsayed/subscriptions","organizations_url":"https://api.github.com/users/ahmelsayed/orgs","repos_url":"https://api.github.com/users/ahmelsayed/repos","events_url":"https://api.github.com/users/ahmelsayed/events{/privacy}","received_events_url":"https://api.github.com/users/ahmelsayed/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels/lang-js","name":"lang-js","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"mamaso","id":9870694,"avatar_url":"https://avatars.githubusercontent.com/u/9870694?v=3","gravatar_id":"","url":"https://api.github.com/users/mamaso","html_url":"https://github.com/mamaso","followers_url":"https://api.github.com/users/mamaso/followers","following_url":"https://api.github.com/users/mamaso/following{/other_user}","gists_url":"https://api.github.com/users/mamaso/gists{/gist_id}","starred_url":"https://api.github.com/users/mamaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamaso/subscriptions","organizations_url":"https://api.github.com/users/mamaso/orgs","repos_url":"https://api.github.com/users/mamaso/repos","events_url":"https://api.github.com/users/mamaso/events{/privacy}","received_events_url":"https://api.github.com/users/mamaso/received_events","type":"User","site_admin":false},"assignees":[{"login":"mamaso","id":9870694,"avatar_url":"https://avatars.githubusercontent.com/u/9870694?v=3","gravatar_id":"","url":"https://api.github.com/users/mamaso","html_url":"https://github.com/mamaso","followers_url":"https://api.github.com/users/mamaso/followers","following_url":"https://api.github.com/users/mamaso/following{/other_user}","gists_url":"https://api.github.com/users/mamaso/gists{/gist_id}","starred_url":"https://api.github.com/users/mamaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamaso/subscriptions","organizations_url":"https://api.github.com/users/mamaso/orgs","repos_url":"https://api.github.com/users/mamaso/repos","events_url":"https://api.github.com/users/mamaso/events{/privacy}","received_events_url":"https://api.github.com/users/mamaso/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-09-14T21:00:06Z","updated_at":"2016-09-27T19:17:12Z","closed_at":null,"body":"Please provide a succinct description of the issue.\r\n\r\n#### Repro steps\r\n\r\nProvide the steps required to reproduce the problem\r\n\r\n* Create a node http function\r\n\r\n* `index.js`\r\n\r\n```javascript\r\nvar Connection = require('tedious').Connection;  \r\nvar config = {  \r\n    userName: 'username',  \r\n    password: 'PASSWORD',  \r\n    server: 'server.database.windows.net',  \r\n    options: {encrypt: true, database: 'AdventureWorks'}  \r\n};  \r\n\r\nmodule.exports = function(context, req, saasSql) {\r\n\r\n    var connection = new Connection(config);  \r\n    connection.on('connect', function(err) {  \r\n        if(err) {\r\n            context.log(err);\r\n        } else {\r\n            context.log(\"Connected\");  \r\n\r\n            context.res = {\r\n                body: 'Connected'\r\n            };\r\n        }\r\n     context.done();\r\n    });  \r\n};\r\n```\r\n\r\n* `package.json`\r\n\r\n```json\r\n{\r\n    \"dependencies\": {\r\n        \"tedious\": \"*\"\r\n    }\r\n}\r\n```\r\n\r\n* `function.json`\r\n\r\n```json\r\n{\r\n  \"bindings\": [\r\n    {\r\n      \"authLevel\": \"function\",\r\n      \"type\": \"httpTrigger\",\r\n      \"direction\": \"in\",\r\n      \"name\": \"req\"\r\n    },\r\n    {\r\n      \"type\": \"http\",\r\n      \"direction\": \"out\",\r\n      \"name\": \"res\"\r\n    }\r\n  ],\r\n  \"disabled\": false\r\n}\r\n```\r\n\r\n* Hit run\r\n\r\n#### Expected behavior\r\n\r\nError maybe, I don't know\r\n\r\n#### Actual behavior\r\n\r\nw3wp.exe crashes\r\n\r\n#### Known workarounds\r\n\r\nnone\r\n\r\n#### Related information \r\n\r\n* original issue https://github.com/projectkudu/AzureFunctionsPortal/issues/548\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments/249968838","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/issues/682#issuecomment-249968838","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/682","id":249968838,"user":{"login":"fabiocav","id":2507935,"avatar_url":"https://avatars.githubusercontent.com/u/2507935?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiocav","html_url":"https://github.com/fabiocav","followers_url":"https://api.github.com/users/fabiocav/followers","following_url":"https://api.github.com/users/fabiocav/following{/other_user}","gists_url":"https://api.github.com/users/fabiocav/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiocav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiocav/subscriptions","organizations_url":"https://api.github.com/users/fabiocav/orgs","repos_url":"https://api.github.com/users/fabiocav/repos","events_url":"https://api.github.com/users/fabiocav/events{/privacy}","received_events_url":"https://api.github.com/users/fabiocav/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T19:17:12Z","updated_at":"2016-09-27T19:17:12Z","body":"@finvamp1 is still running into this issue. He'll make the code available in a repo so we can repro."}}
{"actor":{"display_login":"fabiocav"}}