.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

IPCChannel explicit clean-up?

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :.NET Framework


I create an IPCChannel on the server and register a singleton with it.  My client creates an instance of this remote object for communication purposes.  If the server process is restarted, my client can detect this and will try to re-activate the remote object.  It seems that if this disconnect/connect to the server happens to quickly, the client will receive a RemotingException indicating "Access Denied".  This leads me to believe that cleanup of the named pipe needs to be done when the service shuts down, to ensure it is available immediately upon restart.  However, to accomplish this I've tried IPCChannel.StopListening(null), ChannelServices.UnregisterChannel(serverChannel), and also setting the remote object to null on the client -- all to no avail.


I found a newsgroup article where folks report identical behavior with no resolution: http://groups.google.com/group/microsoft.public.dotnet.framework.re

View Complete Post

More Related Resource Links

Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

Automatic vs Explicit Properties

If the reason that motivated the change from automatically implemented property to explicitly implemented property was to change the semantics of the property then you should evaluate whether the desired semantics when accessing the property from within the class are identical to or different from the desired semantics when accessing the property from outside the class.

The "60 days clean-up syndrome", how to recover?

Hi, Like many others, I woke up just to find that SP job has deleted my WF tasks (and history) from a critical system... The tasks are being displayed in all the reports and are important to understand the flow of a process. Now we must recover the data somehow, we are mostly interested in recovering the WF instance and tasks. We have DB backups. I know we should deal with the Workflow table, from which table does the tasks items come? Any tips? Free tools to recover list items from DB backup?   10x in advanced....

Stack Dump generated on the db and SQL tipped over DBCC CHECKDB came out clean

We have Profile db for sharepoint 2010 and the SQL tipped over just before which it generated the below dump. The DBCC CHECKDB on the database came out clean. The SQL Server is SQL 2008 SP1 CU5 and the memory on the server is 32GB with max. for SQL Server being 26 GB.  What could have caused this? There is nothing in the error log prior to this dump. name                                minimum     maximum     config_value run_value ----------------------------------- ----------- ----------- ------------ ----------- access check cache bucket count     0           65536       0            0 access check cache quota            0           2147483647  0            0 Ad Hoc Distributed Queries          0           1           0

DB Clean

I had very big doclib, that i deleted at last. Now i want to shrink DB to release actual disk space. But in db`s properties - available space is very little. It should be about 70 Gb, but it shows that only 2 Gb i can release. What else should be done to detect and release unused space ?

for xml explicit

Hi, I'm using FOR XML EXPLICIT to generate xml file from sql 2000 database... I need to generate something like this: <PRICE currency="EUR">150.45</PRICE>   How can I do this if I have a table Product with column Price?

Web Part Error on a clean SP2010 install in Document Center

On a clean SP2010 install I created a Document Center site.On the main site page under the "Upload Document" web part there's another web part, which displays this error: Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe. [UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe.] at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections) at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb) at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CompressWebPartNoSave(Boolean isClosed) Is this normal? Or is my installation somehow corrupted?And what is this web part and how can I register it as safe?

INotifyPropertyChanged, explicit interface implementation and binding

Hello. Can I notify about explicitly implemented property change and what name should I provide to PropertyChanged? Or does WPF support onetime binding only for them?

SQL Server 2005 (X64) Maintenance Clean Up Task Using Hours Option for File Age

I'm running into an issue with SQL Server 2005 64-bit and the maintenance clean up tasks.  I have it set up to delete any transaction logs or backups older than 12 hours.  It seems that there could be some sort of bug because, according to the log files, SQL is running the clean up for 12 days instead.  I've created a work around for this by using execute transact-sql tasks instead, but was wondering if there's a problem with my version of SQL Server, like an SP or patch that I've overlooked. Here's my version information: Microsoft SQL Server 2005 - 9.00.1399.06 (X64)   Oct 14 2005 00:35:21   Copyright (c) 1988-2005 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)

Small problem with FOR XML EXPLICIT

Hello everyone, For my BizTalk application I need to receive "STRUCTURED" XML from SQL Server so I decided to use FOR XML EXPLICIT.  I have a pretty simple scenario. I have 2 tables in SQL. One is a table for invoices, the other one a table for items. One invoice can have many items. I use a stored procedure to retrieve invoices. Right now the returned XML only retrieves the items for the last invoice. So if the SP returns 3 invoices, the first 2 will only have the receipt number and supplierIdCompany and the last record will be complete with the items (as expected). My SP is as follows ALTER PROCEDURE [dbo].[RetrieveDeliveryreceipts] AS BEGIN SET NOCOUNT ON;     -- Insert statements for procedure here  SELECT 1 AS TAG, NULL AS PARENT,  tblDeliveryReceipts.dlrReceiptNumber AS [tblDeliveryReceipts!1!ReceiptNumber!ELEMENT],  tblDeliveryReceipts.dlrSupplierIdCompany AS [tblDeliveryReceipts!1!SupplierIdCompany!ELEMENT],  NULL AS [tblDeliveryReceiptLines!2!ItemDescription!ELEMENT],  NULL AS [tblDeliveryReceiptLines!2!Quantity!ELEMENT]  FROM tblDeliveryReceipts   WHERE tblDeliveryReceipts.dlrReceiptNumber = 'B 00000010' OR tblDeliveryReceipts.dlrReceiptNumber = 'B 00000011' OR tblDeliveryReceipts.dlrReceiptNumber = 'B 00000012'  UNION ALL  SELECT 2 AS TAG, 1 AS PARENT,  tblDeliveryRec

For XML Auto & Explicit

HI,I wrote a query in SQL Server Management Studio Express,Select * from Categories FOR XML AUTO <Categories ID="1"  ..... /><Categories ID="2"  ..... />The query generated a XML document and on the second row (when I highlight) it showing 'XML document cannot contain mutiple root level elements'. Is this okay?Select * from Categories FOR XML EXPLICITError: FOR XML EXPLICIT requires the second column to hold NULL or nonnegative integers that represent XML parent tag IDs. How to clear this error?

clean up system tables like sysmergepublications , sysmergesubscriptions...

Hi ALL,            How to clean up system tables like sysmergepublications , sysmergesubscriptions... Bcoz  in my subscriber database i still see the previosous publihser details in these system tables Same thing in publisher database....how to remove all these data .....when i reinitialize database at subscriber ..and if i see the local subscriptions in ssms there are subscriptions from publishers to which it is subscribed before..and i cant delete this....

Item has already been added. Key in dictionary.. How do I clean up service account? Very nasty


I made a few changes in service accounts and now CA Configure Service Accounts and other application pages fail with wtth:

Item has already been added. Key in dictionary: 'dev\svcebrd'  Key being added: 'dev\svcebrd'

Here is what log says when FarmCredentialManagement.aspx opens:

SID |0 cannot be resolved. Using old name: |1. |2

System.ArgumentException: Item has already been added. Key in dictionary: 'dev\svcebrd'  Key being added: 'dev\svcebrd'    at System.Collections.SortedList.Add(Object key, Object value)     at Microsoft.SharePoint.WebControls.ManagedAccountPicker.OnInit(EventArgs e)     at System.Web.UI.Control.InitRecursive(Control namingContainer)     at System.Web.UI.Control.AddedControl(Control control, Int32 index)     at ASP._admin_farmcredentialmanagement_aspx.__BuildControl__control22(Control __ctrl)     at Microsoft.SharePoint.WebControls.InputFormControl.OnInit(EventArgs e)     at System.Web.UI.Control.InitRecursive(Control namingContainer)     at System.Web.UI.Control.AddedControl(Control control, Int32 index)     at ASP._admin_farmcredentialmanagement_aspx.__BuildControl__control16(Control __ctrl)     at Micros

using UpdateSourceTrigger=Explicit with GetBindingExpression() on class objects with inherited



I have a class that inherits from FrameworkElement and has a mixture of DPs that I've added and the ones inherited e.g. WidthProperty, HeightProperty etc...

I have a UserControl that inherits from my class and has various textboxes in a popup resource like this

<TextBox Text="{Binding Path=Width, UpdateSourceTrigger=Explicit}" />

I've added a click button so that when the user changes one of the textboxes (in the popup), a routedUIcommand will fire (see below).


 public static void OkCommand_Executed(object sender, RoutedEventArgs e)
      MyClass c = (MyClass)sender;

//this seems to work fine because it is implicitly declared in my class
      BindingExpression be = s.GetBindingExpression(MyClass.MyPropertyProperty);
      if (be != null) be.UpdateSource();

//this does not work because the DP is inherited from FrameworkElement. It is returning null.
      BindingExpression be = s.GetBindingExpression(MyClass.WidthProperty);
      if (be != 

Explicit Expression Aliasing in SQL Queries


Due to restrictions on implicit column alias usage in SQL queries (only in ORDER BY), Emtucifor (Erik) suggested the idea of explicit expression aliasing. I like the approach because it makes the query easier to read and increases the SQL developer productivity. What do you think?

Example query for explicit expression aliasing:

  SUM (H.TotalDue) TotalSales
FROM AdventureWorks2008.Sales.SalesOrderHeader H
  YEAR (H.OrderDate) AS [Year],
  MONTH (H.OrderDate) AS [Month]
WHERE [Year] > 2002
GROUP BY [Year], [Month]
ORDER BY [Year], [Month]

This thread is a spin-off from: http://social.msdn.microsoft.com/Forums/en/transactsql/thread/4ad14cad-1e61-43a0-96f8-70a506106a00


Kalman Toth, SQL Server & Bu

clean solution causes many errors



I accidentally  cleaned a solution that has 10 projects and now I faced many errors, some of the errors are like these:

Error 186 Type 'websearch.svcProfile.Profile' is not defined. D:\DOM VS2010\890624\DOM\33UI\Controls\ctlCatalogue.ascx.vb 502 44 UI

witch svcProfile is a webservice reference. all of my webreferences are not working anymore. other errors are like these:

Error 185 Type 'websearch.Class.CommonText' is not defined. D:\DOM VS2010\890624\DOM\33UI\Controls\ctlBasicSearch.ascx.vb 45 29 UI

Error 1 The type or namespace name 'UI' could not be found (are you missing a using directive or an assembly reference?) D:\DOM VS2010\890624\DOM\33websearch\BasicSearchControl.ascx.cs 12 11 websearch


Error 174 'Could not load file or assembly 'ComponentArt.Web.UI, Version=2009.1.1819.3, Culture=neutral, PublicKeyToken=9bc9f846553156bb' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))' D:\DOM VS2010\890624\DOM\33UI\LC UI


What do I do? I don't want to go through the process of restoring the backup solution because I did many changes to project.

Cannot uninstall or reinstall TFS 2010: how to clean by hand ?


I have installed SQL Server 2008 express, reinstall it with advanced services, uninstall TFS 2010 and tries to reinstall it but fails. It doesn't want to completely uninstall.

So I'd like to clean everything by hand (deleting registries, folders) but can't find any info. I have deleted install directory but installer still memorized that TFS is installed.

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