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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

.NET Matters: Stream Decorator, Single-Instance Apps

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

More Related Resource Links

.NET Matters: Asynchronous Stream Processing


This month Stephen Toub discusses asynchronous stream processing.

Stephen Toub

MSDN Magazine March 2008

.NET Matters: Stream Pipeline


This month Stephen Toub explains how to make the most of dual processors when running encryption and compression tasks.

Stephen Toub

MSDN Magazine February 2008

.NET Matters: Handling Messages in Console Apps


Many developers who use the Microsoft .NET Framework think that application type is tied to the libraries that can be used in that application. Stephen Toub clarifies.

Stephen Toub

MSDN Magazine June 2007

WCF Essentials: Discover Mighty Instance Management Techniques For Developing WCF Apps


Instance management refers to a set of techniques used by Windows Communication Foundation to bind a set of messages to a service instance. This article introduces the concept and shows you why you need instance management.

Juval Lowy

MSDN Magazine June 2006

SQL 2008 R2 clustered instance does not start in single user mode

Hi I am testing the startup of a SQL 2008 R2 clustered instance (Windows 2008 R2) using single user mode but it fails with : Error: 17058, Severity: 16, State: 1. initerrlog: Could not open error log file ''. Operating system error = 3(The system cannot find the path specified.) - I am running the following command from the default sql installation : C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL01\MSSQL\Binn>sqlservr.exe -c -m -s SQL01 - The cluster service on the passive node has been shutdown. - The SQL Server and SQL Agent services have been set to offline in Failover Cluster Manager. Any assistance greatly appreciated. Regards, PK    

Best Practices for WPF Single Instance with named pipes?

Hi, I've developed a WPF server-hub-typed application, and a bunch of client-typed applications. The hub app is always a single instance (using mutex), and implements named pipes.   However, I'm having problem with the clients. The clients are applications that send data to the hub. They need to start the hub if it is not already running.   The problem with these clients is, they are optional and portable. Hence, the user might store them in different locations on their system. I really do not wish to deploy the Hub application with every client. What's the best way for me to implement this?   Another thing, do I *have* to use Process.Start(path, args) to start my hub application?    I've attached a sample project that I've done. But there are several problems with it, which I've not figured out how to fix. http://www.sendspace.com/file/ykhdg0   Thanks Min Chew   [References I've used:] http://blogs.microsoft.co.il/blogs/maxim/archive/2010/02/13/single-instance-application-manager.aspx <-- This is the one that seems the most promising (single instance + IPC), but I want a bare-minimum example so I can get a better hang on things. Besides, it crashes when I click on any of the 3 Run buttons http://www.switchonthecode.com/tutorials/wcf-tutorial-basic-interprocess-communication <-- Named pipe IPC using wcf http://www.switchonthec

How to use single windows service to host multiple WCF Services instances (Each instance of WCF is i

How to use single windows service to host multiple WCF Services. I have a mutiple instance of same WCF service in different folder, each instance has unique service name and port. WCFService has reference to Reg-Free COM Reference, i have Native.WCFService.manifest in each folder. Ex: WCFService1 is in "C:\WCFService01\WCFService.dll, Native.OCWCFService.manifest, OCWCFService.dll.config WCFService2 is in "C:\WCFService02\WCFService.dll, Native.OCWCFService.manifest, OCWCFService.dll.config Now i need host above services from single Windows Service. I am trying to create AppDomain for each above WCFService Instance from Windows Service and then host. Its working if i register COM dll in the server using regsvr32, but when i un register COM dll, i am getting unable to load COM component .... This looks like AppDomain is not loading COM DLL and Manifest files. Its looks strange but we need it in this way because we have production and test environment in the same server. Everything works fine if create a seperate Windows Service for each WCFService Instance, but my manager wants single Windows Service :). Any help whould be really appreciated.  ravi kumar reddy

Create Single SharePoint Instance

Hi All, I have created SharePoint 2007 (MOSS 2007) application using SQL Server 2008. The user requirement is, to have SINGLE INSTANCE so that any one user is allowed to have only one active session at a time. How to achieve this? Regards Sanra

Single Sign On Web and Windows Apps

Hello, We, at our company, are developing a file sharing application which will allow users to upload/download files. This application will be part of the suite of other applications. We will be adding a desktop client (windows app) which is an upload/download manager which will assist users to queue in multiple large files for upload/download.  There are a couple of questions related to design for these applications: 1. We would like to implement Single Sign-On for all these applications (including desktop client). We would like users to login to web and once they do that, they can browse through applications without logging in again. We will be implementing a authetication service using WCF. The requirement is that we do not want to add authentication functionality to desktop client. So users will need to login to our web application.  We can write cookie to user's machines and will work for web applications. Can the desktop client use the same cookie to autheticate itself? Or there are other ways we can achieve it? 2. We also do not want that when desktop client is uploading/downloading multiple files that its session is expired and the user need to re-authenticate through web. How can we achieve it? How does other Upload/Download Managers (like MS File Trasnfer Manager) work? Any help in this regard is appreciated.

[.Net 4, Named Pipes, Single-instance app] Critique the code, please


The code below is a prototype of single-instance component. Of course there's a lot of work to get it done: separate into an component, add different names per user session, run server in background thread and so on and so on.

Currently, I'm interested in finding wrong options supplied, invalid usages, security holes or anything I missed. E.g. I'm almost sure there's a bug: the code allows for remote connections. I'll prove it on monday, as I've no access to local network for now.

using System;
using System.IO;
using System.IO.Pipes;
using System.Security.AccessControl;
using System.Security.Principal;

namespace ProcessSingleInstance
 class Program
  static void Main(string[] args)
   string[] data = new[] { "a", "aaaaa", "qweqeqweqeqweqwert" };


Single instance of workflow for a parameter



I'm a newby to WF fnd have a question which I haven't found an answer for:

I've got a WCF workflow service which is invoked by receive activity with a parameter (saleId). My workflow is a long running workflow and I want only a single instance of a workflow to be running for the saleId.

I tried to implement it with correlation mechanisms, however I receive an exception, when starting the secong workflow with the same parameter The execution of an InstancePersistenceCommand was interrupted by a key collision. The instance key with value '{Unique ID}' could not be associated to the instance because it is already associated to a different instance.

And after this exception the execution of the first workflow stops together with the second one.

How to share a single workflow instance across diff pages of asp.net application..?



I am using WWF 3.0 with ASP.Net application with two pages of form submission and approval.

The submission form instantiates, starts the workflow and completes half part of the workflow. In the approval page the suspended workflow has to be resumed to get completed(throught HandleExternalEvent Activity). In this case how i can use the same workflow instance between two different aspx pages..?


"Object reference not set to an instance of an object" when 1 single user tries to check out a file


We are running WSS 3.0 SP2.  We have 1 single user that started having the following occur:  When he goes into a document library in which he has contribute permissions, selects a file, picks Check Out and Edit, he is getting a pop-up stating 'Object reference not set to an instance of an object".  When he clicks on the OK button he gets another message stating that it may be a permission issue or the file may be locked for editing by another user.

I have confirmed that nobody else has the file checked out for editing.  Other users (including myself) can open the exact same files, check them out and edit them, then check them back in.

I have searched the web for this error and have not found anything useful to tell me what to try on his machine.  I’m thinking it is a local PC issue since he is the only one experiencing the issue plus I have had him log into our Citrix client and he can successfully check out and edit files there.  He has done a reboot of his machine but this did not res

The Decorator Pattern & Extension Methods

The decorator pattern provides a formal way to add new functionality to an existing type, without sub-classing. First question: What is wrong with classical inheritance? In and of itself, nothing is wrong with the good old Is-A relationship. It is very common to derive a new class from an existing base class in order to override a few virtual members, and add a pinch of new functionality.

Serving Silverlight Apps from Windows Mobile

Even if mobile dev is not my every day work, thanks to the .Net Compact Framework, it's still .Net programming.

Here is the scenario:

You come back home, you have a windows mobile phone wifi capable and you want to quickly get access to your phone pictures from your home network.
You just activate the Wifi, run my app and then browse to the provided link from any computer on the network.

Practical Multithreading for Client Apps

Writing applications that use multiple threads is often considered an advanced programming task, prone to errors. In this month's column, I'll focus on a practical application of multithreading in Windows® Forms applications with some real benefits, while attempting to keep things simple. My goal is to present multithreading in an approachable way that addresses a very common need: writing applications with a user interface that remain responsive to the user.

Application Architecture in Windows Forms 2.0-Single-MDI Applications

Consider an MDI application like Microsoft Excel; files opened from the file system (by double-clicking) are all opened as separate child windows within the parent Excel window.7 For the first instance of an MDI application to open a new child window to display the file that was passed to the second instance of the application, the second instance must be able to communicate with the initial instance.
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