CRM 4.0 Online Error HTTP 415

Mar 2, 2011 at 3:48 PM

Not sure if anyone else has got this working with CRM Online (4.0), but here is what I get (I havent been able to successfully connect yet);

CRM Queue Manager Service version 1.6.1.0

11:35:40 Processing queues
11:35:40 Querying queue 'Support'...
11:35:52 Unhandled exception occurred in ProcessQueue

Exception:
The request failed with HTTP status 415: Cannot process the message because the
content type 'text/xml; charset=utf-8' was not the expected type 'application/so
ap+xml; charset=utf-8'..

Stack trace:
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie
ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal
l)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
ame, Object[] parameters)
   at QueueManager.Helper.CRM.CrmService.RetrieveMultiple(QueryBase query) in C:
\Projects\CRMQueueManager\QueueManagerHelper\Web References\CRM\Reference.vb:lin
e 298
   at QueueManager.Service.QueueMonitor.ProcessQueue(QueueSetting QueueSettings)
 in C:\Projects\CRMQueueManager\QueueManagerService\QueueMonitor.vb:line 58

 

(I havent changed alot of the config settings, but here is what I have, and I have dotted out my password);

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="queues" type="QueueManager.Service.Config.QueueSection, QueueManagerService" />
  </configSections>

  <appSettings>
    <add key="crmserviceurl" value="https://dev.crm.dynamics.com/XRMServices/2011/Discovery.svc" />
    <add key="organization" value="grizzlytech.crm.dynamics.com" />
    <add key="username" value="glen@grizzlytech.ca" />
    <add key="password" value="................" />
    <add key="domain" value="GrizzlyTech" />
    <add key="logeventlog" value="true" />
    <add key="logerrornotify" value="glen@grizzlytech.ca" />
    <add key="logwarningnotify" value="glen@grizzlytech.ca" />
    <add key="lognotifyfrom" value="Automatic Mailer &lt;noreply@domain.com&gt;" />
    <add key="logtofile" value="" />
  </appSettings>
 
  <queues>
    <add name="Support"
         queueid="A773A054-1741-E011-9147-001F29C97F76"
         tempqueueid="00B755BD-6A48-DD11-80A0-0003FF4E583B"
         interval="60"
         tempqueueage="2"
         matchcaseticketnumber="true"
         ignorelist="out of office;autoreply;auto reply"
         moveignored="true"
         createcontact="true"
         allowonlyto="false"
         allowonlyto-reply="true"
         allowonlyto-notify="notify@domain.com"
         allowonlyto-from="Automatic Mailer &lt;noreply@domain.com&gt;"
         allowonlyto-template="c:\fullpath\allowto.htm"
         allowonlyto-subject="Support notification"
         sendverificationmail="false"
         verificationmail-from="Automatic Mailer &lt;noreply@domain.com&gt;"
         verificationmail-bcc="notify@domain.com"
         verificationmail-subject="Welcome to the Support Desk"
         verificationmail-template="c:\fullpath\verify.htm"
         verificationmail-usehtml="true"
         verificationmail-url="http://support.domain.com/ClientInformation.aspx"
         sendcasemail="true"
         casemail-from="Automatic Mailer &lt;noreply@domain.com&gt;"
         casemail-fromtype="queue"
         casemail-notify=""
         casemail-subject="Case {ticketnumber} has been created for you"
         casemail-template="c:\fullpath\case.htm"
         casemail-usehtml="true"
         updatecasedescription="true"
         caseattributes=""
         resolveparent="true"
         resolveparent-notify="notify@domain.com"
         resolveparent-from="Automatic Mailer &lt;noreply@domain.com&gt;"
         sendcasenotificationmail="true"
         casenotification-from="Automatic Mailer &lt;noreply@domain.com&gt;"
         casenotification-to="notify@domain.com"
         casenotification-subject="{ticketnumber}: A new case has been created"
         casenotification-template="c:\fullpath\casenotify.htm"
         casenotification-usehtml="true"
         removerepliesfromqueue="false"
         mapcasetoaccount="false"
         parentaccountmissing="false"
         setresponsiblecontact="false"
         />
  </queues>

  <!--
  Update the network tag with your smtp settings.
  -->
  <system.net>
    <mailSettings>
      <smtp>
        <network host="smtp.gmail.com" defaultCredentials="false" userName="account@gmail.com" password="password" port="25" />
      </smtp>
    </mailSettings>
  </system.net>
</configuration>

Mar 2, 2011 at 10:52 PM

Try using the 2007 endpoint, which is still supported with CRM 2011. Details can be found here:

http://msdn.microsoft.com/en-us/library/gg334316.aspx'

PLEASE post your results on this forum. I am also attempting to test this application against a CRM 2011 OnLine system. Microsoft's hosting services have been flakey all day today, and I'm afraid that some of my tests may be failing as a result of these issues (as opposed to a true compatability issue with CRM 2011).

So far, my testing bombs on like 58 of the QueueMonitor.vb file. I've reviewed the list of deprecated and removed entities, attributes, views, and messages. I don't see anything that should cause this particular call to fail. It is likely, however, that some functionality will be lost b/c the "route" and "handle" messages have been removed. Here is the documentation I am referencing:

http://msdn.microsoft.com/en-us/library/gg509038.aspx
http://msdn.microsoft.com/en-us/library/gg334371.aspx
http://msdn.microsoft.com/en-us/library/gg328322.aspx

Mar 3, 2011 at 12:15 PM

Thanx fo the reply,

I was trying to test 2011 as well, so I think I actually C&P'd the wrong config file above. I'm getting the same error that you're getting with 2011. I'm glad you mention the 'flakey-ness' of the hosting service yesterday since I seem to get inconsistent results when testing yesterday too.

Now I get a different message (from 4.0) . this is the top part of my config;

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="queues" type="QueueManager.Service.Config.QueueSection, QueueManagerService" />
  </configSections>

  <appSettings>
    <add key="crmserviceurl" value="https://dev.crm.dynamics.com/MSCRMServices/2007/Passport/CrmDiscoveryService.asmx" />
    <add key="organization" value="grizzlytransport.crm.dynamics.com" />
    <add key="username" value="glen@grizzlytech.ca" />
    <add key="password" value="............." />
    <add key="domain" value="GrizzlyTransport" />
    <add key="logeventlog" value="true" />
    <add key="logerrornotify" value="glen@grizzlytech.ca" />
    <add key="logwarningnotify" value="glen@grizzlytech.ca" />
    <add key="lognotifyfrom" value="Automatic Mailer &lt;noreply@domain.com&gt;" />
    <add key="logtofile" value="" />
  </appSettings>

now I get; (but I'm pretty sure I've put the org name in correctly)


Exception:
Server was unable to process request.

Details:

  0x80040217
  Organization With Name = grizzlytransport.crm.dynamics.com Does Not Exist
  Platform


Stack trace:
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie
ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal
l)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
ame, Object[] parameters)
   at QueueManager.Helper.CRMDisco.CrmDiscoveryService.Execute(Request Request)
in C:\Projects\CRMQueueManager\QueueManagerHelper\CrmDiscoveryService.vb:line 48

   at QueueManager.Helper.CRMHelper.GetCrmService() in C:\Projects\CRMQueueManag
er\QueueManagerHelper\CRMHelper.vb:line 76
   at QueueManager.Service.QueueMonitor.ProcessQueue(QueueSetting QueueSettings)
 in C:\Projects\CRMQueueManager\QueueManagerService\QueueMonitor.vb:line 58

Mar 3, 2011 at 12:20 PM

realized when I try the discovery service in the browser, I get HTTP 404

 

 

Mar 3, 2011 at 12:24 PM

and then I put grizzlytransport.crm.dynamics.com instead of just grizzlytransport . but I still get org not found.

but I the discovery service returns propeprly, about half the time, the other half its a 404.

Mar 3, 2011 at 1:29 PM

Hi,

Another quick update.

I have repeated my test against an ON PREMISE 2011 Release Candidate. Unfortunately, the results were identical to what I described for my OnLine testing. Authentication succeeds, but the very furst call to RetrieveMultiple fails with a generic SOAP error (Server was unable to process request).

I have a sneaking suspicion that to support 2011 the code path will have to branch on version and call the new 2011 endpoint.

RE: your config.. the organization value for CRM OnLine is usually an alphanumeric string that starts with "org". I'm not sure if that's changed with brand new 2011 systems since the only one I have access to was upgraded from 4.0. If you submit a support ticket, they should be able to help you find/confirm the correct organization identifier. Also, I'd recommend masking any personally identifying values before posting (like your e-mail address).

Mar 3, 2011 at 1:45 PM

Thanx for the reminder on email address too,

and for the tip on the org name. by going to customizations / download webservice description file, I can also get the internal CRM Org name (crmNAorg........) , which is what I think I need to use. I thought it was the orgname on the url but I guess not.

(for anyone else as a ref http://msdn.microsoft.com/en-us/library/bb955360.aspx )

and now it works!!

Mar 3, 2011 at 4:42 PM

Thanks GrizzlyTech.

One thing confuses me about your post. The "Download WebService Description File" option under the "Settings --> Customizations" branch only exists in CRM 4.0. Are you sure the CRM OnLine system you're using has been upgraded to CRM 2011? I can't seem to post a screengrab here, so let me describe a couple of key differences you would be able to easily observe in 2011:

  • You will have a "ribbon" bar at the top of each page. Above the ribbon, there will be any number of tabs, but the first tab is always "File"
  • Under the Settings area, you will see several options that didn't exist in 4.0. For example: "solutions" and "processes"
  • If you select the "Customizations" option, you will see for sub-items: "Customize the System, Publishers, Solutions, and Developer Resources". Conversely, in 4.0 there are 8 options listed under Customizations (including the "Download Web Service Description Files" link you referenced in your post)

Based on these details, can you confirm that you are using CRM 2011? If so, can you please post the config you are using for the queues you are testing (feel free to mask any sensitive data values as previously described). Its possible that a specific feature is not supported in 2011 and this should help identify which feature may be causing my testing to fail.

Thanks again!!

 

Mar 3, 2011 at 4:52 PM

My apologies troglite, in my first post I mentioned CRM 4.0 online and that is what I am using (I might have confused the issue by including my 2011 config file, but I was also testing 2011 as well).

The customer I am doing this for is still on 4.0 and wants this functionality right away. Following your 2011 posts in the other thread as well.

Cheers

Mar 3, 2011 at 5:05 PM
Got it. No need to apologize. I should have read your previous post more carefully.
I'll be blunt.. it seems likely that signficant changes are going to be required to have this work under CRM 2011. The current version works just fine in 4.0 and 3.0. I'm leaning toward writing a new 2011 version "from scratch" that offers most or all of the funcitonality included in this open source project using the native CRM 2011 API's. It just doesn't seem worth the effort to bring the legacy 3.0 and 4.0 funcitonality along for the ride. The new WCF and LINQ based API's that have been introduced are SOO much cleaner. Also, if I do go down this path.. the new version will almost certainly be in C#. I know that kinda stinks for the community who is already using Queue Manager.. but it seems like the most logical path forward when wearing my "corporate developer" hat instead of my "open source supporter" hat.

On Thu, Mar 3, 2011 at 12:52 PM, Grizzlytech <notifications@codeplex.com> wrote:

From: Grizzlytech

My apologies troglite, in my first post I mentioned CRM 4.0 online and that is what I am using (I might have confused the issue by including my 2011 config file, but I was also testing 2011 as well).

The customer I am doing this for is still on 4.0 and wants this functionality right away. Following your 2011 posts in the other thread as well.

Cheers

Read the full discussion online.

To add a post to this discussion, reply to this email (crmqueuemanager@discussions.codeplex.com)

To start a new discussion for this project, email crmqueuemanager@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Mar 3, 2011 at 5:16 PM

I just change the subject line too to make to clear in the post.

I just got confirmation that C360 has not upgraded their product for 2011 Online (and apparently is not on their plan) so there certainly will be a need for a 2011 Product (soon, as MS starts upgrading more and more). Pls keep me posted on your progress. If you think a re-write is better, then go for it.