enterprise-library

Enterprise Library Logging Application Block options

烂漫一生 提交于 2019-12-08 07:37:46
问题 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 ticketing system for our team. If emailing the team on a new ticket creation fails, I want it to report that to the exception/error log, but not bubble that up to

MySQL Caching

可紊 提交于 2019-12-08 05:02:49
问题 Last night I added a parameter to a stored procedure in a mySQL database. I accessed it, messed up the parameter, and decided to remove the parameter again, for testing. Still minutes after re-creating the procedure without the parameter, my command object was still complaining about a missing parameter. Is this mySQL, MySQL/Connector, ADO, or Enterprise library's fault, and what can I do about it? 回答1: By default MySQL caches queries in your stored procedures. See if Query Cache is enabled:

How to Integrate Enterprise Library Validation Application Block ValidationResults between WCF and ASP.NET?

梦想与她 提交于 2019-12-07 23:08:50
问题 Enterprise Library Validation Application Block (VAB) integrates with ASP.NET and also with WCF. Is there a way to integrate ValidationResults created in WCF with ASP.NET? e.g. an ASP.NET web page invokes a WCF service. The WCF service validates the data using VAB and returns validation information via a FaultContract. The ASP.NET page can take the results and display some error messages. However, a common approach is to indicate which fields have errors (e.g. inline message or asterisk). It

Enterprise Library Logging Application Block options

被刻印的时光 ゝ 提交于 2019-12-07 15:32:27
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 ticketing system for our team. If emailing the team on a new ticket creation fails, I want it to report that to the exception/error log, but not bubble that up to the user, regardless of how deep in the fallback stack the logging fails, the user doesn't need an error

Exception Handling Application Block Exception Handler running in ASP.NET cannot call Response.End()

一笑奈何 提交于 2019-12-07 11:41:33
问题 Using .NET 3.5, ASP.NET, Enterprise Library 4.1 Exception Handling and Logging blocks, I wrote a custom exception handler to display a standard error page, as follows: [ConfigurationElementType(typeof(CustomHandlerData))] public class PageExceptionHandler : IExceptionHandler { public PageExceptionHandler(NameValueCollection ignore) { } public Exception HandleException(Exception ex, Guid handlingInstanceID) { HttpResponse response = HttpContext.Current.Response; response.Clear(); response

ASP.NET Dependency Injection HTTP Module (MS Enterprise Library)

大兔子大兔子 提交于 2019-12-07 10:29:22
问题 I've been following the steps in the 'Microsoft Enterprise Library 5.0' documentation to create a HTTP module to inject a reference to the Enterprise Library container into the pages of ASP.NET web application. It contains the following code (which also appears online here): using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using Microsoft.Practices.Unity; namespace Unity.Web { public class UnityHttpModule : IHttpModule { public void Init(HttpApplication

Enterprise library 4 dataconfiguration tag

一世执手 提交于 2019-12-07 09:39:02
问题 I am using Enterprise library for my data access. When I am running the application, at the CreateDatabase() statement I am getting this exception: Microsoft.Practices.ObjectBuilder2.BuildFailedException was unhandled by user code Message="The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Data.Database, null]) failed: The value can not be null or an empty string. (Strategy type Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder

EntLib5: Loggin application block not logging to Event Log (exception: type LogWriter cannot be constructed)- Can anyone help?

别说谁变了你拦得住时间么 提交于 2019-12-07 03:06:31
问题 HI there, I just setup the logging application block part of Enterprise Library 5. I think i have done it correct but its not logging to the event log it errors on the write method and gives me the following exception. The type LogWriter cannot be constructed. You must configure the container to supply this value. Can anyone do me a check or tell me what i am missing.. First of all i am running in windows 7 with a winforms application. Here is my method that creates the log and you see the

The type or namespace name 'Practices' does not exist in the namespace 'Microsoft'

我是研究僧i 提交于 2019-12-07 00:24:52
问题 I am using Microsoft Visual Studio 2005 for c# I have the following namespace on my code using Microsoft.Practices.EnterpriseLibrary; using Microsoft.Practices.EnterpriseLibrary.AppSettings; using Microsoft.Practices.EnterpriseLibrary.Data; and I keep on getting this error: -The type or namespace name 'Practices' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) What should I do? Thanks in advance. :) 回答1: You should add a reference to the enterprise library

EnterpriseLibrary.Logging writes logs with 1 hour difference

不羁岁月 提交于 2019-12-06 23:37:10
问题 we encounter a weird problem with logging. We are using Microsoft.Practices.EnterpriseLibrary.Logging library for logging in our web application and the problem is that it writes the log with 1 hour difference from the current system time. Our logger is based on this article and the time in a log entry is never set in code by us. Every log entry has a title which looks like this: MainLogSource Information: 0 : Timestamp: 11/04/2011 10:15:32 so this timestamp always 1 hour earlier than system