enterprise-library

Encrypting externally stored App blocks with exportable Key Provider

Hi all, I have been trying for quite a while to figure out how to encrypt Application blocks that are stored in an external file called dev_entlib.config I can see in entlib (4.1) that it's possible to use the default protection providers to encrypt the blocks but, I really need to deploy this Application on different servers and thus ...

How to flush all caches in process for EntLib Caching

I'd like to know if there is a way to tell the Enterprise Library Caching objects to flush all configured caches for that process to flush. Even enumerating through all of the configured caches for that process, and manually flushing each one, is ok, but is there an API method from EntLib.Caching that will give me those values? Or do I...

Enterprise Library Logging Block not logging

I'm having an issue with the 3.1 version of the logging application block... With 3.5 framework my application works fine on my desktop... once it's deployed out to our qa box... the logging ceases to function. The web.config is identical in both scenarios. Any ideas? Permissions issue? After a quick diagnosis... turns out it works ...

Open Microsoft.practices.EnterpriseLibrary database with just a connection string

I am using the Microsoft.Practices.EnterpriseLibrary Database tools and I'm having trouble creating a new database using just the connection string information. Ideally I would like to do the following: Database dbEngine = DatabaseFactory.CreateDatabase( "Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SS...

Usage of Exception handling block in Enterprise Library

Hi all: We have a ASP.NET application that uses the Exception Handling Application block to log our exception to a database (using logging block indirectly). This all working perfect. However, since it is using the exception handling block to log data, everytime we wanted to log, we'll have to new'd a System.Exception object. Since w...

Possible to call Oracle FUNCTION from .Net using Enterprise Library?

I have the following Oracle function: function get_job_no return number is V_job_no number; begin select appwork.tlm_corphier_job.nextval into V_job_no from dual; return V_job_no; end get_job_no; PLEASE NOTE: 1) This is a FUNCTION, not a procedure 2) This is returning a NUMBER, not a VARCHAR 3) I ...

Dynamic DateTimeRangeValidator using Enterprise Library 4.1?

I'm trying to add a range of - 365 days and + 365 days but it appears that using this attribute in EL 4.1 only accepts a special ISO formatted string ... thus I can't simply add a normal string to this validation routine. <DateTimeRangeValidator(DateTime.Now.AddDays(2), DateTime.Now.AddDays(4))> _ I wanted to do something similar to t...

Microsoft Enterprise Library 3.1 - Validation - Message From resx

Hi, I am trying to use the Enterprise Library 3.1 Validation Block for validating my objects in a new project. This application is to be multi-lingual and as such need to be able to put my error messages into resx files. How would you go about doing this? Would you use the config section or Attributes on the objects themselves and how d...

Remove warnings "Could not find schema information for the element" for Enterprise Library in vs2008

I use the Enterprise library caching block with succes (site compiles, everything works like it should). Visual studio gives me 15 messages though. They are all about missing schema information. Like so (cachingConfiguration part varies from message to message) Could not find schema information for the element 'cachingConfiguration'....

Do common JARs have to be repeated accross WARs in an EAR?

I have a JAR file for authorization. I need it for each of my WAR files. All the WAR files are packaged in an EAR file. Do I have to repeat this common JAR in every WAR, or is there a structure for common libraries? So my example looks something like this... big.ear - META-INF - MANIFEST.MF - application.xml - appl1.war ...

WCF ValidationFault

I'm using Validation Application Block - Enterprise Library to validate parameters sent to my WCF Service operations. For instance, a certain operation requires the parameter to either be a 1 or 6, like so: [OperationContract(Name="GetEmployeesByRegion")] [FaultContract(typeof(ValidationFault))] List<Employees> GetEmployeesByRegion([Dom...

Enterprise Library Validation Block - Should validation be placed on class or interface?

I am not sure where the best place to put validation (using the Enterprise Library Validation Block) is? Should it be on the class or on the interface? Things that may effect it Validation rules would not be changed in classes which inherit from the interface. Validation rules would not be changed in classes which inherit from the cl...

Enterprise Library Validation Block - Validate nullable properties?

I am trying to come up with a validation for a nullable property, like int? Example [RangeValidator(0, RangeBoundaryType.Inclusive, 1, RangeBoundaryType.Inclusive)] int? Age { get; set; } However if I set Age to null validation fails because it doesn't fall in the range, I know I need an [ValidatorComposition(CompositionType....

Enterprise Library Database.ExecuteNonQuery hidden performance issues (Connecting to IBM iSeries)

I was wondering what were the hidden performance implications of using the Database object in the Enterprise Library. I have an OleDbCommand (type=stored procedue) that is calling an IBM iSeries stored procedure that is taking anywhere from 1.5 to 4.5 minutes to complete. If I manually run the sproc using the iSeries tools and similar p...

What's the best way to trace log a .NET HTTP handler?

We have a very high-performance multi-threaded .NET HTTP handler application and want to enable trace logging for debugging. I have a few questions about this: Is tracelevel the best way to toggle on/off logging? If tracelevel is "off," will the tracelevel statements have any impact on performance? When using an HTTP handler, how can I...

Relative connection string to AzMan XML store when using security application block

Is it possible to specify a relative connection string for an AzMan XML store? My current connection string is connectionString="msxml://c:/azman.xml" but I really need to make that relative so other developers and automated builds can get the latest authorization store. MS documentation seems to suggest that connectionString="msxml://...

.NET WinForms and the enterprise library validation application block

I have a TextBox whose value is passed to an int property in an object after being parsed to an int. When I use a ValidationProvider this conversion step is ignored when validating and I get an error telling me that I cannot save the string to an int32. I can fix this by creating a string property in my object that acts as a bridge bet...

Custom Trace Listener with the Enterprise Application Blocks

The project I'm currently working on uses Enterprise Libraries V3.1 framework for logging. I need to take the log file that's generated and archive it off at specific points. The built in Trace Listeners seem to keep the file open in-between logging events. I've set up a custom Trace Listener which will append to a file and close it, so...

log4net vs MS Logging Application Block

I am trying to understand pros and cons of using log4netor enterprise library logging application block (LAB) for logging in application. I know one thing LAB is little difficult to use then log4net. ...

What's the essential difference between the two HandleException() methods of Exception Handling Application Block (Ent Lib 4.1)

In the most recent version (4.1, released October 2008) of The Microsoft Enterprise Library's Exception Handling Application Block, there are two HandleException() method signatures, and I am a bit lost on the intent for these, especially since neither the documentation, intellisense, nor the QuickStart apps intimate any meaningful diffe...