500错误与Twilio C#REST API在Azure上分期 [英] 500 error with Twilio C# REST Api on Azure Staging

查看:334
本文介绍了500错误与Twilio C#REST API在Azure上分期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

以上code段是工作在本地主机上正常,但当我们发布并尝试使用相同的直播现场,我们得到一个500 error.We正在使用的Windows Azure托管我们的website.It未达到在production.Can上述code的第一行,你告诉我,为什么?任何帮助将是非常美联社preciated。

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.

请注意:我已经检查发表version.It的具有低于的dll动态链接库。
Twilio.Api.dll和RestSharp.dll

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

站点链接:的Twilio C#助手库

推荐答案

Twilio传道这里。

Twilio evangelist here.

有当部署到$ P $从寻找正确的ASP.NET MVC的依赖pvents库中的Web角色与Twilio MVC助手库的已知问题。

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.

目前的解决办法是抢库的来源,更新依赖于ASP.NET MVC 3或更高版本并重新编译。

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.

希望有所帮助。

这篇关于500错误与Twilio C#REST API在Azure上分期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆