500 error with Twilio C# REST Api on Azure Staging

纵然是瞬间 提交于 2019-12-24 22:25:00

问题


var client = new TwilioRestClient(ConstantKeys.AccountSid,ConstantKeys.AuthToken); // instantiate a new Twilio Rest Client

var messageCallBack = client.SendMessage(ConstantKeys.SmsEnabledTwilioNumber, mobileNumber, smsMessage);

Above code snippet is working fine on localhost but when we publish and try to use the same on live site we are getting a 500 error.We are using windows azure for hosting our website.It doesn't reach the first line of the above code on production.Can you tell me why ? Any help would be highly appreciated.

Note :I have checked the dlls on published version.It's having below dlls. Twilio.Api.dll and RestSharp.dll

Site link : The Twilio C# Helper Library


回答1:


Twilio evangelist here.

There is a known issue with the Twilio MVC helper library when deployed to a web role that prevents the library from finding the correct ASP.NET MVC dependency.

Right now the work around is to grab the source of the library, update that dependency to ASP.NET MVC 3 or newer and recompile.

Hope that helps.



来源:https://stackoverflow.com/questions/28906898/500-error-with-twilio-c-sharp-rest-api-on-azure-staging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!