Smart Client

  • Thread starter Mallikarjun Tuppad
  • Start date
M

Mallikarjun Tuppad

Sorry for posting into multiple forums.


Hi,
I am trying to build smart client.

Here is simple application I am trying.

SmartServer.dll is hosted by IIS.

Smart client downloads form and shows
(everything is fine till this point)

On Some button click on this form - an API is called using .Net remoting
which returns an object (custom class instance).

then I get this exception (Disservices api is for the remote host)

the custom class is marked Serializable and the library is in the same
directory.

BTW - the same API works if its not smart client. Means, from windows
apllication it can get all the data using remoting.

If I call an API which returns built in data type such as string, there is
no error - it works fine.


What I am missing ?

Is there any other forum I can post this ?
=================================================================


Exception: System.Runtime.Serialization.SerializationException
Message: Cannot find the assembly DataServicesAPI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=314065ed11ac9a63.
Source: mscorlib

Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembl
y()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAs
semblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String
objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
objectId, BinaryAssemblyInfo assemblyInfo, SizedArray
assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create(String
name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
objectId, BinaryAssemblyInfo assemblyInfo, SizedArray
assemIdToAssemblyTable)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWith
MapTyped(BinaryObjectWithMapTyped record)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWith
MapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(Head
erHandler handler, __BinaryParser serParser, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.UnsafeDeseria
lizeMethodResponse(Stream serializationStream, HeaderHandler handler,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessag
e(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.DeserializeMessag
e(IMethodCallMessage mcm, ITransportHeaders headers, Stream stream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessag
e(IMessage msg)

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 Ngcc.Common.DataServices.IAgentDesktop.GetAgentData(String username,
String DesktopName)
at SmartServer.Form1.button1_Click(Object sender, EventArgs e)
 
J

Jan Tielens

Probably this is a security issue, remember when you are using the no touch
deployment (e.g. smart clients), by default the downloaded assemblies will
run in an environment with very little privileges (CAS or Code Access
Security). You can alter this behaviour by creating custom code groups for
either your website or the strong name of your assemblies.

If you need more info, please let me know!

Jan
_________________________________
Read my weblog: http://weblogs.asp.net/jan

Mallikarjun Tuppad said:
Sorry for posting into multiple forums.


Hi,
I am trying to build smart client.

Here is simple application I am trying.

SmartServer.dll is hosted by IIS.

Smart client downloads form and shows
(everything is fine till this point)

On Some button click on this form - an API is called using .Net remoting
which returns an object (custom class instance).

then I get this exception (Disservices api is for the remote host)

the custom class is marked Serializable and the library is in the same
directory.

BTW - the same API works if its not smart client. Means, from windows
apllication it can get all the data using remoting.

If I call an API which returns built in data type such as string, there is
no error - it works fine.


What I am missing ?

Is there any other forum I can post this ?
=================================================================


Exception: System.Runtime.Serialization.SerializationException
Message: Cannot find the assembly DataServicesAPI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=314065ed11ac9a63.
Source: mscorlib

Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembl
System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAs
semblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String
objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
objectId, BinaryAssemblyInfo assemblyInfo, SizedArray
assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create(String
name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
objectId, BinaryAssemblyInfo assemblyInfo, SizedArray
assemIdToAssemblyTable)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWith
MapTyped(BinaryObjectWithMapTyped record)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWith
MapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(Head
erHandler handler, __BinaryParser serParser, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.UnsafeDeseria
lizeMethodResponse(Stream serializationStream, HeaderHandler handler,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessag
e(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.DeserializeMessag
e(IMethodCallMessage mcm, ITransportHeaders headers, Stream stream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessag
e(IMessage msg)

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 Ngcc.Common.DataServices.IAgentDesktop.GetAgentData(String username,
String DesktopName)
at SmartServer.Form1.button1_Click(Object sender, EventArgs e)
 
M

Mallikarjun Tuppad

I have given full permission to the both assemblies.

Can u send me some samples - if U have.

Mallik
Jan Tielens said:
Probably this is a security issue, remember when you are using the no touch
deployment (e.g. smart clients), by default the downloaded assemblies will
run in an environment with very little privileges (CAS or Code Access
Security). You can alter this behaviour by creating custom code groups for
either your website or the strong name of your assemblies.

If you need more info, please let me know!

Jan
_________________________________
Read my weblog: http://weblogs.asp.net/jan

Mallikarjun Tuppad said:
Sorry for posting into multiple forums.


Hi,
I am trying to build smart client.

Here is simple application I am trying.

SmartServer.dll is hosted by IIS.

Smart client downloads form and shows
(everything is fine till this point)

On Some button click on this form - an API is called using .Net remoting
which returns an object (custom class instance).

then I get this exception (Disservices api is for the remote host)

the custom class is marked Serializable and the library is in the same
directory.

BTW - the same API works if its not smart client. Means, from windows
apllication it can get all the data using remoting.

If I call an API which returns built in data type such as string, there is
no error - it works fine.


What I am missing ?

Is there any other forum I can post this ?
=================================================================


Exception: System.Runtime.Serialization.SerializationException
Message: Cannot find the assembly DataServicesAPI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=314065ed11ac9a63.
Source: mscorlib

Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssemblSystem.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAs
semblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String
objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
objectId, BinaryAssemblyInfo assemblyInfo, SizedArray
assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create(String
name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
objectId, BinaryAssemblyInfo assemblyInfo, SizedArray
assemIdToAssemblyTable)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWith
MapTyped(BinaryObjectWithMapTyped record)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWith
MapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(Head
erHandler handler, __BinaryParser serParser, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.UnsafeDeseria
lizeMethodResponse(Stream serializationStream, HeaderHandler handler,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessag
e(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.DeserializeMessag
e(IMethodCallMessage mcm, ITransportHeaders headers, Stream stream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessag
e(IMessage msg)

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 Ngcc.Common.DataServices.IAgentDesktop.GetAgentData(String username,
String DesktopName)
at SmartServer.Form1.button1_Click(Object sender, EventArgs e)
 
J

Jan Tielens

Check out these articles for more info and examples:
http://msdn.microsoft.com/msdnmag/issues/02/06/rich/default.aspx
http://msdn.microsoft.com/msdnmag/issues/01/02/CAS/default.aspx
http://www.gotdotnet.com/team/clr/about_security.aspx

Jan

Mallikarjun Tuppad said:
I have given full permission to the both assemblies.

Can u send me some samples - if U have.

Mallik
Jan Tielens said:
Probably this is a security issue, remember when you are using the no touch
deployment (e.g. smart clients), by default the downloaded assemblies will
run in an environment with very little privileges (CAS or Code Access
Security). You can alter this behaviour by creating custom code groups for
either your website or the strong name of your assemblies.

If you need more info, please let me know!

Jan
_________________________________
Read my weblog: http://weblogs.asp.net/jan
there
System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssemblSystem.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAs
semblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String
objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
objectId, BinaryAssemblyInfo assemblyInfo, SizedArray
assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create(String
name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
objectId, BinaryAssemblyInfo assemblyInfo, SizedArray
assemIdToAssemblyTable)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithSystem.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithSystem.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeadSystem.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(SSystem.Runtime.Serialization.Formatters.Binary.BinaryFormatter.UnsafeDeseriaSystem.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessagSystem.Runtime.Remoting.Channels.BinaryClientFormatterSink.DeserializeMessagSystem.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessag
e(IMessage msg)

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 Ngcc.Common.DataServices.IAgentDesktop.GetAgentData(String username,
String DesktopName)
at SmartServer.Form1.button1_Click(Object sender, EventArgs e)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top