Error with PIA Install on Register Page

Nov 5, 2009 at 11:43 PM
Edited Nov 5, 2009 at 11:44 PM

After installing PIA on CRM v4 RU7 without errors, I get this error when I try to finally go to the Register page. I have restarted the server and done an IIS reset. Any ideas?

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:

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:

[NullReferenceException: Object reference not set to an instance of an object.]
   MSA_Portal.Controls.EntityEditor.SetFormState() in C:\MSA_Drop\Web\Portals\Portals\CRMWebPortal\CRMWebPortal\MSA_Portal\Controls\EntityEditor.ascx.cs:433
   MSA_Portal.Controls.EntityEditor.OnPreRender(EventArgs e) in C:\MSA_Drop\Web\Portals\Portals\CRMWebPortal\CRMWebPortal\MSA_Portal\Controls\EntityEditor.ascx.cs:173
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

Nov 8, 2009 at 10:02 PM

I have the same problem on my PRM portal, but not before trying to register a new opportunity... The login process works fine...


Dec 22, 2009 at 11:14 AM

I have the same problem to, before the login process...

Please help

Dec 22, 2009 at 11:59 AM
Edited Dec 22, 2009 at 12:00 PM

I had the same problem; go into your web.config file and ensure the key values for your AD authentication in <appSettings> are correct. Hope this helps.

Dec 22, 2009 at 1:10 PM

Thanks you for your help but I just check web.config and it is correct.

So I don't understand what is "C:\MSA_Drop\Web\Portals\Portals\CRMWebPortal\CRMWebPortal\MSA_Portal\Controls\EntityEditor.ascx.cs" file... I don't have it on my system file.

Dec 22, 2009 at 1:41 PM

Paste your appSettings here just to double check...........

Dec 22, 2009 at 2:25 PM


<font size="2" color="#0000ff"><font size="2" color="#0000ff">


</font></font><font size="2" color="#0000ff">




add key="msa.CRMAuthType" value="AD"/>

add key="msa.AD.CRMOrganizationName" value="ORG" />

add key="msa.AD.CRMServiceUrl" value=http://SERV:5555/MSCRMServices />

add key="msa.AD.CRMWebServicesUser" value="login" />

add key="msa.AD.CRMWebServicesPassword" value="mdp" />

add key="msa.AD.CRMDomain" value="Domain" />

Dec 23, 2009 at 8:40 AM

While I am aware that you're probably being security conscious, are these your actual values? As a hint, I am currently using the Portal on a VPC where my username, password and domain are administrator, pass@word1, and respectively using the Vanilla organisation on the URL server http://crm/mscrmservices.

Dec 23, 2009 at 9:31 AM

No, they are not my actual values. I think my appSettings is good. I test differents values with several organisations, ... But this problem is not yet fixed. Are you sure that it comes from the webconfig file?

Thanks for your help


Dec 23, 2009 at 9:57 AM

It worked for me as I had the same error until I edited the appSettings. Have you tried restarting IIS after your modifications?

Dec 23, 2009 at 10:21 AM

Yes i restarted IIS after but no change.

Dec 23, 2009 at 10:30 AM

I'm afraid I don't know what else to suggest......

Dec 23, 2009 at 10:45 AM

no problem I look again

May 1, 2010 at 4:13 PM

I have the same problem and Can not sort it out. I would be grateful if somebody can help. Thanks.

May 7, 2010 at 12:43 PM

I had  the same problem and solution was in web.config. Double check all the values in keys You see in the PierreLse31:s post. My problem solved using http://localhost:5555/mscrmservices in CRMServerUrl.

Aug 27, 2010 at 10:52 PM

Anybody else got any information on this? I'm at the exact point mentioned in this forum, and I've changed the ServerURL to 'localhost', I've confirmed that all of the information that I listed was accurate, and .... nothing.

The Domain user that we list in this web.config file, does it have to have certain permissions? Or will regular user account level permissions work?


Any help on this issue would be greatly appreciated.



Aug 27, 2010 at 10:57 PM

The url in your connection string is the CRM connection string.  You need to give it the EXACT url and credentials that the portal can use to connect to your CRM server.  For an on-prem install, you should also use AD for an authentication type and provide domain credentials in the form of domain\username.


Aug 27, 2010 at 11:04 PM

Okay, so let's step through this.


CRM Connection String, by default points "http://crmserver/mscrmservices" -- if I go to my virtual directory where CRM is installed, it would be "http://rnoapp1:5555/MSCRMServices" -- Correct??

Secondly, when adding the permissions, it has 3 spaces, one for username, one for password, and one for domain. In the username field, should I put "DOMAIN\USERNAME" even though the domain is listed once again, below it?

Thanks Shan.

Aug 27, 2010 at 11:08 PM

Nope.  Please read the instructions.  Many examples of the connection string are in the documentation.

The url will likely be something like http://rnoapp1:5555/orgname

I don't understand your question about adding permissions.  Can you explain what you are doing, which tool you are using, etc?


Aug 27, 2010 at 11:13 PM

I apologize for the confusion.


Okay, so the server URL is not set to: "http://rnoapp1:5555/PowerDEX"


When I referred to the 'permissions', let me give you the backstory. During the installation video, it said to make a user for the portal to use to authenticate with. I made a new user in AD, with 'Domain User' level permissions. Inside the web.config file, in the appSettings section, I defined that user. My question is whether or not in the msa.AD.CRMWebServicesUser field, if I have to put just the user name, like "user", or if I have to put "DOMAIN\User"


Do you understand? Sorry for the confusion, Shan. But I've watched the video, followed the instructions, and its just... stuck here.


Thanks for your help.

Aug 27, 2010 at 11:20 PM

Yes, that helps.

Actually, it was I who was confused.  I was responding off of an email notification and didn't have full context of the conversation when I responded - I thought you were using the new partner portal.  It looks like you are using the older portals, so my instructions are not accurate.  Now that said, are you aware the that old eService, events, PIA, and PRM projects have been replaced with the new customer and partner portal projects this spring?  These use the new connection string mechanism, are built upon a much more modern framework, and even sport a CMS model in the portals.  You should consider the old PIA, PRM, events, and eservice accelerators as legacy.


Aug 27, 2010 at 11:42 PM



Okay I was unaware that there was a new iteration of these accelerators. Given that, I've found the new links to the new stuff. Okay, so I'll download that and get to that. Let's clarify.

PIA/PRM are outdated, and replaced by, correct?

Now what about the PRM functionality, for partners/distributor channels? Is that included in the new portal? That's specifically what we're concerned with, not so much 'direct customers'.

and my FINAL question is.... how do I UNINSTALL the OLD PIA/PRM installations? Will the workflows and entities that were installed cause me any issues? Is there a real need to uninstall them?


Thanks SO much, Shan. You've been a lifesaver so far.

Aug 28, 2010 at 12:10 AM

The customer portal is a replacement for eService and Events, and is built upon a new portal framework that now lives in the CRM SDK (in the microsoft.xrm folder of 4.0.0012 SDK).

The PIA is replaced by the new portal framework.

The PRM portal is still at  Reuben has updated the downloads in May to the latest release.

You don't really have to uninstall the old portals.  We tried to keep most of the customizations the same, so most of the customizations you have will continue to function.  Some, like the config are retired, but there is no harm in leaving them there.  The portal framework will add a lot more entities, especially to support the new CMS model.