Re: .Net Remoting [FieldAccessException] - Workaround / Fix



Hi

As part of application development, we are using .Net framework 2.0.
for all the code in web and app tiers. The application references 1.1
DLLs for basic (legacy framework) services, such as, RBAC, Lists,
Menus, Remoting and so on...

All this works fine as long as the application runs in a single process
space on one logical tier. That is, we do not actually use any
remoting. When remoting is used, the types that are serialized by 1.1
binaries cannot be deserialized by the 2.0 binaries and vice versa. I
had to run numerous TCP traces to figure out what was happening at the
server side.

To work around this problem, I had to apply a remote interface around
the legacy framework functionality that is being used by the
application and ensure that only the compatible types are being used as
parameters and return values in the remote method signatures.

The bottom line is: There is *NO* binary compatibility between .Net
1.1 and .Net 2.0 (Reflection and Serialization contain breaking
changes).



chawlaa@xxxxxxxxx wrote:
Hi

I have an application written in .Net 2.0 using remoting. When remoting
is turned on at the client side I get the FieldAccessException. The
server is hosted in IIS and is therefore using http channel. The remote
class derives from MarshalByRefObject. The remote method just returns a
string. Here is some more information about the exception:

Source Error:

Line 24: 'Return aString
Line 25: Return "Test"
Line 26: End Function
Line 27:


Source File:
C:\Source\Reconciliation\App\BP2S.IT.Recs.App\ADFRemotingInterface.vb
Line: 26

Stack Trace:

[FieldAccessException: Attempted to access a field that is not
accessible by the caller.]

System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) +1779522
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type) +826
BP2S.IT.Recs.App.ADFRemotingInterface.GetMenuJS(Int32 MenuId, Object
Principal) in
C:\Source\Reconciliation\App\BP2S.IT.Recs.App\ADFRemotingInterface.vb:26
BP2S.IT.Recs.Web.Menu_page.Page_Load(Object sender, EventArgs e) in
C:\Source\Reconciliation\Web\BNP.Is.Recs.Web\Menu_page.aspx.vb:55
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1061




Regards
AC

.



Relevant Pages

  • Re: soapsuds
    ... pre-instantiated exe running in a singleton mode, for remoting, even if you ... Revised framework implementations will probably not break your application ... We can then compile the client using this code which allows us ... Both client and server are ...
    (microsoft.public.dotnet.framework.remoting)
  • .net remoting vs. wcf
    ... I wanted an opinion if I agreed to do the migration. ... NET Remoting to ... I have a PLM application framework composed of a core library ... It took a really long time to develop part of Remoting, ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Transparent Proxy Problem.
    ... I am not very sure what happens whne your server is on framework 1.0, ... and the client is 1.1, so maybe there are some incompatibility problems. ... that there are problems when you read the remoting ... > 2) Remote Object Host: I am using windows service for this. ...
    (microsoft.public.dotnet.framework.remoting)
  • passing object ByRef not updating object references
    ... I'm fairly new to remoting, and I'm running into problems passing ... objects as arguments to a remote method when there are multiple ... references to that object on the client. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Remoting and Sockets
    ... best suited for its own niche. ... Sockets send raw data requests across the wire. ... Remoting is used for interprocess communications - providing a framework ...
    (microsoft.public.dotnet.framework.remoting)

Loading