Download DOWNLOAD
Forums FORUMS
Blogs BLOGS
Forge FORGE
Help HELP
Marketplace MARKETPLACE
DotNetNuke Home
You are here >   Community > Blogs
Register  |  Login

DNN Blog

May 16

Posted by: Nestor Sanchez
Saturday, May 16, 2009 

I needed to create a report in a DNN website to obtain the Total billable hours for a single case in Dynamics CRM. All my previous DotNetNuke modules for CRM had been done in VS2005, which lead me to miss a detail.

My code kept complaining about missing the Crmservice  type, which after instantiation is the very same web service needed to obtain information from Dynamics CRM. After going through MSDN documentation, posting at the CRM community and searching through the web I was almost giving up.

The cause was not apparent to me because the behavior in VS 2008 was so similar to its counterpart in VS2005. The reason I kept missing it was that I did not pay enough attention to the  "Add Service Reference screen.

image

image

In all my DNN modules, the Add Web Reference item in the contextual project menu is always present, but notice there’s no “Add Service Reference” item.

 

imageHowever in a new Console project the menu is different. The menu displays two items. “Reference” and “Add Service Reference”.  Of course I went automatically to the second one and kept adding the CRM URL there. After connecting and finding the webservice, the reference was added. I did this a few times, but the CrmService error remained.

After wasting a couple of cycles searching the web, I resolved to start from scratch following the Sdk documentation step by step.

In the end, it was very, very simple. I was not adding a Web Reference. And judging from the result there is and important difference. The steps to add a Web Reference are slightly different, but only the first time in a project.

The “Add Web Reference” screen only shows up after clicking on “Advanced…” button in the first Add Service Reference screen and then “Add Web Reference…” in the Service Reference Settings screen.

 image

imageA third option “Add Web reference” will appear from now on in that project.

In summary, the problem was that I had been adding a Service Reference where a Web Reference was needed.

Tags:

1 comment(s) so far...

Re: Dynamics CRM Crmservice unavailable in Visual Studio 2008

Thanks you so much you just saved me a heap of time. The service reference loaded the URL okay and some of the functions worked, and there didn’t appear to be an option for Web service, so I assumed this wasn’t the issue until I read your post. Thanks Again.

By vaughan T on   Monday, July 20, 2009

Networks

Follow DNNCorp on Twitter

LinkedIn

Follow us on Twitter @DNNCorp or join the DotNetNuke Community on LinkedIn

Sponsors

DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation

Hosted by MaximumASP