remoting

Application.Restart() + Single Instance conflict in windows application

匆匆过客 提交于 2019-12-06 12:27:13
问题 Hi Friends, I have a windows application where i controls single instance. When this application updates using clickonce, application will restart after applying updates. The application restarts but fails to continue as, IsFirstInstance = false condition. But Application.Restart() documentation says it shutdowns running app and creates new instance. Single instance class is given below: using System; using System.Diagnostics; using System.Runtime.Remoting; using System.Runtime.Remoting

simple IPC mechanism for C#/WPF application to implement app CLI

て烟熏妆下的殇ゞ 提交于 2019-12-06 12:05:23
问题 So I've been reading lots about interprocess communication on .Net. Named pipes, remoting. It all seems great but possibly overkill for what I need to do. I want to add a command line interface to my WPF application, so I need a simple IPC mechanism to send the string from one process to the already running app. What does SO recommend for doing so? 回答1: NamedPipeClientStream and NamedPipeServerStream are pretty simple. Here's a pretty simple example where IPC is used to pass command line

Migrate serialized objects to new version

我们两清 提交于 2019-12-06 09:07:01
I would like to migrate me previously serialized objects in database to new schema. My previous object. Public interface MyReport { string Id { get; set;} string Name { get; set;} Dictionary<string, string> PropColl { get; set;} } But for some reasons we had to make interface changes Public interface IMarkme { } Public interface MyReport<T> where T : Imarkme { string Id { get; set;} string Name { get; set;} T ExtendedProp { get; set;} } Public NewProp : Imarkme { /// some code here } So as you can see my interface has been modified and I would like to migrate my serialized objects which were

Using IOC in a remoting scenario

本秂侑毒 提交于 2019-12-06 06:00:43
问题 I'm struggling with getting IOC to work in a remoting scenario. I have my application server set up to publish Services (SingleCall) which are configured via XML. This works just like this as we all know: RemotingConfiguration.Configure(ConfigFile, true); lets say my service looks like that (pseudocode) public class TourService : ITourService { IRepository _repository; public TourService() { _repository = new SqlServerRepository(); } } But what I rather would like to have sure looks like this

Type resolution error during ASP.NET precompilation

限于喜欢 提交于 2019-12-06 05:10:01
During ASP.NET precompilation of our .NET 3.5 web application, various initialization is performed in type initializers. One of the type initializers throws a custom exception when the environment is incorrectly configured. However, when our custom exception is thrown, here is what the aspnet_compiler.exe tells us: [exec] error ASPRUNTIME: Type is not resolved for member 'App.Project.CustomException,App.Project, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. [exec] [exec] [SerializationException]: Type is not resolved for member 'App.Project.CustomException,App.Project, Version=1.0.0

.Net Remoting vs. WCF

本小妞迷上赌 提交于 2019-12-05 12:45:21
问题 I am working on a .Net website which is going to have 1000s of concurrent users. I am thinking of keeping the business components on the app server and UI components on the web server. Database (MS SQL Server 2005) will be hosted on another server. I am planning to use the load balancing as well. Given this, what's the best way of communication from web server to app server if I want to have the optimum application performance and scalability? 回答1: You can check here a performance comparison

Remoting set timeout

百般思念 提交于 2019-12-05 11:50:02
.NET remoting is used in my brownfield application. We decided to set timeouts for our remoting methods. System.Collections.IDictionary properties = new System.Collections.Hashtable(); properties["name"] = Ipc_Channel_Name; properties["timeout"] = 1 * 1000; IChannel clientChannel = new IpcClientChannel(properties, null); ChannelServices.RegisterChannel(clientChannel, false); The problem is that it seems that timeout doesn't work. I checked it by setting System.Threading.Thread.Sleep(5 * 1000); in the invoked code. Is the reason that IpcClientChannel doesn't support timeouts? How do I set the

Akka.net: Access remote Actors in Cluster

微笑、不失礼 提交于 2019-12-05 10:12:51
In an clustered environment I have a seed node and node1 and node2. From node1 I want to send a message to an Actor which has been created on node2. The local path to this node on node2 is akka:MyAkkaSystem/user/AnActor. Now I want to send a message from an Actor from node1 to this specific actor by using an ActorSelection like that: var actorSystem = ActorSystem.Create("MyTestSystem"); var c = actorSystem.ActorSelection("/user/ConsoleReceiver"); c.Tell("Hello World"); On node2 the actor has been created like that: var actorSystem = ActorSystem.Create("MyTestSystem"); var r = actorSystem

.NET Remoting, passing objects into methods

我的梦境 提交于 2019-12-05 04:07:31
I am writing a .NET Remoting application. I have my dll, server, and client all working correctly. However, when I try to change my method call to take an object parameter instead of a simple type like an int, it complains with this error. Type System.Runtime.Remoting.ObjRef and the types from it (such as System.Runtime.Remoting.ObjRef) are not permitted to be deserialized at this security level. The method is something like this. public List<Orders> GetOrders(int UserID) { //Works public List<Orders> GetOrders(Users user) { // Doesnt Work [Serializable] public class Users : MarshalByRefObject

Assembly.ReflectionOnlyLoadFrom not working

泪湿孤枕 提交于 2019-12-05 03:43:59
I have an Assembly Library1.dll which contains some Interfaces, which were serialized as a byte array into the database. For some reasons we have to change the Interface properties and defintion. so now i am writing a migration utility. So i have 2 versions of Library1.dll , In my utility i have created a folder where i store the new version of Library1.dll . This utility in turn also references Library1.dll hence in bin folder contains Library1.dll but this dll is compiled on older version. My new version of Library1.dll is stored in a private path which i am passing to Assembly