enterprise-library

Cannot resolve symbol 'EnterpriseLibraryContainer'

萝らか妹 提交于 2019-12-10 03:31:58
问题 I just started to try out the new MS Enterprise Library 6.0 Logger block. When I try to create a LogWriter, I get the error: Cannot resolve symbol 'EnterpriseLibraryContainer' I have all the references and usings in place, but can't get past this error. Is there a solution to this issue? 回答1: Halleluiah! I just found a post (on a link that has since disappeared). Here's the story: The bootstrapping code for all of the blocks has changed in version 6 of Enterprise Library. The blocks no longer

Is it a good practice to create wrapper over 3rd party components like MS enterprise Library or Log4net?

徘徊边缘 提交于 2019-12-10 02:33:09
问题 This is more like a good practise question. I want to offer different generic libraries like Logging, caching etc. There are lots of third party libraries like MS enterprise library, log4Net, NCache etc for these. I wanted to know if its a good practise to use these directly or create wrapper over each service and Use a DI to inject that service in the code. regards 回答1: This is subjective, but also depends on the library. For instance, log4net or NHibernate have strictly interface based API

Enterprise Library Logging not logging to Event Log from ASP.NET

懵懂的女人 提交于 2019-12-09 14:42:43
问题 I spent a day trying to make Ent Lib Logging work and log anything into database or event log. I have a web application and console application with the same Ent Lib config but only the console application is capable to log into the Event Log. I tried everything with permissions but I don't know what exactly I am doing — which services should have what. It does not work! I read articles like this http://imar.spaanjaars.com/275/logging-errors-to-the-event-log-in-aspnet-applications and I want

What is the LogWriter.ShouldLog(LogEntry) method behaviour based on?

一世执手 提交于 2019-12-09 11:47:59
问题 What is the LogWriter.ShouldLog(..) method behaviour based on? Or what is the real intention of its usage? Its documentation page is rather sparse and doesn't provide much insight. Quoting it: Queries whether a LogEntry shold[sic] be logged. ( Complete with same typo in all versions of the Enterprise Library, makes me wonder if the authors paid much attention to it. ) The method seems rather ethereal to me. Should I always check it before logging? Currently I only check LogWriter

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

允我心安 提交于 2019-12-08 14:59:49
问题 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.EnterpriseLibrary.Common Imports Microsoft.Practices.EnterpriseLibrary.Data 4) Through the enterprise library config software. I open up the web.config from my site. I then click Blocks, then Add

WPF Prism Region inside a tab control isn't in the Region List

跟風遠走 提交于 2019-12-08 12:32:58
问题 I've got a tab control with a region attached to it and I've also got a content control inside my tab controls content with another region. The problem I'm having is - if I call RegisterViewWithRegion it adds the view to the region no problem (first time that is, get issues if you swap tabs). But this isn't very flexible and I'm looking for a better way to do that. When I look inside IRegionManager.Regions as well - I can only see the two top level regions. I cant see my sub region

How to correctly dispose objects registered with Autofac

╄→尐↘猪︶ㄣ 提交于 2019-12-08 11:58:41
问题 I've implemented Unit of Work/Repository pattern, as described here, but I'm also using autofac and constructor injection, so I registered UnitOfWork and DbContext (PsyProfContext) class like this: builder.Register(context => new PsyProfContext()).InstancePerHttpRequest(); builder.RegisterType<UnitOfWork>().As<IUnitOfWork>().InstancePerHttpRequest(); And everything works great! Except for one thing: I'm also using enterprise library logging block, and I have implemented CustomTraceListener

UIP Application Block in .NET 4

我的梦境 提交于 2019-12-08 11:13:11
问题 I am involved in migrating a legacy application built in .NET 1.1 to .NET 4. Is UIP (User Interface Process) still available in the latest released of EnLib 5? If no, what are my options? Regards, Karan Misra 回答1: Assuming you are talking (as in the Title of your question) about the User Interface Process Application Block, there have been no new official releases since 2004, as you can read here. The options you are talking about really depend on the usage UIP was given. Take into account

Refresh Enterprise Library Cache After External App Updates It

别来无恙 提交于 2019-12-08 09:33:45
问题 After searching around for months on and off I finally decided to post this up. We have an ASP.NET MVC app that uses enterprise library to cache items. We also use a windows service that every so often updates those cached items. Problem is that when the windows service updates the cached items, the mvc website does not see the updated cached items until we reset IIS. We have thought about putting some code in the service to restart the IIS service but think there has got to be a better way.

How to configure Enterpise Library 6.0 logging to database?

不问归期 提交于 2019-12-08 09:12:32
问题 In my App.config I have a second things: <configSections> <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /> <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0,