“System.Net.Sockets.SocketException”类型的Windows azure异常

时间:2014-07-01 09:15:48

标签: c# javascript visual-studio-2012 azure neo4j

我已经使用Neo4j虚拟机在windows azure中上传了一个MVC WEB Api解决方案。但是下面给出了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);
                });

1 个答案:

答案 0 :(得分:0)

在项目创建时,您是否在VisualStudio中配置了Azure端点? IP端点有一个单独的配置窗格。你如何调用你的ajax调用?你能发一些代码吗?

此致 马丁