Re: .Net Remoting [FieldAccessException] - Workaround / Fix
- From: chawlaa@xxxxxxxxx
- Date: 16 May 2006 19:08:31 -0700
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
.
- References:
- .Net Remoting [FieldAccessException]
- From: chawlaa
- .Net Remoting [FieldAccessException]
- Prev by Date: .Net Remoting [FieldAccessException]
- Next by Date: Re: Single Sign-On Authentication?
- Previous by thread: .Net Remoting [FieldAccessException]
- Index(es):
Relevant Pages
|
Loading