locked
adding client extensions( web page) problem in crm 2015 (on premise) RRS feed

  • Question

  • Hi ,

    I imported crm 4.0 to crm 2015. I am trying to add extension the aspx web page that i had before in crm 4.0 into a customized button. I add it in isv. For crm 2015 the isv folder isn't unsupported. i read that i must to create a new site into iis and then modified sitemap .

    I exported the sitemap, modified it and then imported and published.

    I can't see my page when i clicked on the button which must to open it.

    my site in iis it in the same applications pool like the default crm.  it name's crm15.

    here is the modification in customization.xml:

    <CommandDefinition Id="Mscrm.Isv.account.Form.Group0.Control0">
                <EnableRules />
                <DisplayRules />
                <Actions>
                  <Url Address="/../sfa/accts/syncsage_dev.aspx" WinMode="1" PassParams="true" WinParams="help:no;status:no;dialogHeight:400px;dialogWidth:600px" />
                </Actions>
              </CommandDefinition>

     i had the security access problem.

    the sample code method to initialize the service

    service = GetCrmService(

    http://hostname/organizationname);

    publicstaticIOrganizationServiceGetCrmService(stringcrmServerUrl)

            {

               

    try


                {

                   

    //ClientCredentials credentials = new ClientCredentials();


                  

    // credentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;


                   

    AuthenticationCredentialscredentials = newAuthenticationCredentials();

                    credentials.ClientCredentials.Windows.ClientCredential = (

    NetworkCredential)CredentialCache.DefaultCredentials;

                   

    OrganizationServiceProxyproxy = null;

                   

    IOrganizationServiceservice = null;

     

     

                   

    if(crmServerUrl != null&& crmServerUrl.Length > 0)

                    {

                       

    UriBuilderbuilder = newUriBuilder(crmServerUrl);

                        builder.Path =

    @"/XRMServices/2011/Organization.svc";

                       

    Uriuri = builder.Uri;

                        proxy =

    newOrganizationServiceProxy(uri, null, credentials.ClientCredentials, null);

                        service = (

    IOrganizationService)proxy;

                       

                    }

     

                   

    returnservice;

                }

               

    catch(System.Exceptionerr)

                {

                    err.GetBaseException();

                   

    returnnull;

                }

            }

    thanks for help

    regards

    Friday, April 22, 2016 10:16 AM

Answers

  • Hi,

    I changed the "authentification to anonyme" on IIS. I deactivated Windows authentication.

    Now it's OK.

    Thanks

    Regards

    • Marked as answer by dc74 Wednesday, May 4, 2016 8:22 AM
    Wednesday, May 4, 2016 8:22 AM

All replies

  • Hello,

    I solved the issue partialy, i changed authentication on iis and changing GetcrmService method.

    But i had another issue.

    Here is the new GetCrmservice Method:

    protected

    staticIOrganizationServiceGetCrmService(stringcrmServerUrl)

            {

               

    try


                {

     

                  

                   

    UriorganizationUri = newUri(crmServerUrl);

                   

    UrihomeRealmUri = null;

                   

    ClientCredentialscredentials = newClientCredentials();

                   

    // set default credentials for OrganizationService


                    credentials.Windows.ClientCredential = (

    NetworkCredential)CredentialCache.DefaultCredentials;

     

                   

    OrganizationServiceProxyorgProxy = newOrganizationServiceProxy(organizationUri, homeRealmUri, credentials, null);

                   

    IOrganizationService_service = (IOrganizationService)orgProxy;

                   

    return_service;

                }

               

    catch(System.Web.Services.Protocols.SoapExceptionerr)

                {

                    err.Detail.OuterXml.ToString();

                   

    returnnull;

                }

            }

    the url to access to the service is:

    string

    url = "http://hostname/organizationName/XRMServices/2011/Organization.svc";

    thanks for your help

    Regards

    Thursday, April 28, 2016 9:05 AM
  • Hi,

    I changed the "authentification to anonyme" on IIS. I deactivated Windows authentication.

    Now it's OK.

    Thanks

    Regards

    • Marked as answer by dc74 Wednesday, May 4, 2016 8:22 AM
    Wednesday, May 4, 2016 8:22 AM