eService - Object Reference not set

Dec 19, 2008 at 7:35 PM
I have installed eService and can get to the "home" page. However, if I go to the "Customer Service" or "Login" page, if get an Object Reference not Set error.

Anybody have any ideas?
Also, in the workflow called "MSA-eService: eService Portal Account Sign-up", the step "Encrypt the Contact Record Id for the Email" contains an invalid reference, but using Set Properties brings up a blank screen as if an entity is missing.
I have published all customizations (which blew away our previous customizations to Contacts and Incidents).


Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 14: 	{
Line 15: 		_service = CrmServiceManager.GetCrmService();
Line 16: Guid WebUserId = (Guid)Cache["msa.eService.CRMWSUserId"];Line 17: 		PermissionsUtility.ValidateCrmPermissions(_service, WebUserId, "contact", "account", "incident", "activity");
Line 18: 	}

Source File: c:\Inetpub\wwwroot\CRM eService Portal\Controls\LoginControl.ascx.cs    Line: 16

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Controls_LoginControl.OnInit(EventArgs e) in c:\Inetpub\wwwroot\CRM eService Portal\Controls\LoginControl.ascx.cs:16
   System.Web.UI.Control.InitRecursive(Control namingContainer) +456
   System.Web.UI.Control.InitRecursive(Control namingContainer) +279
   System.Web.UI.Control.InitRecursive(Control namingContainer) +279
   System.Web.UI.Control.InitRecursive(Control namingContainer) +279
   System.Web.UI.Control.InitRecursive(Control namingContainer) +279
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1538


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
<!-- [NullReferenceException]: Object reference not set to an instance of an object. at Controls_LoginControl.OnInit(EventArgs e) in c:\Inetpub\wwwroot\CRM eService Portal\Controls\LoginControl.ascx.cs:line 16 at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.customerlogin_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\Temporary ASP.NET Files\root\6d0bc485\16ee8bbf\App_Web_bffnurli.16.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->
Dec 24, 2008 at 12:44 PM
You need to perform an IISRESET (start->run->cmd->OK->iisreset->enter) reopen the page and it will start to work.
Maybe it's better to instead of storing the id in the Cache to store it using ViewState.
Jan 14, 2009 at 2:52 AM
Hi, I get the same error even after performing an iisreset.  did you manage to resolve this issue successfully?  In fact, after the iisreset I get the following error initially and then the error in the above post.

Any help would be greatly appreciated.

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:\Inetpub\wwwroot\eService Portal\Global.asax    Line: 38 

Stack Trace: 


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.ThrowHelper.ThrowKeyNotFoundException() +28
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +2668548
   Microsoft.Crm.Sdk.PropertyCollection.get_Item(String propertyName) +11
   ASP.global_asax.Cache_eService_FullConfig() in c:\Inetpub\wwwroot\eService Portal\Global.asax:38
   ASP.global_asax.Application_Start() in c:\Inetpub\wwwroot\eService Portal\Global.asax:12

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 
Jan 17, 2009 at 10:49 PM
Hi,

I had this problem.
Turns out the authentication details were wrong in the sample website's web.config file.

For example, to run in the CRM 4 virtual machine set them to the following:

<appSettings>
        <!--
        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="MicrosoftCRM"/>
        <add key="msa.CRMServerUrl" value="http://moss:5555/MSCRMServices"/>
        <add key="msa.CRMWebServicesUser" value="administrator"/>
        <add key="msa.CRMWebServicesPassword" value="pass@word1"/>
        <add key="msa.CRMDomain" value="moss"/>
</appSettings>
Jan 19, 2009 at 12:00 AM
Hi,

Thank you for your reply.  I tried changing the settings to the ones you specified and still no luck.  

This is the current problem:
  • Upon opening the Sample Portal Website (default.aspx) for the first time after an iisreset, I get the "The given key was not present in the dictionary. " error.
  • After refreshing the page, the error disappears and does not come back.
  • After I click on "login" or the "Customer Service" link, it gives me the "Object Reference not set to an instance of an object" error as seen in the first post of this thread.
I am really stuck on this.  I thought I might've downloaded an old version of the source so I re-downloaded and re-deployed the module again with the same results.  I even followed the instructions on the video that comes with this and still no luck.

I have all the other Accelerators installed on this same MSCRM VPC Image.  Could one of those be the cause?

Appreciate any help given.

Cheers,

Matt
Jan 19, 2009 at 9:09 AM
Hi,

I have the same problem. Trying to solve it but without success

Regards

Radek 
Jan 21, 2009 at 10:37 PM
Hi,

I finally figured out how to fix the problem.  Turns out all I needed to do was to add details for the SMTP username, password and server in the eServiceCongifuration record.

Once I did that the errors disappeared!


Mar 12, 2009 at 5:33 PM
Hi,
I have installed this on an image (but not MS image) and am having very similar issues. After an IIS reset, I can login and log a case, but after around 1minute of usage, I get the error stated in the original post.
I have added the SMTP uname etc.
Does anyone have any ideas on how to fix this?
Thanks
Henry
Mar 13, 2009 at 10:08 AM
The problem was that my image had the wrong rollup 2 installed (the one that was recalled). We simply removed that rollup and re-installed the latest rollup 2 and it worked.
Mar 15, 2009 at 1:54 AM
Edited Mar 18, 2009 at 10:18 PM
Hi All,

has anyone actually found a solution to this problem?
Neither the above mentioned smtp setting, nor the domain setting does anything on my installation.  Besides - not to step on anyone's toes here - but putting in some arbitrary value as a
domain value or filling in (essentially) unrelated smtp fields doesn't really sound like a solution anyway.


Obviously for some reason the global.asax code is unable to retrieve the value for the crmuser account. I'd love to help troubleshoot the issue, but it'd be cool if someone from the dev team
could point me in the right direction first.
I'd also be happy to upload my vhd if that would help?


In addition, I'm also getting a very anoying 401 everytime the web application starts (just once, on startup) - anyone seen that before?

disregard post pls - found it, my bad.
Sorry 'bout that (open mouth .. insert foot :(  )

Rgds - Marcus.

Mar 18, 2009 at 11:31 AM
Can someone fill me in please?  I've having the same problem as amosmax only I haven't stumbled upon the solution like he apparently did!

The setup I have is a 2003 server with CRM and SQL installed, and a separate Web 2008 virtual server to run the frontend.  The servers are in different domains, and have only communication on ports 80 and 1433 between them.  The problem I am having is that 401 when first starting the application, and the "object reference not set..." error from the start of the thread after that.  I've tried populating the SMTP fields in the config within CRM and set the domain to be a dozen different things in the web.config file, but I haven't had any success.  I'm using the latest Rollup 3 for CRM at the moment.  I even checked the CRM database to ensure the Web User field contained what looked like a valid GUID.

Anything else I should be looking into?
Mar 18, 2009 at 4:51 PM
You really want me to embarras myself further, don't you ?  ;-)

Oh well, here it goes, in my case the 401 on Application startup was due to a typo in the crm org name in web.config
(global.asax code get's executed on app start - crm responds with 401 since "wrong" org name doesn't exist). Subsequently the
fields don't get set either and you get the Null Reference.
So if you're getting a 401 on app start, the web-app is unable to connect to crm using whatever you have in web.config.

Check manually if you can connect from the webserver using the info. Perhaps in your case it's something as trivial as
with me (Name Resolution? Blocked ports ? Typos? Permissions?)

HTH - Marcus.
May 7, 2009 at 3:03 PM
If you cannot resolve this issue try running:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

Grzegorz
May 9, 2009 at 6:09 PM

If you add a second record to the eService Configuration entity it will also cause you to get the "given key was not present" error when trying to access the website.  Make sure you only have a single record in that entity.  This is a little confusing b/c unlike other entities, this one is intended to have only a single record init.

 

Jul 3, 2009 at 6:34 PM

HI There,

 

I'm also getting the object reference error but only on the live server. It works fine on my dev server.  It used to load properly  up until a month ago then my customers started to complain that it was broken.  I noticed global.asax wasn't deployed to production so i copied that over.

With that change, it loaded fine only once then it went back to the object reference error.  It seems any change i make, it will work shortly then stop working?

Any ideas?

Thanks,

Linna

Jul 6, 2009 at 7:44 PM

Hi There,

Some more details...my web server is now on Rollup 4.  I believe the version i installed for eService was R1 and it was back in January.   That was the last time I touched it and it was working was in January.

Do I need to upgrade to R1.1?  The release notes don't show any important updates. 

It is working for about 1 minute, then not able to get any variables referencing cache.  If i hard-code cache variables, it is able to get past that line of code but I really don't want to go with this approach.

Any assistance would be appreciated.

Thanks,

Linna

Jul 17, 2009 at 6:04 PM

We are having similar issues. all the configuration in we.config and the eService config is correct, and we stillg et the error. If i change the information in web.config i get a 401 error (which makes sense using the wrong information), and some other variety of error if I change the SMTP setting in the eservice config.

Has there been a resolution found?

Jul 29, 2009 at 8:27 PM

Hello,

I posted this issue on the microsoft partner foruums,a nd thought i'd share the response. It can be found here:

http://social.microsoft.com/Forums/en-US/partnerdynamicscrm/thread/505edf65-181c-4311-85ec-78502e2f2e3a

Hi Gregg,

eService is out of scope for support.  But I was able to find a similar case that may help you resolve the issue.    Here are the steps they took to resolve the erro that you are having.

1 . The portals uses global variables in global.asax. A cache object is handled but 
for some reasons it is a null point. This needs to be modified in 
LoginControl.ascx.cs in the following folder

C:\Program Files\Microsoft Eservice folder\eservice\Controls. The highlighted part 
below was having an initial entry as (Guid)Cache[“msa.eservice.CRMWSUserId”].

2 . This line needs to be replaced with Guid WebUserId = new Guid (“guid - This 
should be queried from SQL Server Management studio”);

Query to be run against Organization_MSCRM database is as below.

Select systemuserid, firstname from Systemuserbase

This will give you a list of users with their system user ids. Look for the user 
that has the first name as CRM Web User and its corresponding Systemuserid Value. 
This is the user id that gets created when you install Eservice Accelerator. This 
Guid shown in the System user id for CRM Web user needs to be used in point 2 above 
as shown in the highlighted part below.

Did an IIS reset and tried to access the URL.

If you continue to have the issue, I would recommend that you open a case with CRM Support or post your question in the codeplex  http://www.codeplex.com/crmaccelerators/Release/ProjectReleases.aspx?ReleaseId=19956
I'll take amoment to appreciate the irony of posting his suggestion here, as part of his suggestion was to GO here. 
Anyway, when i perform that fix, i still get the error upon the first load of the webpage, and now a different error comes up when i click customer service or login, and it reads as follows:
Server Error in '/' Application.
--------------------------------------------------------------------------------

The file '/ProPcCRM/2007/CrmService.asmx' does not exist. 
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.Web.Services.Protocols.SoapException: The file '/ProPcCRM/2007/CrmService.asmx' does not exist.

Source Error: 


Line 65: 		retrieveRequest.ReturnDynamicEntities = true;
Line 66: 
Line 67: 		RetrieveMultipleResponse retrieveResponse = (RetrieveMultipleResponse)service.Execute(retrieveRequest);
Line 68: 
Line 69: 		// The next calculation assumes that there are 3 permissions to check: Read, Write and AppendTo
 

Source File: c:\Program Files\Microsoft Dynamics CRM Customer Portal\App_Code\eService\PermissionsUtility.cs    Line: 67 

Stack Trace: 


[SoapException: The file '/ProPcCRM/2007/CrmService.asmx' does not exist.]
   System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431766
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
   Microsoft.Crm.SdkTypeProxy.CrmService.Execute(Request Request) +50
   PermissionsUtility.ValidateCrmPermissions(CrmService service, Guid userId, String[] entitiesToCheck) in c:\Program Files\Microsoft Dynamics CRM Customer Portal\App_Code\eService\PermissionsUtility.cs:67
   Controls_LoginControl.OnInit(EventArgs e) in c:\Program Files\Microsoft Dynamics CRM Customer Portal\Controls\LoginControl.ascx.cs:18
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016 
Any thoughts would be apprecited. I'm told that the eService portal is just looking in th e wrong place for some stuff, and it shoudl be easy to fix... but it's baffling me. '
- Gregg
Aug 24, 2009 at 8:11 AM

Hi

I have looked at this in detail and managed to get the sample portal to work, after encountering all the issues posted above.  (environment is NOT the VM but a real set of servers) Basically,

1. ["msa.eService.CRMWSUserId"]; is referenced in the logincontrol cs file, but is NOT in the web.config.  Change the key in the web.config to this, save and try again.  Note, you will get some other pages then throwing the same error, just change the associated CS files as well.

2. Make sure you are pointing at the CORRECT crmservice file, it is located under MSCRMService off your root folder, not in the root directly.  To reference this you put it in the URL section of the webconfig file

3. finally, make sure your portal is actually accessing the global.asx file.

only problem i now have is after a while the cache emptys and does not refresh (giving back the object not found), so to speed it up I restart IIS, which is fine in a test environment but will not be worth much in live!  Anyone get this far and overcome the issue?

Aug 24, 2009 at 5:12 PM

Hello,

We have since had a consulatant come in to resolve our issues, as well as perform additional customizations. Unfortuately, I am unsure what he did to accomplish everything. 

Best Regards,

 

- Gregg

Aug 24, 2009 at 5:19 PM

I don’t know why but when we rebooted the server, it fixed it. I made one change and that was to hard code the web user id on the login page rather than getting it from the cache set in global.asax

Linna

Sep 16, 2009 at 5:08 AM
Edited Sep 16, 2009 at 7:00 AM

Any progress on this error?

  • I have tried using the CRM Web User Guid as rkorman suggested 
  • I have tried changing SMTP details in the eService Configuration file as HenryS suggested
  • My web.config details (username, password, URL etc) are correct!
  • It's a live environment so reboot is not an option at this moment!

Findings:

  • Looking at the video installation guide, there are 7 workflows, I have 6 (like in the document!), missing one is MSA eService: NewServiceScheduled via.....
  • When I remove these lines (below) from the web.config I can get the login page displaying
Line 14: 	{
Line 15: 		_service = CrmServiceManager.GetCrmService();
Line 16: 		Guid WebUserId = (Guid)Cache["msa.eService.CRMWSUserId"];
Line 17: 		PermissionsUtility.ValidateCrmPermissions(_service, WebUserId, "contact", "account", "incident", "activity");
Line 18: 	}

 but when I try to login (using a wrong login)  it throws me different errors (I can provide the errors if required).

My guess is that the controls are not registered or something but I don't know how to fix it!

Any help would be appreciated!

Andy

Sep 16, 2009 at 4:29 PM

Hi Andy,

Have you tried hard-coding the userid.  Mine is hard coded on line 16 above as follows:

WebUserId = new Guid("858e2473-f555-da11-be9c-000c297b03d5");

 

Thanks,

Linna

Sep 17, 2009 at 3:02 AM
Edited Sep 17, 2009 at 3:57 AM

Yes Linna,

No luck!

Oct 15, 2009 at 9:04 AM

Hello,

I have the same problem If I try to login the customer area.

Can somebody help me please !!!!!!!!!!!!!!!!!!!!!

Oct 18, 2009 at 11:07 AM

Hello Gyus,

 

I got the same problem and it is fixed by just deleteing the temp folder for the web site under the ASP.NET Temporary file in the following Path :

 

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

 

The isue is the application is caching the XML configuration file property in a cache object while the request is processed in the Global.ascx file in the Application_Start Event.

However, for some reason this event is not firing , maybe because of the .NET Framework confusion from the cached files in the Temp Directory mentioned above.

And then the application crach while attempting to access the cache object which is null...

 

Hope that help :)

 

Thanks,

Regards

 

Abdallah

 

Oct 23, 2009 at 1:30 PM

Hello Abdallah,

I'Ve tried your way but I still have the same error.
Is there any other way to fix this problem?

PLEASE HELP.........

mrudaw

Oct 23, 2009 at 5:30 PM

Hello Mrudaw,

 

Actually i solved the problem using the mentioned method in my response above.

This problem happen to me many times and every time i delete the Temp folder and make an IIS reset it work back.

 

Please also add a breackPoint on the Global.ascx OnApplicationStart even and check if it fire correctelly or not, if it fire it will fill the cache otherwise you will always get this error.

 

Please try again and let me know if it worked.

Good Luck

 

Abdallah.

Oct 26, 2009 at 12:59 PM

Hello Abdalla,

thanks for your answer.

I can actually add a breakpoint to Global.ascx but how can I trace it? there is now .sln to load the full project in Visual Studio.

mrudaw

Oct 26, 2009 at 1:14 PM

Hi Mrudaw,

 

First i am not sure what do you mean by "there is now .sln to load the full project in Visual Studio".

If you are able to add a breakpoint on the Global.ASCX you should follow the debugger until it reach the code which retrieve the metadata and fill it inside the cache.

 

Please clarify to me what do you mean exactelly.

 

Thanks,

Reagrds

 

Abdallah

Oct 26, 2009 at 1:26 PM

Hello Abdallah,

sorry for my mistake but I mean (...there is no .sln to load the full project...).

I can just open the global.ascx with visual studio but only this file (standalone).

If you want to debug you need a project. I cannot debug a standalone file?!

Thanks,

mrudaw

Oct 26, 2009 at 1:44 PM

Dear Mrudaw,

 

I am not sure what level of experience do you have, asically you can go to Visual Studio and choose Open an existing web site, and then point it to your web site files folder.

 

Then you will be able to open the web site and debug it.

Good Luck.

 

Abdallah

Oct 26, 2009 at 3:20 PM

Hi Abdallah,

thanks for your tip :-)

when I try to debug Global.ascx, the event will be fired but I get an error (HTTP-Status 404: Not Found.) at Line 113 :

etrieveConfiguration()

Line 111: try
Line 112: {
Line 113: Microsoft.Crm.SdkTypeProxy.RetrieveMultipleResponse retrieveResponse = (Microsoft.Crm.SdkTypeProxy.RetrieveMultipleResponse)service.Execute(retrieveRequest);
Line 114: foreach (Microsoft.Crm.Sdk.BusinessEntity entity in retrieveResponse.BusinessEntityCollection.BusinessEntities)
Line 115: {

if I make a refresh the error doesn't apper and the portal will be loaded but without loading Global.ascx.  And if I try to Login on the portal I get the original error message:

Line 14: 	{
Line 15: 		_service = CrmServiceManager.GetCrmService();
Line 16: 		Guid WebUserId = (Guid)Cache["msa.eService.CRMWSUserId"];
Line 17: 		PermissionsUtility.ValidateCrmPermissions(_service, WebUserId, "contact", "account", "incident", "activity");
Line 18: 	}
Thanks,
mrudaw
Oct 26, 2009 at 3:55 PM

Hi Mrudaw,

 

I think you did not update the Web.config AppSettings section with the approriate values.

 

Please open the Web.Config of your web site and edit the following properities with your own value :

 

 

String organizationName = ConfigurationManager.AppSettings["msa.CRMOrganizationName"];
String serverUrl = ConfigurationManager.AppSettings["msa.CRMServerUrl"];
String userName = ConfigurationManager.AppSettings["msa.CRMWebServicesUser"];
String password = ConfigurationManager.AppSettings["msa.CRMWebServicesPassword"];
String domain = ConfigurationManager.AppSettings["msa.CRMDomain"];

"msa.CRMOrganizationName" 

"msa.CRMServerUrl"

"msa.CRMWebServicesUser"

"msa.CRMWebServicesPassword"

"msa.CRMDomain"

You get this 401 error probably because the GetCRMService Function is trying to connect to the right Server and you are not providing the right info in the web.config

 

Hope that it work @ the end :)

BTW, all this instructuon is already existed in the installation guide, i think it is better to read it to get a better idea how things is working, otherwise you will stuck there to the end...

 

Thanks,

Regard

 

Abdallah

 

Oct 27, 2009 at 2:14 PM

Hello Abdallah,

thank you for your support.

Now it works. It was just a wrong paramater in my web.config

bye

mrudaw

Oct 27, 2009 at 2:25 PM

Hi Mrudaw,

 

Glad to hear that it work finally, good luck in the rest :).

 

Regards,

Abdallah

Dec 15, 2009 at 6:32 PM

Hello All,

I'm also having this issue in the order below.  I tried everything you guys suggested except the global edit above as I did not find the lines mentioned.  I also called MS and they said this is not supported and they send me here, which I already know about.

1-  After an IIS reset and when I browse to the portal site I see the following error

   Server error in '/' Application

   The given key was not present in the dictionary

 2- Once I refresh the browser I get the following error 

   Server Error in '/' Application

  Object reference not set to an instance of an object

 3- Once I refresh the browser a second time the website comes up correctly and I never get the error messages again.  Also no other user gets the error when they hit the site.

 4- But when I try to login by hitting login or pick customer service I get the

   Server Error in '/' Application

  Object reference not set to an instance of an object

 

My enviornment is as follows:

3 server all running 2008 64 R2

Server 1 eService is in the DMZ and has port 80 and 433 open for sql.  We put a network sniffer and it communicates back and forth just fine and we clearly see lots of images and content coming accross but we still get an error.

this is leading us to think it's something with the portal setting itself?

Server 2 and 3 are behind the firewalls and work fine.

Any help is greatly appreciated.

 

Dec 15, 2009 at 9:57 PM
Edited Dec 15, 2009 at 9:58 PM

Hi ehanna,

It is hard to determine where is a problem with accelerators but every time when I have a problem I'm using event viewer on eService server.

You can also run a trace on CRM server and check if you can see any errors on this side.

I don't think that your issue is network related problem so (eService or CRM)

Let me know because there is a limited support even from MS so when I was implementing eService (with ADAM authentication also in DMZ + Network Load Balancing) I had a

lot of work to resolving issues (we customized eService a lot).

 

-----------------------------------

My Dynamics CRM blog

http://bovoweb.blogspot.com

Dec 16, 2009 at 11:53 PM

Okay,

I finally got it.  I can't believe that they missed this in the intructions, but thanks to you guys I got it to work.  In my case I had the WebUserId in lower case, it must be exact.

The solutions for me was as you guys mentioned above:

  MAKE SURE YOU TYPE IT IN EXACTLY AS SHOWN INCLUDING CASE

In loginControl.asx.cs Replace this

Guid WebUserId = (Guid)Cache["msa.eService.CRMWSUserId"];

With this GUID below is the your specific GUID id.

Guid WebUserId = new Guid ("GUID");

to get guid run this Select systemuserid, firstname from Systemuserbase and copy the guid for crm

thanks

Feb 18, 2010 at 8:47 AM

I applied as  bausten adviced, it works!!!

Thankz a million

Mar 1, 2010 at 11:33 PM

Hi Guys,

I had the same problems - after much feeking around I managed to install it and get it working after getting the first error "object ref..."

Things I did differently:
1) Created a seperate webCRMUser for the eservice and the eportal
2) In the webconfig file I took the :5555 off the <add key CRM ServerURL> line...

Then it worked..

Oh: Except the both the portal console and the eService console don't work form in CRM!! any ideas???

 

 

Oct 21, 2010 at 3:14 PM

The old events, eService, PIA, and PRM accelerators were replaced with the xRM portal framework delivered in the CDM SDK 4.0.0012 and by the customer and partner portals this last spring. 

The new links to the customer portal is http://customerportal.codeplex.com.  The partner portal is still at http://prm.codeplex.com

The old accelerators are no longer current nor supported.  The new customer and partner portals will be available for CRM 2011 shortly.

Shan McArthur
www.shanmcarthur.net