I need to get the current organization name inside of an aspx page in the ISV directory. The only example I've seen of this tries to parse it out of the URL or the domain name, but the URL doesn't have the current org name because the page is in the ISV directory...and the domain name doesn't have it period in my case.
How can I get the org name?
I need this so that I can call CrmAuthenticationToken.ExtractCrmAuthenticationToken.
Thanks.
There is no "current" organization in an ASP.NET page as long as you do not have an initialized CrmService. You will of course want it to be the organization that is being used within the browser instance from which the page was called, but that will have to be passed in the page's QueryString from which you can get it via Request.QueryString["orgname"]
(or whatever you call the QueryString parameter).