We have many assemblies (class libraries) which our main application uses. I want to route the logs of some assemblies to different destinations, but I have one App.Config file, so how may I achieve this? I'm pretty much sure there is a setting like this in Logging Application Block which I'm unaware of. Also I want to route logs based o...
I'm new to Moq, and just started on a project that's already in development. I'm responsible for setting up unit testing. There's a custom class for the DatabaseFactory that uses EnterpriseLibrary and looks like this:
public Database CreateCommonDatabase()
{
return CreateDatabaseInstance(string.Empty);
}
private static Database Creat...
Hello,
I have a problem with the Microsoft EnterpriseLibrary validation framework.
Let's say we have a DateTime? field. When using the NotNullValidator with another validator (let's say, the datetime validator) I always run in an exception.
The scenario is: I pass a null value. The NotNullValidator works fine (it sets the validation i...
I have an Address object that I am trying to validate data against using EntLib:
Given the following method:
<ValidatorComposition(CompositionType.And, Ruleset:="FraudAnalysis")> _
<NotNullValidator(MessageTemplate:="Billing address is required.", Ruleset:="FraudAnalysis")> _
<TypeConversionValidator(GetType(Address), MessageTemplate:=...
Hi
I wondering abourt the functionality in Enterprise library and logging to file.
Is it so that it is able to create the logging folder and file and then setup the permissions needed to write entries into the logging file? Or is this somthing that has to be setup by the user.
...
I'm using enterprise library for logging web page events. Because page is load balanced I have to store logs in database on different server (requirement). Sadly, I found storing around 20 entries per page request is very slow (adds additional ~10s). Can anybody explain why this happens and how to fix it.
P.S. I'm using default pooling ...
Is the logging application block able to handle these situtations or combinations of them?
If logging fails, do not throw an exception
for specific exceptions/exception types only
If logging fails, fallback to another type(ie database logging fails, fall back to emailing or net send)
Example of my actual usage case:
I am writing a...
I am trying to use microsoft enterprise library logging framework in a c++/cli dll.
I tested it in a c++ application, and it worked beatifully. it is compiling in the dll, but does not work when I try to run it, and the error is not getting caught in my catch clause.
I have all the correct import and using statements in place - as it c...
I created a c++ .net dll, in which I need to implement logging. I decided to go with Microsoft Enterprise Library's Logging.
Now, I am calling this dll from a COM application (I created a .tlb from the dll to use in the COM application), and the error I am getting is this:
Could not load file or assembly 'Microsoft.Practices.Enterpris...
Is it possible to use Enterprise Library logging application block to log to a sqlite database? The standard Database TraceListener uses stored procs so I guess I'll need to create a Custom tracelistener or find one someone else has already done.
Does anyone know of an implementation of this, or a similar sort of thing I could use as a ...
Currently I've got a set of EntLib validation rules defined in my classes. The rules will later change based on the client.
What I'd like to do is retain my classes, and simply call the different rule sets defined somewhere for the specific client.
The functionality of this is similar to storing internationalization values in a .resx ...
I'm using Enterprise Library's DAAB. I have code like this:
Database dBase = DatabaseFactory.CreateDatabase();
DbCommand dCommand = dBase.GetStoredProcCommand(StoredProcedureName, Parameters);
dCommand.CommandTimeout = CommandTimeout;
return dBase.ExecuteDataSet(dCommand);
How can I clear the paramete...
Why SQL Cache Dependencies is not given in Enterprise Library (any version)?
Does anyone know how to implement a sql-dependency with the caching application block?
...
I get the following error when calling a stored procedure that has a table valued parameter as one of the parameters
The EXECUTE permission was denied on the object 'ValidationErrors'
ValidationErrors is a TVP created with the following statement:
CREATE TYPE [dbo].[ValidationErrors] AS TABLE(
[ErrorMessage] varchar NOT NULL
)
...
Whats the difference between tracing and logging in enterprise application blocks?
When to you use tracing against logging?
Any examples would be great
...
I'm using Microsoft's enterprise library logging to log to a rolling flat file listener in my C++ dll. (IDE - VS2005)
I'm having an issue that new files keep getting generated, with the GUID appended to the beginning of the file name.
I've been googling this issue, and the solution seems to be to call logwriter.Dispose().
For some rea...
Am using the enterprise library validation.
I have classes like below
public class Customer
{
public int Id { get; set; }
[NotNullValidator(MessageTemplate = "{1} is null")]
public string FirstName { get; set; }
[NotNullValidator(MessageTemplate = "{1} is null")]
public string Surname { g...
When I try and use code that makes use of the Enterprise Library Caching Block I get the following error:
The "cachingConfiguration" section is not available in the supplied configuration source.
The section is in my app.config file for that particular assembly though. If I copy the file into the unit test assembly that makes use of th...
Hello,
I'm using Microsoft Enterprise Validation Library.
If i have a
[NotNullValidator(MessageTemplate="Cannot be null!", Ruleset="validate_x")]
public string x{
get;
set;
}
and then, in a test class i have:
MyBO target=new MyBO { x=null };
and i wanna check if this is valid (using ValidationResult), and also that ruleset, the test...
I have a stored procedure query that I want to return the details of columns within a specific table. When I run the sp in Sql server managements studio I get results returned. The problem is when I try to execute the query from C# code. There are no exceptions thrown and the relevant persmissions are granted to execute the procedure ...