Windows azure异常类型"System.Net.Sockets.SocketException“
本文关键字:Net System Sockets SocketException quot azure 异常 类型 Windows | 更新日期: 2023-09-27 18:11:00
我已经上传了一个MVC WEB Api解决方案在windows azure与Neo4j虚拟机。但是总是得到如下所示的500内部服务器错误。
{"$id":"1","Message":"An error has occurred.","ExceptionMessage":"An attempt was made to access a socket in a way forbidden by its access permissions","ExceptionType":"System.Net.Sockets.SocketException","StackTrace":" at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)'r'n at System.Net.Sockets.Socket.InternalBind(EndPoint localEP)'r'n at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)'r'n at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)'r'n at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)"}
如何解决这个问题?谁来帮帮我。
ajax请求示例如下
$.ajax({
async: false,
url: config.url() + 'api/Picture/ShowImage?url=' + imgId() + '&userid=' + localStorage.userid,
cache: false,
contentType: 'application/json; charset=utf-8',
// data: value,
success: function (data) {
}
}).fail(
function (xhr, textStatus, err) {
//alert(err);
});
您在创建项目时是否在VisualStudio中配置了Azure端点?IP端点有一个单独的配置窗格。如何调用ajax调用?你能贴一些代码吗?
问候,马丁