The given key was not present in the dictionary

Jan 13, 2010 at 10:49 PM

This is the error I got:


The given key was not present in the dictionary.

<!-- body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } -->

Server Error in '/' Application.

The given key was not present in the dictionary.

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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Source Error:

Line 36: 		string strPortalConfigXML = eServiceConfigSettings[0].Properties["msa_configurationxml"].ToString();
Line 37: 		_cache.Insert("msa.eService.PortalConfigXML", strPortalConfigXML);
Line 38: 		Microsoft.Crm.Sdk.Lookup luDefaultSubjectGuid = (Microsoft.Crm.Sdk.Lookup)eServiceConfigSettings[0].Properties["msa_defaultsubjectid"];
Line 39: 		Guid defaultSubjectGuid = luDefaultSubjectGuid.Value;
Line 40: 		_cache.Insert("msa.eService.CaseDefaultSubject", defaultSubjectGuid);

Source File: c:\Microsoft Dynamics CRM 4.0\Accelerators\eService\V1.1\ESERVICE_RTW_R1.1\Installation\Sample Portal\Global.asax    Line: 38

Stack Trace:

[KeyNotFoundException: The given key was not present in the dictionary.]
   System.ThrowHelper.ThrowKeyNotFoundException() +36
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +10374485
   Microsoft.Crm.Sdk.PropertyCollection.get_Item(String propertyName) +16
   ASP.global_asax.Cache_eService_FullConfig() in c:\Microsoft Dynamics CRM 4.0\Accelerators\eService\V1.1\ESERVICE_RTW_R1.1\Installation\Sample Portal\Global.asax:38
   ASP.global_asax.Application_Start() in c:\Microsoft Dynamics CRM 4.0\Accelerators\eService\V1.1\ESERVICE_RTW_R1.1\Installation\Sample Portal\Global.asax:12

[HttpException (0x80004005): The given key was not present in the dictionary.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +4170353
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +205
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +336
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382

[HttpException (0x80004005): The given key was not present in the dictionary.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11297830
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4336948
Jan 14, 2010 at 4:35 PM

Hello everybody and eService development team:

 I am try to put eService on the CRM and set up the sample portal web site for our company.

I use testing environment for now.

However, the 26 page installation guide and the video are so uncompleted, so unclear, there are lots of configuration I have to "guess" and run into error then fix the errors.

The 26 page installation guide are definitely not for regular users, even the experienced programmer still got confused, frustrated,

I experience over 10 times failure, run into all the errors that the other people already had, in the following post discussed one year before.

I myself shoot those several errors, like playing a video game,  I did not win so far, because I run into this last error, could not figure it out,

I did try those people's method to fix it, but no luck.

I believe those people still haven't "guess" the right way to do it, so am I. 


1)  In the installation guide, the still unclear thing is,  " web service portal web user" did not explain how to create that web user, and where and how to configure it to work,

I kind of guess it out by CRM->setting -> user -> create a user role called "web user" then give the role the ability for web service access and eservice customization access,

then assign the role to some users,  I might be not quite correct,

For this product developer, can you guys explain more clear how that web users configured?


2) In the installation guide, the missing part is, how and where to set the credential on the client side web.config file,

   After run into those errors several time, I figure it out, where and how ,

   in the client side web.config file,

   You must figure out how to set up the web service credential as below, other wise you will run into some weared errors,


These settings are for the portal pages and controls to call the
crm web services. If you are setting this up on the stndard vpc image then
set the domain value to "." if you are having problems.
<add key="msa.CRMOrganizationName" value="hoogwCRM"/>
<add key="msa.CRMServerUrl" value="http://localhost:5555/MSCRMServices"/>
<add key="msa.CRMWebServicesUser" value="Administrator"/>
<add key="msa.CRMWebServicesPassword" value="you pass"/>
<add key="msa.CRMDomain" value="hoogw"/>
<!-- add key="CrmSdk.CrmServiceWsdl" value="http://joe:5555/MSCrmServices/2007/CrmService.asmx"/ -->
<!-- add key="MetadataSdk.MetadataService" value="http://localhost:5555/MSCRMServices/2007/MetadataService.asmx"/ -->



this is the thing the installation guide did not mention, instead it mention it only one word, like "set up web config file to fit your environment!"


Some people say, because of missing the SMTP mail server name and pass, will cause these error,

I don't know where to set up the SMTP mail server and name pass, etc, 

also who know is it true?

Could the developer team make the installation guide better and fix all those errors on the next release version????

Current version is 1.1,

And who can helps me out, please.