enterprise-library

Using Enterprise Library Data Access Application Block with strongly typed data sets

I want my strongly typed data sets to be database agnostic. Is it possible to use Enterprise Library Data Access Application Block with strongly typed data sets? ...

Microsoft Enterprise Library Caching Application Block not thread safe?!

Good aftenoon, I created a super simple console app to test out the Enterprise Library Caching Application Block, and the behavior is blaffling. I'm hoping I screwed something that's easy to fix in the setup. Have each item expire after 5 seconds for testing purposes. Basic setup -- "every second pick a number between 0 and 2. if th...

WCF using Enterprise Library Validation Application Block - how to get hold of invalid messages?

I've got some WCF services (hosted in IIS 6) which use the Enterprise Library (4.0) Validation Application Block. If a client submits a message which fails validation (i.e. gets thrown back in a ValidationFault exception), I'd quite like to be able to log the message XML somewhere (using code, no IIS logs). All the validation happens bef...

3rd party library depends on different versions of enterprise library assemblies that my application uses

I have a web application that uses the enterprise library for logging. I've recently been asked to use a 3rd party library that also has dependencies on the same enterprise library assemblies I'm using--except it uses different versions. I don't think I can throw the EL assemblies in the GAC (or maybe I can and I just don't know how), ...

Validate Property With Attribute (Alternative to Enterprise Lib Validation Block)

Are there any alternative to Enterprise Library Validation Block? I want to be able to add validation attributes to my properties. Thanks ...

Strange dll behavior (Question overhaul)

I have a dll project that references Microsoft.Practices.EnterpriseLibrary.Common.dll (="the dll") from my install dir of the Microsoft Enterprise Library 3.1. It has a public key that starts with "b03f". I have another project that references Miner.Geodatabase.dll version 9.30.2.5168 (It shows 9.2.0.0 in the GAC folder). The Miner dll h...

How to separate Enterprise Logging file in EventType?

I have a log Mysite.log Is possible to automatically separate in Mysite.error.log, Mysite.debug.log, Mysite.warning.log? Depending of TraceEventType? ...

Compare Logging Application Block in Enterprise Library versus Log4net?

Can somebody please compare these two logging mechanism? ...

Enterprise Library ExceptionManager: "Log entry string is too long."

We use Microsoft's Enterprise Library (4.1) and frequently have the following problem: [ArgumentException: Log entry string is too long. A string written to the event log cannot exceed 32766 characters.] System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] ra...

Count(*) using Enterprise Library

Hi all, Does anyone have any idea how to use count(*) in a dynamic query with the Enterprise Library Data Access Application Block? I am using: Public Shared Function selectCount(ByVal code As String) As Integer Dim query As String = "SELECT COUNT(*) " & _ "FROM " & _ "Data " &...

Programmatically configure an EntLib CAB CacheManager

Currently I'm having to include a significant chunk of XML in the app.config to get the CAB CacheManager going and I'd rather hide the configuration away in my code. Is there any way to programmatically configure an Enterprise Library Caching Application Block's CacheManager? ...

AddInParameter or AddWithValue or both when using Ent Lib Data Application Block?

I have a dynamic sql query with the following WHERE clause: ... "WHERE " & _ "mc.EmployerCode = @EmployerCode " & _ "AND mc.ReceiptDate = #02/SEP/2009# " & _ "AND " & _ "( " & _ "f.Payment = 'COMPLETE' " & _ "OR f.Payment IS NULL " & _ ") " & _ ... As you can see, there are a few joins in this query. Now, if I use: ...

How to identify in which record the validation failed using WCF and EntLib Validation Block?

Problem: I have a WCF Webservice which can be used by customers to upload multiple datarecords. To validate the data I use Enterprise Library Validation Block. The records can be nested several layers deep. Question: How to identify in which record the validation failed? Example: Consider the following datastructure. For each Contin...

Can MS Enterprise Library Logging be used for multiple applications?

I'm wondering if its - a) possible; b) good practice - to log multiple applications to single log instance? I have several ASP.NET apps and I would like to aggregate all exceptions to a centralized location that can be queried as part of an Enterprise Dashboard app. I'm using both the EL logging block and the EL exception blog along wi...

Event Log written as Warning instead of Error

I'm using EntLib 4.1 for logging. When I have an exception handled in the Application_Error of Global.asax.cs, I log the error with a category of 'Error'. I assumed that the event log type would be 'Error', but instead the event log entry is written with a type of 'Warning' and category of 'Web Event'. public static void Write(Exception...

ERP Framework to use in development?

Hello everybody: We are about to start developing an ERP for small companies, and the question is if there is some free framework for ERP that I can use? Is something done to accelerate the process? Best Regards and thanks in advanced!!! ...

Set default isolation level for Microsoft.Practices.EnterpriseLibrary

Hi all, I've got a .net 3.5 website that calls thousands of different stored procs using Microsoft.Practices.EnterpriseLibrary. We have been getting alot of timeouts and after some playing and testing the use of (nolock) on the end of the table join in stored procs works real well and reduces the timeouts. I want to now do this to al...

C# Enterprise Application Datablocks error

Can someone post a "working" example of the Enterprise Application Data block, to call a SP. All the sample code I find starts with // Create DataBase Instance Database db = DatabaseFactory.CreateDatabase(); But my code throws an object reference not set to an instance.... ...

Enterprise Application Datablocks transaction

Having a bit of trouble with the application block, trying to figure out a logical way to execute 3 SP's in a transaction. So far I have : SqlDatabase db = new SqlDatabase(this.ConnectionString ); DbCommand insertMessageDetailCommand = db.GetStoredProcCommand("InsertMessageDetail"); Looking good ... from this point things get a bit ...

C# DbCommand in a loop

I have a collection of files, for each file I am going to call an SP using Dbcommand in a transaction. for example: DbCommand insert = db.GetStoredProcCommand("Insert"); db.AddInParameter(insert, "FileName", System.Data.DbType.String, ID + ".xml"); db.ExecuteNonQuery(insert, transaction); My question is how do I put thi...