locked
eService sample portal problem RRS feed

  • Question

  • Hello All,
    I am trying to configure the sample eService portal and I have a small problem.

    The smaple portal loads, but when I click to go onto the login form I get an error:

     

    Server Error in '/' Application.

    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:\Program Files\Microsoft Dynamics CRM Customer 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:\Program Files\Microsoft Dynamics CRM Customer Portal\Controls\LoginControl.ascx.cs:16
       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.3082; ASP.NET Version:2.0.50727.3082
    Friday, July 31, 2009 5:36 PM

Answers

All replies

  • Hi,

    You will find suggestions and recommendations about the error at the thread below.


    Hassan.

    Hassan Hussain | http://hassanhussain.wordpress.com/
    Sunday, August 2, 2009 1:03 PM
  • I tried allo the suggestions in the thread, right down to modifying the line in LoginControl.ascx.cs:

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


    I changed it to to GUID of the user that defined in web.config, but I have the syntax wrong:

    Compiler Error Message: CS1003: Syntax error, ']' expected

    Source Error:

     
    Line 15: 		_service = CrmServiceManager.GetCrmService();
    Line 16: 		//Guid WebUserId = (Guid)Cache["msa.eService.CRMWSUserId"];
    Line 17: 		Guid WebUserId = (Guid)Cache[87E50BB5-D051-DE11-A521-0030488E7195];
    Line 18: 		PermissionsUtility.ValidateCrmPermissions(_service, WebUserId, "contact", "account", "incident", "activity");
    Line 19: 	}

    Thursday, August 6, 2009 2:30 PM
  • Hi,
    we already installed all the accelerators & working fine.Please follow the Step by step installtion document & video's
    thanks
    VenkataPidikiti
    VenkataP
    Monday, August 10, 2009 8:09 AM
  • I have followed the installation directions, but there appears to be a difference if you do not use the provided virtual machine, or if you wish to use a user account other than CRM Web User.

    Since I am out of users, I can not create the account CRM Web User, so I have to use an existing account.
    Monday, August 10, 2009 6:34 PM
  • q2418130103p,

    You're not alone, I'm still having issues with my portal as well. A consultant I'm working with seems to believe that the video may have some incomplete/incorrect instructions.

    Regards,

    Gregg L.

     

    Monday, August 17, 2009 5:46 PM
  • Hi Gregg,

    This error comes if you are not able to connect to actual CRM web service and get the eservice configuration properly..

    The cache values are getting set in Global.asax file in  Cache_eService_FullConfig() method

    please debug and make sure this method gets executed successfully and the cache value for the user gets update successfully in following lines..

    Microsoft.Crm.Sdk.

    Lookup luWebUserGuid = (Microsoft.Crm.Sdk.Lookup)eServiceConfigSettings[0].Properties["msa_webuserid"];

     

    Guid crmWebServicesUserGuid = luWebUserGuid.Value;

    _cache.Insert(

    "msa.eService.CRMWSUserId", crmWebServicesUserGuid);


    Also make sure your web.config have correct values for the following seeting to connect to CRM Server ..


    <

     

    add key="msa.CRMOrganizationName" value="<<ORGNAME>>"/>

    <

     

    add key="msa.CRMServerUrl" value="<<SERVERURL>>"/>

    <

     

    add key="msa.CRMWebServicesUser" value="<<USERNAME>>"/>

    <

     

    add key="msa.CRMWebServicesPassword" value="<<PASSWORD>>"/>

    <

     

    add key="msa.CRMDomain" value="<<DOMAIN>>"/>

     

     


    let me know if you need more information.......

    Monday, August 17, 2009 6:12 PM
    Answerer
  • MayankP,

    Thank you for your advice! I will pass this information on to your consultant, coding is not really my area of skill.
    I will post back if I have further issues, or to let you know everything is well.

    Kindest Regards,

    Gregg L.
    Monday, August 17, 2009 6:53 PM
  • Let us know how you make out.

    In the meantime I have been looking at purchasable portal software, specificly http://www.aivea.com  I like the idea of using contacts to control customer login, that makes it easy for CRM users to add new logins.

    Thursday, August 20, 2009 2:03 PM