System.AccessViolationException

Jul 3, 2007 at 4:05 PM
Hi

I am regularly receiving the following exception when I call the GetFriendsAppUsers() method on an instance of the FaceBookService object (occasionally the method call works correctly but most of the time not at all). I'd be grateful for any advice on what might be causing this.

AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
System.Net.OSSOCK.recv(IntPtr socketHandle, Byte* pinnedBuffer, Int32 len, SocketFlags socketFlags) +0
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, SocketError& errorCode) +309
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +28
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +119

IOException: Unable to read data from the transport connection: Attempted to read or write protected memory. This is often an indication that other memory is corrupt..
System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size) +386
System.IO.StreamReader.ReadBuffer() +91
System.IO.StreamReader.ReadToEnd() +91
Facebook.Components.FacebookService.GetQueryResponse(String requestUrl, String postString) +374
Facebook.Components.FacebookService.ExecuteApiCallString(Dictionary`2 parameterDictionary, Boolean useSession) +178
Facebook.Components.FacebookService.GetUserInfoXml(String userIds) +318
Facebook.Components.FacebookService.GetUserInfo(String userIds) +130
Facebook.Components.FacebookService.GetUserInfo() +120
Akqa.PeaceOneDay.Facebook.Web.FacebookAuthModule.get_FacebookUser() in D:\PeaceOne\facebook-app\trunk\source\Akqa.PeaceOneDay.Facebook.Web\FacebookAuthModule.cs:35
Akqa.PeaceOneDay.Facebook.Website.Default.Page_Load(Object sender, EventArgs e) in D:\PeaceOne\facebook-app\trunk\source\Akqa.PeaceOneDay.Facebook.Website\Default.aspx.cs:24
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
Coordinator
Jul 3, 2007 at 4:49 PM
Do you only get this when using this method? Do you ever use other methods?

Do you (the machine that is hosting the app) access the internet through a proxy?