.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

ChannelServices.RegisterChannel from two different processes

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :.NET Framework


I use an office adding (wriiten by me with VS)  as a remoting server to  supply the office application object (Excel,Word,PP) to a client application that sometimes lunches these applications (from command line - not with interop).

When the office application is lucnched - the addin is loaded and uses register a well known type using a TCP channel with the same port always.

The addin is common for all office applications.

When the first application is lunched (say: Excel) the TCPChanel is successfully registered and the client application can get the application object

When the second application is lunched (say: PP), and before the Excel is closed, the channel registration fails with a SocketException "Only one usage of each socket address (protocol/network address/port) is normally permitted".

This happens when instantiating the channel and not when registering it  

channelDictionary["name"] = TCPChannelName;
channelDictionary["port"] = TCPChannelPort;

channel = new TcpChannel(channelDictionary, null, null);

the name and port are always the same but since it is always a different process (PP, Excel) it should work as the name must be unique per application domain. Isnt it?

Another question conce

View Complete Post

More Related Resource Links

Web Service Workflows: Deploy Distributed Business Processes With Windows Workflow And Web Services


Due to the distributed nature of a business process it makes sense for a workflow to be deployed as a distributed application. See how Windows Workflow and Web Services hold the key.

Israel Hilerio

MSDN Magazine October 2006

What is BPEL4WS?: Build Better Business Processes with Web Services in BizTalk Server 2004


In this article the author focuses on one critically important Web services specification that has been largely overlooked: the Business Process Execution Language for Web Services (BPEL4WS, or BPEL). He describes why BPEL is important and what it offers you if you are implementing Web services today or planning to in the future. Concrete examples using BizTalk Server 2004 are presented in the article.

Jon Fancey

MSDN Magazine March 2005

.NET Internals: Examine Running Processes Using Both Managed and Unmanaged Code


There are plenty of times when you need to get information on running processes, not the least of which is during performance tuning. Using the techniques in this article and special .NET classes you'll see how to get a process' ID, name, priority, number of threads, kernel handle, and memory consumption, as well as its user-mode, kernel-mode, and total elapsed running time and put them to use in a custom app called AssemblyBrowser.

Christophe Nasarre

MSDN Magazine October 2004

BizTalk 2004: Automate Your Business Processes with Human Workflow Services and Visual Studio


BizTalk Server is an excellent platform for automating B2B and EAI workflows. Process-driven workflows send messages between machines and access data. Until now, such processes were very difficult to automate, but with the introduction of Human Workflow Services in BizTalk Server 2004, this class of workflow automation is a very real possibility. This article explains it all.

Chris Whytock

MSDN Magazine October 2004

Module 7: Developing Business Processes with SharePoint 2010 Workflows

SharePoint 2010 provides a powerful workflow framework that enables you to implement custom business processes that are driven by SharePoint data.

Do stored procedures run in separate processes ?

If a stored procedure is run multiple times calling the same method created inside an SQL server project, does each call run inside the same process. For example if the method you are calling accesses a static variable, would this variable be shared amongst all callers or will each caller always be allocated its own memory.

Workflow Runtime and Long Running Processes

I am trying to get a handle on the fact that applications have to manage the persistance of workflows directly. in 4.0.  If I set a workflow to run every night at 3:00 AM and then be persisted, how will I know that my application will be awake and ready to do the job.  I know that SharePoint currently uses a timer on the server which fires off every 5 minutes (default). 

For a Data-driven Subscription, If it Processes 20 but 2 error , how do i just run the ones that err

 I'm trying to figure out if there is a way to just run the errored out ones.  Sometimes I have up to 100 being processed and need to only rerun the ones that error out. Is there a way to do this? and how?

w3wp and OWSTIMER processes taking 85% CPU resources

Hi All, My sharepoint site is performing very slow. I have noticed that it takes almost 30 seconds to load the site. Upon checking all processes on SharePoint front end server. I have analyzed that w3wp and OWSTIMER processes are taking almost 85% CPU resources. Any idea what is causing the problem. For your information: 1.We have deployed sharepoint with medium farm topology (that is SharePoint Front End and SharePoint database servers are on separate machines) 2. SharePoint Server machines are XEON based with 4 GB RAM 3. Total users in my farm are almost 250 4. Our sharepoint usage is mostly related to Content Management (Document Checkin/Checkout) and web based infopath forms. Any help in this regard will be greatly appreciated.                

Processes blocking RESOURCE MONITOR, normal behaviour?

Today I ended up in a situation where I had a process with total six "subthreads" (identified by different execution context) (seen in Activity Monitor). All of these had blocking=1. The server didn't function properly, I don't know the details of these problems, since I was not present at that time. We had to kill the processes. What is the process id 1, "RESOURCE MONITOR" in SQL Server 2005, seen in Activity Monitor? Is it fatal if some processes are blocking RESOURCE MONITOR? How can one end up in such situation, is it normal or a bug somewhere?   The server is a 64-bit Windows server having SQL Server 2005 SP1.   Yesterday I had a CLR stored procedure running on another server. The procedure uses System.Data.SqlClient.SqlConnection to access this server. The procedure started about 11.4.2007 22:22. The procedure created a connection to the SQL Server and created a select that should return 1,5 million rows. During fetching the rows (about after 800 000 rows) the procedure crashes to an error:"".NET Framework execution was aborted by escalation policy because of out of memory. " Naturally the procedure couldn't close the SQL Server connections, since it was forced to end.   The details if the processes as seen from Actívity Monitor (I only have screenshots so I can't copy-paste...):   The main process: Process id: 69 status: suspended o

What processes will delay the SQL server failover process



We have an Active-Active-Passive setup. We have two SQL instances namely SQL1 and SQL2. When we tried to failover, SQL1 SQL resource is taking more than 2 Minutes to failover where as the other one is failing over in fraction of sec. We are facing this issue from last two days. Before that it's working fine.

We have checked whether there are any backups running which might delay the failover process, but no backups running. We have checked the DNS response time and it's very quick(same as the case of SQL1). There is very minimal IO activity on the SAN(SQL2 IO activity is more than the SQL1). Ther were no patches applied recently.

Following is our production environment.

OS             : Windows 2008 X64 bit

SQL           : SQL 2008 x64 bit Ent Edition

Noof CPUs : 4 (Intel quad core)

RAM          : 64 GB RAM

SAN          : HP EVA4450

Please let me know the factors which will delay the SQL failover process.

Unable to run parallel processes with COM objects


I am developing application that performs a series a calculation jobs for transportation planning. The application can be run, either as part of a desktop application or as a standalone WCF service. The main bulk of the work is carried out by a COM component written in unmanaged C++, but the all the data handling and the user I/O are written in C#.

I am using .NET 4 and the Parallel.ForEach statement to start the calculation jobs and this works fine when a run it as a desktop application, but when I run as a WCF service, the calculation jobs are executed sequentially.


I have tried to change the apartment threading model from MTA to STA using a custom Tasks Scheduler as described by Stephen Toub in

Users, Sessions, Processes, Instances, Database Engine

Can you depict me the existing relation between Users, Sessions, Processes, Instances and Database Engine of SQL Server?

WSS 3.0 Doesn't show all the processes



In an article i read that Sharepoint will show unique process for each service in TaskManager.

1. WSSADMIN - for SPAdmin

2. OWSTIMER - for SPTimerV3

3. WSStracing - for SPTrace

4. SPWRITER - for SPWriter (When requested).

But in my server when i check task manager list of processes, i see only wsstrace process.


Data transfer between processes for large data



Does anyone know the most efficient data transfer technique between processes for LARGE DATA apart from Shared memory and message queuing techniques.

Thanks in advance

Data transfer between processes for large data



Does anyone know the most efficient data transfer technique between processes for LARGE DATA apart from Shared memory and message queuing techniques.

Thanks in advance

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend