The type attribute does not exist on the element name

Topics: Enterprise Library Core, Exception Handling Application Block, Logging Application Block, Validation Application Block
Jun 17, 2008 at 9:52 PM
Hello,

I just upgraded a VS 2005 app to VS 2008, using the Enterprise Library 4.0 

I have worked through all the issues but this one: I am getting the following error:

Type : System.Configuration.ConfigurationErrorsException, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Message : The type attribute does not exist on the element name. (C:\Projects\blah\bin\blah.vshost.exe.Config line 175) Source : Microsoft.Practices.EnterpriseLibrary.Common
Help link :
BareMessage : The type attribute does not exist on the element name.
Filename : C:\Projects\blah\bin\blah.vshost.exe.Config
Line : 175

Is there something new in 4.0 of the enterprise library I need to add to the app.config?

Thanks...

Scott

Jun 18, 2008 at 11:55 AM

Hi Scott,

Can you share a snippet of your configuration file, preferably one that includes the line 175 that has caused the error, and a stack trace?

The one change that might be causing this is the new ability to provide new CacheManager implementations, as this forces the cache manager elements to include a type attribute to tell which specific implementation is required. However without additional information it's hard to tell if this is the cause.

Fernado

 


sqlscott wrote:
Hello,

I just upgraded a VS 2005 app to VS 2008, using the Enterprise Library 4.0 

I have worked through all the issues but this one: I am getting the following error:

Type : System.Configuration.ConfigurationErrorsException, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Message : The type attribute does not exist on the element name. (C:\Projects\blah\bin\blah.vshost.exe.Config line 175) Source : Microsoft.Practices.EnterpriseLibrary.Common
Help link :
BareMessage : The type attribute does not exist on the element name.
Filename : C:\Projects\blah\bin\blah.vshost.exe.Config
Line : 175

Is there something new in 4.0 of the enterprise library I need to add to the app.config?

Thanks...

Scott




Jun 18, 2008 at 2:20 PM
Hi Fernado,

Thank you for your response. It is greatly appreciated. I have included the stack trace and config file section below:

--Stack Trace:

Stack Trace :    at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, ILifetimeContainer lifetimeContainer, String id, IConfigurationSource configurationSource)

   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.LocatorNameTypeFactoryBase`1.Create(String name)

   at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager(String cacheManagerName)

   at

--Config file:

  <cachingConfiguration defaultCacheManager="ListItems">
    <cacheManagers>
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="CustomFields" />  THIS IS LINE 175
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="HHRG" />
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="ListItems" />
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="Permissions" />
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="Profile" />
    </cacheManagers>
    <backingStores>
      <add encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=3.0.0.0, Culture=neutral, PublicKeyToken=919c7b45f5f75ea3"
        name="Null Storage" />
    </backingStores>
  </cachingConfiguration>

Again, thank you for your help. Let me know if you need anything else.

Scott





fsimonazzi wrote:

Hi Scott,

Can you share a snippet of your configuration file, preferably one that includes the line 175 that has caused the error, and a stack trace?

The one change that might be causing this is the new ability to provide new CacheManager implementations, as this forces the cache manager elements to include a type attribute to tell which specific implementation is required. However without additional information it's hard to tell if this is the cause.

Fernado

 


sqlscott wrote:
Hello,

I just upgraded a VS 2005 app to VS 2008, using the Enterprise Library 4.0 

I have worked through all the issues but this one: I am getting the following error:

Type : System.Configuration.ConfigurationErrorsException, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Message : The type attribute does not exist on the element name. (C:\Projects\blah\bin\blah.vshost.exe.Config line 175) Source : Microsoft.Practices.EnterpriseLibrary.Common
Help link :
BareMessage : The type attribute does not exist on the element name.
Filename : C:\Projects\blah\bin\blah.vshost.exe.Config
Line : 175

Is there something new in 4.0 of the enterprise library I need to add to the app.config?

Thanks...

Scott







Jun 18, 2008 at 2:28 PM
Scott,

This confirms that it was the cache manager entries that need updating. Add a type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching" attribute to all the <add/> elements in the <cacheManagers/> collection.

Fernando



sqlscott wrote:
Hi Fernado,

Thank you for your response. It is greatly appreciated. I have included the stack trace and config file section below:

--Stack Trace:

Stack Trace :    at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, ILifetimeContainer lifetimeContainer, String id, IConfigurationSource configurationSource)

   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.LocatorNameTypeFactoryBase`1.Create(String name)

   at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager(String cacheManagerName)

   at

--Config file:

  <cachingConfiguration defaultCacheManager="ListItems">
    <cacheManagers>
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="CustomFields" />  THIS IS LINE 175
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="HHRG" />
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="ListItems" />
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="Permissions" />
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="Profile" />
    </cacheManagers>
    <backingStores>
      <add encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=3.0.0.0, Culture=neutral, PublicKeyToken=919c7b45f5f75ea3"
        name="Null Storage" />
    </backingStores>
  </cachingConfiguration>

Again, thank you for your help. Let me know if you need anything else.

Scott





fsimonazzi wrote:

Hi Scott,

Can you share a snippet of your configuration file, preferably one that includes the line 175 that has caused the error, and a stack trace?

The one change that might be causing this is the new ability to provide new CacheManager implementations, as this forces the cache manager elements to include a type attribute to tell which specific implementation is required. However without additional information it's hard to tell if this is the cause.

Fernado

 


sqlscott wrote:
Hello,

I just upgraded a VS 2005 app to VS 2008, using the Enterprise Library 4.0 

I have worked through all the issues but this one: I am getting the following error:

Type : System.Configuration.ConfigurationErrorsException, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Message : The type attribute does not exist on the element name. (C:\Projects\blah\bin\blah.vshost.exe.Config line 175) Source : Microsoft.Practices.EnterpriseLibrary.Common
Help link :
BareMessage : The type attribute does not exist on the element name.
Filename : C:\Projects\blah\bin\blah.vshost.exe.Config
Line : 175

Is there something new in 4.0 of the enterprise library I need to add to the app.config?

Thanks...

Scott










Jun 18, 2008 at 6:09 PM
Hi Fernando,

That worked beautifully. Thank you very much.

Scott

fsimonazzi wrote:
Scott,

This confirms that it was the cache manager entries that need updating. Add a type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching" attribute to all the <add/> elements in the <cacheManagers/> collection.

Fernando



sqlscott wrote:
Hi Fernado,

Thank you for your response. It is greatly appreciated. I have included the stack trace and config file section below:

--Stack Trace:

Stack Trace :    at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, ILifetimeContainer lifetimeContainer, String id, IConfigurationSource configurationSource)

   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.LocatorNameTypeFactoryBase`1.Create(String name)

   at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager(String cacheManagerName)

   at

--Config file:

  <cachingConfiguration defaultCacheManager="ListItems">
    <cacheManagers>
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="CustomFields" />  THIS IS LINE 175
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="HHRG" />
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="ListItems" />
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="Permissions" />
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
        name="Profile" />
    </cacheManagers>
    <backingStores>
      <add encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=3.0.0.0, Culture=neutral, PublicKeyToken=919c7b45f5f75ea3"
        name="Null Storage" />
    </backingStores>
  </cachingConfiguration>

Again, thank you for your help. Let me know if you need anything else.

Scott





fsimonazzi wrote:

Hi Scott,

Can you share a snippet of your configuration file, preferably one that includes the line 175 that has caused the error, and a stack trace?

The one change that might be causing this is the new ability to provide new CacheManager implementations, as this forces the cache manager elements to include a type attribute to tell which specific implementation is required. However without additional information it's hard to tell if this is the cause.

Fernado

 


sqlscott wrote:
Hello,

I just upgraded a VS 2005 app to VS 2008, using the Enterprise Library 4.0 

I have worked through all the issues but this one: I am getting the following error:

Type : System.Configuration.ConfigurationErrorsException, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Message : The type attribute does not exist on the element name. (C:\Projects\blah\bin\blah.vshost.exe.Config line 175) Source : Microsoft.Practices.EnterpriseLibrary.Common
Help link :
BareMessage : The type attribute does not exist on the element name.
Filename : C:\Projects\blah\bin\blah.vshost.exe.Config
Line : 175

Is there something new in 4.0 of the enterprise library I need to add to the app.config?

Thanks...

Scott