enterprise-library

Logging Application Block doesn't add log entries to Event Viewer on machines other than that on which the application was built

I am using the Logging Application Block (of Microsoft Enterprise Library 5.0) to log exceptions in the Event Viewer that occur in my WPF XBAP application. However, exceptions are only being logged if the application is run on my machine (the machine it was built on). Any other machine it doesn't log anything. I've tried to find a reas...

Upgrading EntLib 4.1 to 5 with Oracle.DataAccess.Client

Hello, I am upgrading a project from EntLib 4.1 to EntLib 5. I've skimmed through the Migration Guide, changed all the references and updated all the config files to point to EntLib 5. All worked fine accept Oracle database access. With the config file: <configuration> <configSections> <section name="dataConfiguration" type="Micro...

Simple Enterprise Library console application refuses to compile

I just downloaded and installed Microsoft Enterprise Library 5.0. I fired up VS 2010 to play with EL 5 and created a very simple console application. However, it would not compile. I got the following error: The type or namespace name 'Data' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary' (are you miss...

"Unrecognized configuration section exceptionHandling" in WCF service when using Enterprise Library

I am working on a WCF service and want to use the Enterprise Library ExceptionHandling block to send the fault message back to the client but I am running into a problem. I have found very little on the web about this error. I added the exceptionHandling block to the web.config and also a reference to exceptionHandling in the configSec...

Turn off LogEnabled Filter at run time - Logging Enterprise Application Block

Hi, so the story go like this: i'm using the Logging Enterprise Application block that provided by microsoft to log events in our application. The goal is to enabled event viewer logging at loading and then turn it off. What i did is to add EventLog TraceListener which write all our logs into the event viewer. What i'm trying to do ...

ExceptionPolicy.HandleException does not install Event Source for Logging in Registry if XBAP run outside debugger

I am using the Logging Application Block (of Microsoft Enterprise Library) to log exceptions in the Event Viewer that occur in my WPF XBAP application. If I run the XBAP in the debugger from Visual Studio, an Event Source entry for my application is automatically created in the Registry at: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe...

Does it suck or not - Simple DAL with caching using Linq to SQL

I created a simple Caching Data Access Layer that has caching using the Enterprise Library Caching Application Block and also makes use of SQL Query Notification - therefore not supporting any queries which are not valid for query notification. Background: This was put in place after the application was developed in order to lighten the...

Log to rolling CSV file with Enterprise Library

Need logging to: Rolling file, to avoid 1 big log file. CSV format for easier look up. I can see EntLib (5.0) have Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener to log to rolling log file. To make the log entries look like a CSV row, I can change the Logging.Formatters.TextFormatter.Templa...

sp_procedure_params_managed - how to eliminate these calls from EnterpriseLibrary?

We noticed in a SQL Server Profiler trace that this proc is being called: sp_procedure_params_managed Each call has 350+ reads in the trace! We are using Microsoft.Practices.EnterpriseLibrary.Data in an ASP.NET front end. How can we eliminate these stored procedure calls? We are not explicitly calling it in code. I'm running Sql Ser...

Section or group name 'cachingConfiguration' is already defined - but where?

On Windows XP I am working on a .NET 3.5 web app that's a combination of WebForms and MVC2 (The WebForms parts are legacy, and being migrated to MVC). When I run this from VS2008 using the ASP.NET web server everything works as expected. However, when I host the app in IIS and try to use it, I see the following error Section or group n...

Enteprise Library Exception Handling for WCF Fault Contracts - CLIENT SIDE

I have a Windows Service which communicates with WCF services. The WCF services are all fault shielded and generate custom UserFaultContracts and ServiceFaultContracts. No problems there. In the Windows Service I am using EntLib for exception handling and logging. I do not want to try catch for faults try { } catch (FaultException<Us...

Activation Error while testing Exception Handling Application Block

I'm getting the following error while testing my EHAB implementation: ArgumentException - Event log names must consist of printable characters and cannot contain , *, ?, or spaces The stack trace was: {"Activation error occured while trying to get instance of type ExceptionPolicyImpl, key "LogPolicy""} System.Exception Sta...

Enterprise library Rewriting the Code to Save data and return value

Without Enterprise Data library,I am using the below code to insert some thing to DB and reading the return value from that int result = 0; using (SqlConnection myConnection = new SqlConnection(AppConfiguration.ConnectionString)) { SqlCommand myCommand = new SqlCommand("SaveUser", myConnection); myCommand.CommandType = Co...

sending emails from the enterprise library 5 from hosted enviroment

Hi there, I am building a .net 4 application and I am wanting to use the enterprise library 5 for my error handling. I am trying to setup email however I cant get it to work on my hosted enviroment. I can get it work locally however no emails are been triggered on the live enviroment. I have setup my web.config to look something like t...

Problem when trying to configure enterprise library 5.0 (Data Access Application Block)

Hi There Stackoverflow, I am running into some problems while trying to get DAAB from Enterprise library 5.0 running. I have followed the steps as per the tutorial, but am getting errors... 1) Download / install enterprise library 2) Add references to the blocks I need (common / data) 3) Imports Imports Microsoft.Practices.Enterprise...

Validate DateTime in Validation Application Block

Hello All! How to validate DateTime by Validation Application Block, to not be more than DateTime.Now? thanks. ...

Can you have a log file per user with Enterprise Library 5 in Asp.net Mvc 2?

There were 2 solutions suggested so far Environment variables using %username% in the filename section, and low level unmanaged code to accomplish it. Environment variables would be susceptible to pulling back only the user that is running the app (the server process login), not the form's login validated username or userGuid. Has this ...

EnterpriseLibrary ExceptionHandling is not writing to my log file

Hi, I have enterprise logging & exception logging enabled in my web app. The web.config is set-up so everything should work. It has worked before on other servers because the trace.log file which is in the root of the application has trace information in it. I cleared my trace.log on my local machine to test that it is working when I ge...

Cast error on SQLDataReader

My site is using enterprise library v 5.0. Mainly the DAAB. Some functions such as executescalar, executedataset are working as expected. The problems appear when I start to use Readers I have this function in my includes class: Public Function AssignedDepartmentDetail(ByVal Did As Integer) As SqlDataReader Dim reader As SqlDataRe...

Is the Microsoft Enterprise Library Data Access Application Block thread safe?

I can't seem to find any documentation regarding thread safety... In particular - is the Database class (and subclasses) thread safe How would I find this out for myself? Are there references to thread safety for classes on the MSDN site? ...