locked
crm2011, Customer Portal and Intellisense RRS feed

  • Question

  • I'm trying to convert a custom membership provider from a CRM 4.0 Customer Portal so that it works with a brand new crm2011 Customer Portal installation.  I've started a brand-new project using the 2011 portal .sln, and added an App_Code directory.  Then I added my old membership provider to the project (add as existing item).  I can't seem to get Intellisense working for the XRMSericeContext when I'm editing the new copy of the membership provider's .cs file.

    Also, I don't get any build errors when I press F6, but when I debug the project (F5) I get Compilation Errors in the browser.  Most of these are related to the changes in entity property casing (error:contact does not exist in the namespace XRM; it's now Contact).  I went through and fixed these by finding the entities and their properties in the new Xrm.cs file I generated, and correcting all the casing problems in my provider, and that's gotten rid of the in-browser Compilation Errors.  But it would have been easier to do if I could have had the Intellisense prompt me for the class names and attributes related to my CRM entities.

    Both of these make it *feel* like I'm missing some kind of reference in my project.  Ideas?  Need any more information?



    Friday, June 10, 2011 11:11 PM

Answers

  • For what it's worth, the Intellisense problem was fixed by moving my custom provider's .CS file into the root directory of my project (before it was in the App_Code dir).

    Regarding the insecurity of the contact provider: I spotted one problem with that implementation that I corrected in mine: it didn't hash passwords.  Are there other problems with it?

    • Proposed as answer by Palak Kadakia Thursday, November 10, 2011 10:50 PM
    • Marked as answer by Palak Kadakia Monday, January 23, 2012 2:30 AM
    Wednesday, June 29, 2011 10:12 PM

All replies

  • The Linq provider in CRM 2011 has many breaking changes from the one we released with CRM 4, and part of those breaking changes is the change to using the schema name instead of the logical name, which brings up the casing issue you have noticed.  This is an expected behavior.

    That said, it sounds like you are trying to port the sample crm contact membership provider code that was released on the internet by a third party.  That implementation is not secure and I would not recommend you use that code.  One consideration is that you can use the commercial one from adxstudio, which would avoid you having to compile and upgrade the code on your own - one advantage to using a commercial version.

    The errors you are seeing in the browser are because of the use of a loose coupling style of coding - this is necessary for an ISV solution that has to work on anyone's CRM, but as you pointed out, the downside is that you don't get intellisense help nor compile-errors - you see them at runtime.  There is nothing we can do about that.  If the site started, you aren't likely missing any references.


    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    • Proposed as answer by Palak Kadakia Thursday, November 10, 2011 10:50 PM
    Saturday, June 25, 2011 6:10 PM
    Moderator
  • For what it's worth, the Intellisense problem was fixed by moving my custom provider's .CS file into the root directory of my project (before it was in the App_Code dir).

    Regarding the insecurity of the contact provider: I spotted one problem with that implementation that I corrected in mine: it didn't hash passwords.  Are there other problems with it?

    • Proposed as answer by Palak Kadakia Thursday, November 10, 2011 10:50 PM
    • Marked as answer by Palak Kadakia Monday, January 23, 2012 2:30 AM
    Wednesday, June 29, 2011 10:12 PM