locked
A popup authentication box RRS feed

  • Question

  • I've developed a plugin for mscrm, but everytime I use it in actual environment, a authentication box popup and ask me to input account and password and whatever i input I will not be allowed to pass. After 3 times error, I'll have no authority to view this page again...
    How can I fix that?  Thanks in advance.
    Monday, March 15, 2010 12:23 PM

Answers

All replies

  • Can you describe the functionalityof this plugin as I haven't seen credentials popup for plugins before. It seems as though a url you are trying to use is not added to your trusted sites in IE.
    MSCRM Bing'd - http://bingsoft.wordpress.com
    Monday, March 15, 2010 12:28 PM
    Moderator
  • here 's my plugin code and http://localhost:555 is already in the trust site....

      public void Execute(IPluginExecutionContext context)
            {
                string lookupId = "";
                lookupId = HttpContext.Current.Request.QueryString["id"] == null ? null : HttpContext.Current.Request.QueryString["id"].ToString();

                if (lookupId == null) return;
                try
                {
                    if (context.InputParameters.Contains("FetchXml"))
                    {
                        ICrmService service = context.CreateCrmService(false);
                        string fetchXml = QueryLink2(lookupId);
                        context.InputParameters["FetchXml"] = fetchXml;
                        //XmlDocument xmlDoc = new XmlDocument();
                        //xmlDoc.LoadXml(result);
                        //Console.Write("ok");
                        //context.InputParameters["FetchXml"]

                    }
                }

                catch (System.Web.Services.Protocols.SoapException ex)
                {
                    throw new InvalidPluginExecutionException("An error occurred in the CRM plug-in.", ex);
                }
            }

    Monday, March 15, 2010 12:49 PM
  • here 's my plugin code and http://localhost:555 is already in the trust site....

      public void Execute(IPluginExecutionContext context)
            {
                string lookupId = "";
                lookupId = HttpContext.Current.Request.QueryString["id"] == null ? null : HttpContext.Current.Request.QueryString["id"].ToString();

                if (lookupId == null) return;
                try
                {
                    if (context.InputParameters.Contains("FetchXml"))
                    {
                        ICrmService service = context.CreateCrmService(false);
                        string fetchXml = QueryLink2(lookupId);
                        context.InputParameters["FetchXml"] = fetchXml;
                        //XmlDocument xmlDoc = new XmlDocument();
                        //xmlDoc.LoadXml(result);
                        //Console.Write("ok");
                        //context.InputParameters["FetchXml"]

                    }
            &nbs

    Monday, March 15, 2010 12:51 PM
  • I guess you are using this http://jianwang.blogspot.com/2009/08/crm-filtered-lookup-multi.html solution for filtered lookups.

    Jim mentions that 

    " this plugin(code prototype) only works for On-Premise deployment. If you want to use it in a OnPremise/IFD deployment, you need to change the code to use the CrmImpersonator() class."

    and I assume you are in an IFD deployment?


    MSCRM Bing'd - http://bingsoft.wordpress.com
    Monday, March 15, 2010 1:29 PM
    Moderator