appdomain

Remoting and missing channel sinks

删除回忆录丶 提交于 2019-12-19 06:56:17
问题 I ran into a remoting exception: "This remoting proxy has no channel sink which means either the server has no registered server channels that are listening, or this application has no suitable client channel to talk to the server." The cause is best explained by this blog entry I found: The second case is more obscure. This occurs where the client makes a call to the server, the server returns an object reference, and the client then makes a call on the referenced object on the server. If

Remoting and missing channel sinks

房东的猫 提交于 2019-12-19 06:55:07
问题 I ran into a remoting exception: "This remoting proxy has no channel sink which means either the server has no registered server channels that are listening, or this application has no suitable client channel to talk to the server." The cause is best explained by this blog entry I found: The second case is more obscure. This occurs where the client makes a call to the server, the server returns an object reference, and the client then makes a call on the referenced object on the server. If

ASP.NET Data Cache - preserve contents after app domain restart

半世苍凉 提交于 2019-12-19 03:53:20
问题 I am using ASP.NET's data caching API. For example: HttpRuntime.Cache.Insert(my_data, my_key); Is there any way to configure cache so its contents are preserved when the App Domain recycles? I load many object into cache, but there is a substantial delay re-loading these every time the app domain restarts. Assume for this question that I can't prevent the appdomain restart due to a server configuration. 回答1: Is there any way to configure cache so its contents are preserved when the App Domain

Loading Byte Array Assembly

半腔热情 提交于 2019-12-18 16:10:49
问题 I'm experimenting with loading an assembly using just byte arrays, but I can't figure out how to get it to work properly. Here is the setup: public static void Main() { PermissionSet permissions = new PermissionSet(PermissionState.None); AppDomainSetup setup = new AppDomainSetup { ApplicationBase = Environment.CurrentDirectory }; AppDomain friendlyDomain = AppDomain.CreateDomain("Friendly", null, setup, permissions); Byte[] primary = File.ReadAllBytes("Primary.dll_"); Byte[] dependency = File

CreateInstanceAndUnwrap and Domain

拥有回忆 提交于 2019-12-18 15:34:45
问题 I have a property whose instance I want to be in other domain. public ModuleLoader Loader { get { if(_loader == null) _loader = (ModuleLoader)myDomain.CreateInstanceAndUnwrap( this.GetType().Assembly.FullName, "ModuleLoader", false, System.Reflection.BindingFlags.CreateInstance, null, null, null, null); System.Diagnostics.Debug.WriteLine("Is proxy={0}", RemotingServices.IsTransparentProxy(_loader)); //writes false _loader.Session = this; return _loader; } } This works fine. But I assume all

Running NUnit through Resharper 8 tests fail when crossing between projects due to AppDomain

こ雲淡風輕ζ 提交于 2019-12-18 10:26:35
问题 I recently updated to Resharper 8, and when I tried to run a suite of projects. These tests contain two suites of integration tests that both use IISExpress to run a website, make web requests and check the responses. Running them in isolation is successful, and running all the tests would previously succeed. However, after the upate the second set of tests to run would fail. Investigation has revealed the AppDomain.CurrentDomain.BaseDirectory is staying as the first test to run instead of

URL Redirection and 1and1

一世执手 提交于 2019-12-18 09:55:49
问题 I've got an app up and running on Heroku. I've purchased a top level .com domain from 1and1 (I have other sites there, so I thought that would make life easier). When I attempted to redirect to my Heroku app, I was not allowed to modify the CName alias record like I have done for other sites - which were all subdomains. I was given two options: Frame redirect or HTTP redirect, I've tried both. The frame redirect doesn't seem to function at all - the page stays blank. The HTTP redirect does

Programmatically find when the ASP.NET worker process and app domain last started?

别来无恙 提交于 2019-12-18 08:59:04
问题 In ASP.NET: How can I tell when the ASP.NET worker process last restarted? In ASP.NET, how can I tell when the app domain last recycled? 回答1: For the worker process, you can programmatically read Process -> Elapsed Time from the corresponding perf. counter (1) or directly from the System.Diagnostics.Process namespace; for the AppDomain , you can set an application-level variable at start-up to serve as your baseline and measure against that manually. Scott Mitchell actually has a couple of

Azure Websites AppDomain many restarts

允我心安 提交于 2019-12-18 06:48:17
问题 I've a group of asp.net 4.0 Websites runing in Azure Websites Compute mode: Standard Location: North Europe Capacity autoscale: Off Instance size: Large Instance Count: 1 The response time is very slow, the trafic is normal, but my log show many AppDomain shutdowns (more than 3 in one minute) . My websites load data in cache during de Application_Start to give a rapid response to all subsequents requests but if the Appdomains restarts every time is impossible to give acceptable response times

.NET: Load two version of the same DLL

前提是你 提交于 2019-12-18 05:49:22
问题 I need to load two versions of the same DLL in order to compare their outputs. I assume that I can use AppDomains for this, but I need some guidence. 回答1: Ok, it was actually a lot easier than I imagined. m_Assembly1 = Reflection.Assembly.LoadFile(IO.Path.Combine(System.Environment.CurrentDirectory, "Old Version\Some.dll")) m_Assembly2 = Reflection.Assembly.LoadFile(IO.Path.Combine(System.Environment.CurrentDirectory, "New Version\Some.dll")) Console.WriteLine("Old Version: " & m_Assembly1