remoting

How .NET overrides non-virtual method in .NET Remoting?

吃可爱长大的小学妹 提交于 2020-06-28 05:56:14
问题 Consider following piece of code: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace RemotingNonVirtualCall { class Program { static void Main(string[] args) { var domain = AppDomain.CreateDomain("Second Domain"); A extA = (A)domain.CreateInstanceAndUnwrap(typeof(A).Assembly.FullName, typeof(A).FullName); Console.WriteLine(extA.CurrentDomain()); } } [Serializable] sealed class A : MarshalByRefObject { public string CurrentDomain() { return

How to use custom serialization during .NET remoting?

折月煮酒 提交于 2020-01-22 22:48:52
问题 I've written a custom serialization routine that does not use ISerializable or the SerialzableAttribute to save my objects to a file. I also remote these same objects and would like to use the same serialization technique. However, I don't want to implement ISerializable because my serialization method is completely decoupled from my objects (and I'd like for it to stay that way). Is there an easy way (possibly with remoting sinks) where I can take a stream and write bytes to it and on the

PermissionSet - Request Failed error

[亡魂溺海] 提交于 2020-01-22 01:52:52
问题 I have few projects communicating using ChannelSink, ServerSink and ClientSink. I've upgraded the projects from .NET 2.0 to .NET 4.0. Before the upgrade everything worked fine. Now, when I try to communicate , - for a specific message - my OnReceiveMessage isn't called and throwing the following exception: System.Security.SecurityException: Request failed Server stack trace: at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32* pLengths, Int32* pLowerBounds) at System.Array

Use .NET Remoting to transfer a file?

孤街醉人 提交于 2020-01-16 04:59:10
问题 I'm using .NET remoting to communicate between a web site and a Windows service. They both live on different machines. I have a statically defined port number for use by all requests and responses. I also use this mechanism to transfer files from the web site to the Windows service box. I'm passing a Stream object in the object that is being remoted to the Windows service box. The web box is opening another, seemingly random, port to facilitate this request that includes the file Stream. Is

Lazy/Eager loading strategies in remoting cases (JPA)

ε祈祈猫儿з 提交于 2020-01-09 06:46:00
问题 I'm running into LazyLoading exceptions like the most people who try remoting with an ORM. In most cases switching to eager fetching solves the problem (Lazy Loading / Non atomic queries / Thread safety / n+1 problem ...). But eager fetching has also disadvantages if you are dealing with a really big object graph. Loading the whole object graph isn't needed in the most use-cases. It feels bad to load more data then needed (or load them from the db and extract the needed subset). So what

Lazy/Eager loading strategies in remoting cases (JPA)

丶灬走出姿态 提交于 2020-01-09 06:45:46
问题 I'm running into LazyLoading exceptions like the most people who try remoting with an ORM. In most cases switching to eager fetching solves the problem (Lazy Loading / Non atomic queries / Thread safety / n+1 problem ...). But eager fetching has also disadvantages if you are dealing with a really big object graph. Loading the whole object graph isn't needed in the most use-cases. It feels bad to load more data then needed (or load them from the db and extract the needed subset). So what

Start a program in active user session with PowerShell remoting

喜欢而已 提交于 2020-01-04 06:26:51
问题 Is it possible to detect that a specific user has an open session on a computer and to open a process in that session so that the application can be interacted with by the user using PowerShell remoting? How would I go around detecting which users have sessions open on the machine and what their state is (active, idle, disconnected, etc...)? How would I launch an application within one of those sessions? UPDATE I have found that you can identify the session ID a process is running in: PS > (

Start a program in active user session with PowerShell remoting

穿精又带淫゛_ 提交于 2020-01-04 06:26:11
问题 Is it possible to detect that a specific user has an open session on a computer and to open a process in that session so that the application can be interacted with by the user using PowerShell remoting? How would I go around detecting which users have sessions open on the machine and what their state is (active, idle, disconnected, etc...)? How would I launch an application within one of those sessions? UPDATE I have found that you can identify the session ID a process is running in: PS > (

Is it possible to do lightweight REST calls in Flex?

时光总嘲笑我的痴心妄想 提交于 2020-01-01 07:00:08
问题 We are converting a Flex application to use some REST APIs. When adding the mx.rpc.http.HTTPService class to the code, the SWF binary output grew from 175KB to 260KB. This is an unacceptable hit. Is there any better way to do lightweight REST calls from a Flex app? Are we better off using an external interface JS just to make the calls from there? 回答1: flash.net.URLLoader is built into the runtime and won't cause any increase in filesize. I've used it as a JSON client before, so you shouldn't

Two-way communication between ASP.NET Web App and C# Application

对着背影说爱祢 提交于 2020-01-01 03:48:06
问题 I need to build a website and an application that communicate together, in both directions. I will be building the website with ASP.NET, and the application in C#. I will be hosting the website myself, and it will be running on the same machine as the application. I don't know what's the best technique to use to send data between the two. The C# app will need to be running all the time. Should I build a C# Console App, and then hide the console window? Or would some other kind of app be more