enterprise-library

Enterprise Library - validate blank spaces " "

Hi, how do I deny blank spaces (" ") using Enterprise Library validation? [StringLengthValidator(1, RangeBoundaryType.Exclusive, 100, RangeBoundaryType.Inclusive)] allows them. Thanks. ...

Where does Microsoft.Practices.ServiceLocation come from?

Does any one know where Microsoft.Practices.ServiceLocation comes from? This is a namespace and a dll used in MS EnterpriseLibrary. Admittedly it's a very simple dll with just a handful of classes (using reflector), but I can't find published source code for it. It's not in Enterprise Library project and not in Unity project. So does so...

Creating a typed configuration class using MS Enterprise Library 5.0

I have a ASP.Net 4.0 web application for which I need to create typed configuration class. What I mean is as follows: class SettingsClass { int count; string name; decimal amount; } Should map to the configuration file as: <MyAppSettings> <xmlSerializationSection type="..."> <SettingsClass> <count>...

RijndaelEncryption with Java then Decryption with C# and EnterpriseLibrary 4.1

I believe when the EnterpriseLibrary tries to decrypt a RijndaelManaged encrypted string it expects the Initialization Vector to be prepended to the encrypted text. Currently with the code below. I can decrypt the message with out an exception, but I am getting weird characters like: �猀漀椀搀㴀眀最爀甀戀攀㄀☀甀琀挀㴀㈀ ㄀ ⴀ㄀ ⴀ㈀㄀吀㄀㌀㨀㔀㈀㨀㄀㌀ What do...

Typed configuration data in a separate config file in ASP.Net 4.0?

I have an asp.net 4.0 web application. I need extensive configuration data for this web application, that is strongly typed and the structure of this configuration data is going to be fairly complex (cannot do with key-value pairs). In the past I remember having done this in .Net 2.0 but cannot figure out how I will do it in .Net 4.0. T...

Activation error occured while trying to get instance of type Database, key "" <-- blank

I'm trying out the Enterprise Library 5.0 and was doing some unit-tests on my BL, do I need to have a app.config on the DL or on the Test project? note: I already have the configuration settings on my web.config on my web project. how I use the DAAB: private static Database db = DatabaseFactory.CreateDatabase(); db.ExecuteNonQuery("s...

Adding a field to database log using Enterprise Library

I'm logging exceptions to a database using a DatabaseTraceListener from Enterprise Library (code is pretty much as described here). Now I want to create another field in the database table and log some custom information (user id) there. From what I understand I have to subclass CustomTraceListener and LogEntry, but I can't find any inf...

using the enterprise library 5 to encrypt my connection strings and appSetting

Hi there, I have a wpf4 that I am referenced the enterprise library 5. I want to encrypt my connectionstrings and appsettings but I am not 100% sure how to do this. Can anyone point me in the right direction for encrypting using the entlib5. There seems only to be useful information out there for the version 3.1 & 4. Any help would be ...

AES Encryption Key in .NET, Enterprise Library Encryption Block

Hello, When using AES encryption with Enterprise Library Encryption Block, it generates an AES encryption key for my machine. If we have a team of 12 developers, I assume each has to generate their own key (machine specific)? I tried giving someone else my key, but it errored. Or should that work? If it shouldn't work, how to genera...

Ent Lib Configuration

I would like to start a discussion about the ent lib configuration. The issue that I have is that the configuration is over engineered and hard to maintain at least for the staff that supports our system. What do you think? I would like to see more and better programmatic support of ent lib configuration. ...