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

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

Cache Transform throws out-of-memory exception

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :Sql Server

I'm using a cache transform in a dataflow to reuse a large lookup ref data (around 1.5M records). However getting out-of-memory exceptions midway in the execution. I did monitor the memory usage and it was just above the 50% usage on the dev machine where I was testing this package. On the same machine, I then reverted to using the lookup cache with full cache. The lookup component did not throw any exceptions although the pre-execute took (as expected) around 15min. Is there a memory issue with the Cache Transform ?

Here is the exception:

Error: 0xC0047012 at Populate Cache LOOKUP_REF: A buffer failed while allocating 10479040 bytes.
Error: 0xC0047011 at Populate Cache LOOKUP_REF: The system reports 60 percent memory load. There are 3740508160 bytes of physical memory with 1478172672 bytes free. There are 2147352576 bytes of virtual memory with 216399872 bytes free. The paging file has 5713952768 bytes with 2810195968 bytes free.
Error: 0xC0208252 at Populate Cache LOOKUP_REF, Refresh REFERENCE_DOMAIN_VALUE_SK [37]: Unable to allocate memory for a new row for the main workspace buffer. An out-of-memory condition occurred.



View Complete Post

More Related Resource Links

userprincipal.changepassword throws exception


Hi all,

      userprincipal.changepassword(oldpassword, newpassword);

gives error: that is Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied. (Exception from HRESULT: 0x80070547)

but userDirectoryEntry.invoke("ChangePassword", new object[] { oldpassword, newpassword });

      userDirectoryEntry.CommitChanges works fine.

Any one please tell me the reason behind this.

WebControls.TableRow throws exception on Add()


I have the following method to strip hidden and user-specified columns from a gridviewrow and return a tablerow. 

    Private Shared Function StripHiddenColumns(ByVal gvRow As GridViewRow, ByVal ColumnsToExclude() As Integer) As TableRow

        Dim row As New TableRow
        Dim i As Integer = 0
            For Each cell As TableCell In gvRow.Cells
                If cell.Visible Then
                    If Not ColumnsToExclude.Contains(i) Then
                    End If
                End If
                i += 1

            Return row
        Catch ex As Exception
            Throw ex
        End Try
    End Function

However, when I run this code and hit the Add method for the TableRow,  I get an InvalidOperationException stating the Collection was modified; enumeration operation may not execute.  I've gotten this exception before, but usually it's because I'm attempting to modify a table that is databound.  This particular one is not, i am creating it.  Can anyone offer any insight? 

Thanks in advance.


SPWorkflowManager.CancelWorkflow throws an exception


Sorry, I had posted that same question in the "Dev and Programming" forum, but I'm reposting here because it's more of a workflow related question.

We are trying to cancel workflow programmatically.

It used to work fine until we migrated our environment to a new server and now it fails.

Our code goes something like this: 


foreach (SPWorkflow wf in form.Workflows)


//code omitted for brievety



But an ArgumentException is thrown.

Msdn docs say that an ArgumentNullException exception can be thrown (ArgumentNullException: The workflow to cancel belongs to an SPWeb object that has been deleted) but it is actually an ArgumentException that is thrown. Plus I know for sure that the SPWeb does not get deleted.

I tried to reflector what piec

EvaluateOldNewStates() throws exception when updating TreeViewItem.IsSelected

I apply a WPF theme in my application. At some point in my code, I need to change the selected tree view item. so I update the property MyViewModel.IsSelected and raise PropertyChanged event. Then I get this: Object reference not set to an instance of an object. System.Windows.StyleHelper.EvaluateOldNewStates(MultiTrigger multiTrigger, DependencyObject triggerContainer, DependencyProperty changedProperty, DependencyPropertyChangedEventArgs changedArgs, Int32 sourceChildIndex, Style style, FrameworkTemplate frameworkTemplate, Boolean& oldState, Boolean& newState) System.Windows.StyleHelper.InvokePropertyTriggerActions(TriggerBase triggerBase, DependencyObject triggerContainer, DependencyProperty changedProperty, DependencyPropertyChangedEventArgs changedArgs, Int32 sourceChildIndex, Style style, FrameworkTemplate frameworkTemplate) System.Windows.StyleHelper.OnTriggerSourcePropertyInvalidated(Style ownerStyle, FrameworkTemplate frameworkTemplate, DependencyObject container, DependencyProperty dp, DependencyPropertyChangedEventArgs changedArgs, Boolean invalidateOnlyContainer, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalMap& propertyTriggersWithActions, Int32 sourceChildIndex) System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEve

Page navigation in a frame throws an exception

I created a very simple WPF project that exhibits the following error. I have no idea how to get of this error. System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.Menu', AncestorLevel='1''. BindingExpression:Path=TemplatedParent; DataItem=null; target element is 'MenuItem' (Name=''); target property is 'CommandTarget' (type 'IInputElement') Steps to reproduce:1. Create a WPF Application project in Visual Studio 2008 (Windows 7)2. Create Page1.xaml <Page x:Class="WpfApplication1.Page1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Page1"> <TextBlock> <Hyperlink NavigateUri="Page2.xaml">Page 2</Hyperlink> </TextBlock> </Page> 3. Create Page2.xaml <Page x:Class="WpfApplication1.Page2" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Page2"> <TextBlock> <Hyperlink NavigateUri="Page1.xaml">Page 1</Hyperlink> </TextBlock> </Page> 4. Add a frame in Window1.xaml <Window x:Class="WpfAppli

Lookup transform partial cache problem.

Hi, I've a simple lookup transform in SSIS 2008 (R2). I've created it with a full cache and it worked fine. When i switch to partial cache, it will give me this error: -------------------------------------------------------------------------------------------------- TITLE: Package Validation Error ------------------------------ Package Validation Error ------------------------------ ADDITIONAL INFORMATION: Error at DFT_AdventureWorks [Lookup [411]]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Syntax error, permission violation, or other nonspecific error". Error at DFT_AdventureWorks [Lookup [411]]: OLE DB error occurred while loading column metadata. Check SQLCommand and SqlCommandParam properties. Error at DFT_AdventureWorks [SSIS.Pipeline]: "component "Lookup" (411)" failed validation and returned validation status "VS_ISBROKEN". Error at DFT_AdventureWorks [SSIS.Pipeline]: One or more component failed validation. Error at DFT_AdventureWorks: There were errors during task validation.  (Microsoft.DataTransformationServices.VsIntegration) -------------------------------------------------------------------------------------------------- i've

CLR Profiler for the .NET Framework 2.0 : A bug (with possible fix!) - It throws exception - null ob

CLR Profiler for the .NET Framework 2.0   I tied to profile a service on my machine. But when I try to see the heap data (during reading of the log file) it throws exception that the object reference is not set (null object).   I debugged the CLR profiler and found that in class ReadNewLog, there is method "ReadFile" internal void ReadFile(long startFileOffset, long endFileOffset, ReadLogResult readLogResult, int requestedIndex) ...     if (matched > 0 && c != -1)     {         /* use some other stack trace as a reference */         int otherStackTraceId = ReadInt();         otherStackTraceId = stacktraceTable.MapTypeSizeStacktraceId(otherStackTraceId);         int[] stacktrace = stacktraceTable.IndexToStacktrace(otherStackTraceId);         if (matched > stacktrace.Length - hadTypeId)             matched = stacktrace.Length - hadTypeId;         for(int i = 0; i < matched; i++)         {             int funcId = stacktrace[i + hadTypeId];             Debug.Assert

Blob Cache Event ID 7888 Runtime Exception Thread was being aborted

HI, We have 3WFE and we are getting error Events 788 and 5538 on all three servers at same time. Any thoughts on what is causing this error? Event Type: Error Event Source: Office SharePoint Server Event Category: Office Server General Event ID: 7888 Date:  9/14/2010 Time:  2:31:08 PM User:  N/A Computer: MOSS2007A Description: A runtime exception was detected. Details follow. Message: Thread was being aborted. Techinal Details: System.Threading.ThreadAbortException: Thread was being aborted.    at System.Threading.ReaderWriterLock.AcquireWriterLockInternal(Int32 millisecondsTimeout)    at Microsoft.SharePoint.Publishing.BlobCache.<>c__DisplayClass14.<>c__DisplayClass17.<FetchItemFromWss>b__11()    at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.   Event Type: Error Event Source: Office SharePoint Server Event Category: Publishing Cache Event ID: 5538 Date:  9/14/2010 Time:  2:31:08 PM User:  N/A Computer: MOSS2007A Description: An error occured in the blob cache.  The ex

SharePoint 2010 : Creating SPSite object throws exception FileNotFoundException

We are in a process of upgrading from SharePoint 2007 to SharePoint 2010. I had written a Service which runs under default web site on the SharePoint web server. This service's app pool account uses the farm admin account. The service was working with no issue on SharePoint 2007 x64bit server. When I installed and run the same service on SharePoint 2010 x64bit box. I get the FileNotFoundException on SPSite site = new SPSite(http://myserver/sites/projects/project01); I have given the pool account running this server following rights: The Farm Admin The Site Collection Admin The Database Sys Admin The Local Admin No Luck. Thank you in advance for your help.

RESTful WCF with session required throws exception

Interface code:   [ServiceContract(Namespace="", SessionMode=SessionMode.Required)]   public interface ITestService   {     [WebInvoke(UriTemplate = "",         Method = "POST",         BodyStyle = WebMessageBodyStyle.WrappedRequest)]     [OperationContract]     string ModInit(String arg); ... Service code: [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)] public class TestService : ITestService public string ModInit(String arg) ... Startup code: WebServiceHost host = new WebServiceHost(typeof(TestService),    new Uri("http://localhost:10000/test)); ... Client code: Uri address =  new Uri("http://localhost:10000/test"); var factory = new WebChannelFactory<ITestService>(new   WebHttpBinding { AllowCookies = true }, address); ITestService svc = factory.CreateChannel(); string resp = svc.ModInit("test"); ... This code throws a InvalidOperationException: Contract requires Session, but Binding 'WebHttpBinding' doesn't support it ... Does anyone know to get PerSession and SessionMode=SessionMode.Required working in the self hosted code above? Thanks, Mike

ActivityXamlServices.Load throws exception

Hi guys, I have very strange problem and I don't know what to do. I have written application in workflow 4. This application contains a few parts. One of the part is responsible for testing workflow in rehosted workflow designer and another for running workflow periodically. In both parts I use the same code, which is responsible for create Activity from xaml. And here is my problem. In one part this code works fine but in the second part of my application it throws exception. This is the code of which I speak. public static Activity XamlToActivity(Workflow Workflow) { byte[] workflowFilestream = Workflow.FileStream; MemoryStream workflowStream = new MemoryStream(); workflowStream.Write(workflowFilestream, 0, workflowFilestream.Length); return ActivityXamlServices.Load(workflowStream); } Exception Message: "Cannot set unknown member '{http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation}VirtualizedContainerService.HintSize'.' Line number '1' and line position '11'. I'm sure, that xaml is correct (I saved it from workflow designer). It seems to me important thing, that ActivityXamlServices.Load throws exception, when I use it in another Thread (I create new threat, which runs workflows). Someone have any idea or doing something similar? I would be very grateful for help.

System.Out of Memory Exception


I'm running SSRS 2005 on a 2008R2 64bit server with 12GB of RAM.....I must have one heck of a crappy query to run through 12GB of RAM.....where do I check how much memory is being allocated to SSRS?


Release mode application throws Break instruction exception - code 80000003 when running in WinDbg


Here is the initial output of my program after running it from WinDbg:

CommandLine: "C:\Documents and Settings\Administrator\My Documents\Work\QMI_Test_Tool\QMI_UT_Source\Release\QMI Validation Tool.exe"
Symbol search path is: SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
Executable search path is: 
ModLoad: 00400000 0048f000  QMI Validation Tool.exe
ModLoad: 7c900000 7c9b2000  ntdll.dll
ModLoad: 79000000 7904a000  C:\WINDOWS\system32\mscoree.dll
ModLoad: 7c800000 7c8f6000  C:\WINDOWS\system32\KERNEL32.dll
ModLoad: 77dd0000 77e6b000  C:\WINDOWS\system32\advapi32.dll
ModLoad: 77e70000 77f03000  C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fe0000 77ff1000  C:\WINDOWS\system32\Secur32.dll
ModLoad: 7c420000 7c4a7000  C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCP80.dll
ModLoad: 78130000 781cb000  C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCR80.dll
ModLoad: 77c10000 77c68000  C:\WINDOWS\system32\msvcrt.dll
ModLoad: 7c9c0000 7d1d7000  C:\WINDOWS\system32\SHELL32.dll
ModLoad: 77f10000 77f59000  C:\WINDOWS\system32\GDI32.dll
ModLoad: 7e410000 7e4a1000  C:\WINDOWS\system32\USER32.dll
ModLoad: 77f60000 77fd6000  C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 7c4c0000 7c53d000  C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\m

PDF export generates out of memory exception


I've got a report I'm testing in SQL 2008 R2 Reporting Services (evaluation), and while it displays in the web browser fine when I go to export it I get some odd results. First of all, it exports to TIFF/MHTML formats perfectly fine. When I try PDF I get an out of memory error (with details below), and when I try to export to Word I get a skewed sliver of the report available on the right hand side of the page.

The interactive size and page size are 36" x 36", and margins of .25" are set for all sides. The body of the report is set to 35.5" x 35.5". Within the body there are 3 map components which take up the entire space, one on the left which is the full height and half the width of the body, and two on the right which are half the height and half the width of the body. The report displays fine in the designer, and when rendered in a web browser - so I'm pretty sure it's not a matter of too much detail.

While rendering the report for the browser the available physical memory on the system remains pretty constant at about 1GB available (out of 1.5 GB total physical). When trying to export the report to PDF the available memory fluctuates between 350MB-1GB available, and eventually dies. I also tried giving the machine 2GB of physical memory, but ran into the exact same error. Rendering to other formats like T

TryConnect, TcpClient.Connect that doesn't throws exception, it returns bool

using System;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;

namespace TryConnect
  class Program
    [DllImport("ws2_32.dll", SetLastError = true)]
    internal static extern int WSAConnect(
                     [In] IntPtr socketHandle,
                     [In] byte[] socketAddress,
                     [In] int socketAddressSize,
                     [In] IntPtr inBuffer,
                     [In] IntPtr outBuffer,
                     [In] IntPtr sQOS,
                     [In] IntPtr gQOS

    [DllImport("ws2_32.dll", CharSet = CharSet.Auto, SetLastError = true)]
    internal static extern IntPtr WSASocket(
                        [In] AddressFamily addressFamily,
                        [In] SocketType socketType,
                        [In] ProtocolType protocolType,
                        [In] IntPtr protocolInfo,
                        [In] uint group,
                        [In] int flags

    [DllImport("ws2_32.dll", ExactSpelling = true, SetLastError = true)]
    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    internal static extern int closesocket(
                       [In] IntPtr socketHandle


IHostAssemblyStore::ProvideAssembly: CLR throws exception "The located assembly's manifest definiti


PostSharp 2.0 includes a CLR host and implements IHostAssemblyStore::ProvideAssembly.

From managed code, I invoke:
Assembly.Load("logicnp.cryptolicensing, Version=, Culture=neutral, PublicKeyToken=4a3c0a4c668b48b4")
My implementation of IHostAssemblyStore::ProvideAssembly receives the following input for the first parameter pBindInfo:
0x002cd578 {


lpReferencedIdentity=0x03c123f8 "logicnp.cryptolicensing, version=, culture=neutral, publickeytoken=4a3c0a4c668b48b4" 

lpPostPolicyIdentity=0x03c14620 "logicnp.cryptolicensing, version=, culture=neutral, publickeytoken=4a3c0a4c668b48b4, processorarchitecture=x86" ...


My implementation then returns the right stream. Note that the binding identity of that file is "logicnp.cryptolicensing, version=, culture=neutral, publickeytoken=4a3c0a4c668b48b4".

When I return this file from ProvideAssembly, the CLR throws the following exception:

Could not load file or assembly 'logicnp.cryptolicensing, Version=, Culture=neutral, PublicKeyToken=4a3c0a4c668b48b4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

So the

MembershipUser.UnlockUser() throws exception: A constraint violation occurred. (Exception from HRESU



I'm having some problems getting code to work that'll re-enable a locked out account. Below is my code:

public bool ChangeAccountStatus(string username, bool enable)

                if (AzMan.CheckAccess(Operations["ChangeAccountStatus"], null) == false)
                    throw new SecurityException();

                MembershipUser user = Membership.GetUser(username);
                if (enable)
                    user.IsApproved = true;
                    if (user.IsLockedOut)
                    user.IsApproved = false;

                return enable;
            catch (Exception e)
                return !enable;

Enabling a disabled account works fine but when the account is locked out, I hit the user.UnlockUser() line and get the following exception:

Message "A constraint violation occurred. (Exception from HRESULT: 0x8007202F)"

StackTrace " at System.DirectoryServices.DirectoryEntry.CommitChanges()\r\n


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