Server Error in '/' Application.
--------------------------------------------------------------------------------
Item has already been added. Key in dictionary: 'RegEx' Key being
added: 'RegEx'
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Item has already been
added. Key in dictionary: 'RegEx' Key being added: 'RegEx'
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace
below.
Stack Trace:
[ArgumentException: Item has already been added. Key in dictionary:
'RegEx' Key being added: 'RegEx']
System.Collections.Hashtable.Insert(Object key, Object nvalue,
Boolean add) +2834883
System.Collections.Hashtable.Add(Object key, Object value) +11
System.Configuration.Provider.ProviderCollection.Add(ProviderBase
provider) +75
UrlRewritingNet.Configuration.Provider.UrlRewritingProviderCollection.Add(ProviderBase
provider) +40
UrlRewritingNet.Web.UrlRewriting.Initialize() +181
UrlRewritingNet.Web.UrlRewriting.CreateRewriteRule(String
providerName) +13
UrlRewritingNet.Web.UrlRewriteModule.Init(HttpApplication context)
+217
System.Web.HttpApplication.InitModules() +267
System.Web.HttpApplication.InitInternal(HttpContext context,
HttpApplicationState state, MethodInfo[] handlers) +1251
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext
context) +243
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
context) +106
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
+214
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration.Provider;
namespace UrlRewritingNet.Configuration.Provider
{
public class UrlRewritingProviderCollection : ProviderCollection
{
private object lockObject = new object();
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
if (!(provider is UrlRewritingProvider))
{
string msg = string.Format("Provider must implement type {0}", typeof(UrlRewritingProvider).ToString());
throw new ArgumentException(msg, "provider");
}
lock (lockObject)
{
if (base[provider.Name] == null)
{
base.Add(provider);
}
}
}
public void CopyTo(UrlRewritingProvider[] providers, int index)
{
lock (lockObject)
{
base.CopyTo(providers, index);
}
}
new public UrlRewritingProvider this[string name]
{
get
{
return (UrlRewritingProvider)base[name];
}
}
}
}
-----Ursprüngliche Nachricht-----
Von: UrlRewr...@googlegroups.com [mailto:UrlRewr...@googlegroups.com] Im Auftrag von MorningZ
Gesendet: Montag, 5. März 2007 16:05
An: UrlRewritingNet
Betreff: [UrlRewritingNet] Any solid help for "Item has already been added. Key in dictionary: 'RegEx' Key being added: 'RegEx'"
Thanks
-----Ursprüngliche Nachricht-----
Von: UrlRewr...@googlegroups.com [mailto:UrlRewr...@googlegroups.com] Im Auftrag von Glyn
Gesendet: Freitag, 4. Mai 2007 10:55
An: UrlRewritingNet
Betreff: [UrlRewritingNet] Re: AW: [UrlRewritingNet] Any solid help for "Item has already been added. Key in dictionary: 'RegEx' Key being added: 'RegEx'"
On May 4, 9:50 pm, "Albert Weinert" <albert.wein...@awn-design.biz>
wrote:
> Yes, something like that.
>
> -----Ursprüngliche Nachricht-----
> Von: UrlRewr...@googlegroups.com [mailto:UrlRewr...@googlegroups.com] Im Auftrag von Glyn
> Gesendet: Freitag, 4. Mai 2007 10:55
> An: UrlRewritingNet
> Betreff: [UrlRewritingNet] Re: AW: [UrlRewritingNet] Any solid help for "Itemhasalreadybeenadded.Keyindictionary: 'RegEx'Keybeingadded: 'RegEx'"