I am developing a tiered app with UI layer (let's call it UI.exe) , object state layer (call it state object (SO.dll)) and a business object layer (BO.dll) UI.EXE and SO.dll is on the client’s pc while BO.dll is deployed on a COM+ machine somewhere. The aim is to develop it in such a way that I can use 1) HTTP to host the BO.dll or 2) use a Windows service and TCP (least likely secenario) or 3) use good old DCOM and host the DLL in COM+.
All of the above is working, and I can actually switch between DCOM and IIS hosting by changing an entry in my config file etc. The problem that I have is that I need to use only one BO.dll, as this will be shared between DCOM users and IIS. The following prevents me from doing that however: * Using DCOM and COM+ to host my DLL The BO dll has to be compiled as (ActivationOption.Server) and all is OK * Using IIS to host my DLL When using (ActivationOption.Library) all is OK. When changing to (ActivationOption.Server) however I get the following funny: The BO function is activated and runs through all the code without errors. I do a .Setcomplete on the transaction, and that works fine as well. When the proxies start to serialize my variables (at least that is when I think this happens) I get the following error Err No: 13 : Method is not supported. – Server stack trace: at System.Runtime.Remoting.Messaging.MethodResponse.GetArgName(Int32 index) at System.Runtime.Remoting.Messaging.ArgMapper.GetArgName(Int32 argNum) at System.Runtime.Remoting.Messaging.SoapMessageSurrogate.GetObjectData (Object obj, SerializationInfo info, StreamingContext context) at System.Runtime.Serialization.Formatters.Soap.WriteObjectInfo.InitSerialize (Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SoapAttributeInfo attributeInfo) at System.Runtime.Serialization.Formatters.Soap.WriteObjectInfo.Serialize (Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SoapAttributeInfo attributeInfo) at System.Runtime.Serialization.Formatters.Soap.ObjectWriter.Serialize (Object graph, Header[] inHeaders, SoapWriter serWriter) at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Serialize (Stream serializationStream, Object graph, Header[] headers) at System.Runtime.Remoting.Channels.CoreChannel.SerializeSoapMessage (IMessage msg, Stream outputStream, Boolean includeVersions) at System.Runtime.Remoting.Channels.SoapServerFormatterSink.SerializeResponse (IServerResponseChannelSinkStack sinkStack, IMessage msg, Boolean bClientIsClr, ITransportHeaders& headers, Stream& stream) at System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage (IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage (IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at PlutoBO.clsPublisherSVR.f_Load(String pstrSysXML, Int64 pintID, String& pstrXML) in D:\projects\PROGRAMS\VB7 \Pluto\PlutoBO\clsPublisherSVR.vb:line 114 at PlutoSO.clsPublisher.Load(Int32 pintID) in D:\projects\PROGRAMS\VB7 \Pluto\PlutoSO\clsPublisher.vb:line 100 SO code does the following ---------------- RemotingConfiguration.Configure(lstrFile) lobjBO = New PlutoBO.clsPublisherSVR() Load = lobjBO.f_Load(lstrSystemXML, pintID, lstrXML) ----------------- BO code does the following -------------------- <Transaction(TransactionOption.Required), EventTrackingEnabled(True)> _ Public Class clsPublisherSVR Inherits ServicedComponent Public Function f_Load(ByVal pstrSysXML As String, ByVal pintID As Long, ByRef pstrXML As String) As Boolean Try ... .. Do db access and load ... If ContextUtil.IsInTransaction Then ContextUtil.SetComplete() End If Catch e As Exception ... End Try End Function End Class So, I need some help to identify why I cannot use IIS to host components with ActivationOption.Server. Microsoft’s samples are no help at all, MSDN articles on this are very scarce and uses ActivationOption.Library, but does not care to explain why. Thanks JC Oberholzer You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.