enterprise-library

Cannot resolve symbol 'EnterpriseLibraryContainer'

不问归期 提交于 2019-12-05 04:05:38
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? 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 use Unity to manage the initialization and configuration, and each block now includes its own bootstrapping

Pass (Data Table) to SQL Server From ASP.NET using Enterprise Library

喜你入骨 提交于 2019-12-05 03:37:58
问题 public void updateSkills(DataTable candidateSkillSets) { string sqlCommand = "Sp_Candidate"; DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand); db.AddInParameter(dbCommand, "candidateSkillSets",DbType.Object, candidateSkillSets); db.ExecuteNonQuery(dbCommand); } I have a method like the above, here i am passing the datatable to the stored procedure by adding the parameter."DbType.Object" is not taking the datatable type. I know in ADO we can use "SqlDbType.Structured", but for

EnterpriseLibrary.Logging writes logs with 1 hour difference

跟風遠走 提交于 2019-12-05 02:31:50
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 time (e.g. this entry appeared at 11:15). Where can be the problem? Thanks DaveRead By default

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

孤者浪人 提交于 2019-12-05 02:22:14
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 This is subjective, but also depends on the library. For instance, log4net or NHibernate have strictly interface based API's . There is no need to wrap them. There are other libraries which will make your classes hard to test if

Using abstract factory as injectionfactory in Unity?

混江龙づ霸主 提交于 2019-12-04 23:51:07
问题 I have an abstract factory registered for injection in some controller instances. Can I register that abstract factory and use it as an injection factory? This is what I have: public interface ILevelFactory { Levels Create(); } .RegisterType<ILevelFactory, LevelFactory>() .RegisterType<Levels>(new InjectionFactory((c) => StaticLevelFactory.GetLevels())) Desired situation: .RegisterType<ILevelFactory, LevelFactory>() .RegisterType<Levels>(*** look up and use ILevelFactory ***) In short, I want

General Questions about Entity Framework vs. Enterprise Library & a few others [closed]

走远了吗. 提交于 2019-12-04 22:11:21
Brief blurb, My skill in .net has been called "innovative" but I would prefer it be exemplary. Basically, I need a mentor. I own the domain name codeologist.com and I am going to live up to that name but in order to do so I need a mentor & community. On to the questions: Entity Framework - I'd imagine this is an intense framework mapping objects from a factory while retaining the integrity and state of objects within the system. At least, that's what I can intuit from about 15 minutes of a podcast I listened to. RTFM I know but is that a correct general assessment? Enterprise Library - Killer.

Logging from multiple processes to same file using Enterprise Library 4.1

大憨熊 提交于 2019-12-04 20:07:44
问题 I have several processes running concurrently that I want to log to the same file. We have been using Enterprise Library 4.1 Logging Application Block (with a RollingFlatFileTraceListener ), and it works fine, apart from the fact that it prepends a GUID to the log file name when two processes try to write to the log file at the same time (a quirk of System.Diagnostics.TextWriterTraceListener I believe). I've tried various things, including calling Logger.Writer.Dispose() after writing to the

Programmatically access Enterprise Library Logging configuration (object model)?

余生颓废 提交于 2019-12-04 13:20:58
I'm using Enterprise Library 3.1 and want to programmatically access the Logging Block (runtime, object model) specifically its Trace Listeners and Sources. For example, I want to access the Filename property of a trace listener object so I can know where the log file is located on disk. Update: Looking for answers that use the runtime object model, not by parsing the XML configuration. You can access the logging configuration programmatically using the object model (used for configuration). To get the specific data for the trace listener you should look at TraceListenerData (and the specific

System.Diagnostics.Debug namespace vs Other logging solutions (log4net, MS Enterprise Library, etc.)

拈花ヽ惹草 提交于 2019-12-04 09:16:46
问题 I'm currently investigating various logging possibilities for .net projects and I can't decide between System.Diagnostics.Debug/Trace features and third party libraries like log4net, MS Enterprise Library, NLog, etc. At the moment I have found out this: System.Diagnostics is rather difficult to configure and to use since you need to explicitly configure all the listeners, filters, sources, etc. It seems that it also lacks the bulk insertion to the DB (think about writing 100'000 log entries

Enterprise Library Database Trace Listener?

◇◆丶佛笑我妖孽 提交于 2019-12-04 07:16:47
I'm using EntLib v4 for Logging and currently I'm saving the events to the default text file listener. I would like to use MS SQL database as my event sink and I saw that the database listener is already provided, but I don't know how to create logging database and stored procedures? After googling around I saw that in v3 the database creation scripts were shipped with the EntLib, but I can't find them in v4. I just checked and its in the installation for the source. On my machine its in C:\EntLib4Src\Blocks\Logging\Src\DatabaseTraceListener\Scripts . You can use the createloggingdb.cmd file