Adoxio / xRM-Portals-Community-Edition

The definitive edition of Microsoft Open Source Portals, supported by the experts in portals.
MIT License
107 stars 60 forks source link

Custom code to get website id #82

Closed cmsnyder closed 5 years ago

cmsnyder commented 5 years ago

I am upgrading our v7 portal to Community Edition. I had custom code to grab the website id that is now broken in the new version. I'm having a hard time finding a solution and was hoping someone could help me.

image

amervitz commented 5 years ago

You could try creating a portal context and accessing the website using code similar to this: https://github.com/Adoxio/xRM-Portals-Community-Edition/blob/40dfab56f713e1e47b982b3b4ac88e67b4808b53/Samples/MasterPortal/Global.asax.cs#L233-L240