Cannot add MSCRM 2011 WCF service reference in Visual Studio 2010 - dynamics-crm

Tech Friends,
I could not add MSCRM 2011 WCF service reference in Visual Studio 2010. It throws error when try performing this action. How do we add this service as service reference in Visual Studio 2010 and generate all proxy classes?

Have you tried following these instrutions? Download the Endpoints Using the Dynamics CRM Developer Resources Page.
Specifically in the "Using the WSDL" section.
To add a service reference for these services to a Microsoft Visual
Studio 2010 project, you must append ?WSDL to the service URL when
specifying the address in the Add Service Reference dialog box. For
example, the discovery service WSDL address is
http://servername/xrmservices/2011/discovery.svc?wsdl.

I found the resolution for the problem and I have tested it :)
To add discovery service and organization service as reference in Visual Studio we have to add query strings: ?wsdl=wsdl0
eg:-
.api.crm4.dynamics.com/XRMServices/2011/Organization.svc?wsdl=wsdl0
The same applies for discovery service also.
Check this link:
http://social.msdn.microsoft.com/Forums/en-US/crmdevelopment/thread/033f9831-5e88-4b85-a4eb-a55985f39997

Related

Service Fabric Service Templates in Visual Studio

I'm attempting to add Service Fabric Service templates in addition to the default ones such as "Stateless Service" etc. to start making services quicker.
Visual studio has export template and VSIX Project Templates options, but these templates appear only in New Project not in "add new Service Fabric Service" in a service fabric application.
The other issue is that in "add new Service Fabric Service" it automatically adds the new service to the Service Fabric Application ApplicationManifest.xml, which the other template methods don't seem to do.
After snooping around visual studio files it seems that the service fabric service templates are stored in a Visual Studio extension, however when trying to add new XML files as Service Templates and including them in manifest.xml they did not show up.
Any suggestions to how service fabric service templates could be added to VS?

Error when publishing ASP.NET Web API to Azure over Visual Studio

I'm trying to use Visual Studio 2015 to publish a simple ASP.NET Web API to Azure over "Publish..." --> Microsoft Azure App Service. I choose to create all new service plan and resource but the deployment failed with MissingRegistrationForLocation error.
Error on Azure portal:
Type
microsoft.insights/components
Resource Id
/subscriptions/8e45263d-xxxx-xxxx-xxxx-3578972e80c4/resourceGroups/xxx/providers/microsoft.insights/components/xxx
StatusMessage
{
"error": {
"code": "MissingRegistrationForLocation",
"message": "The subscription is not registered for the resource type 'components' in the location 'Central US'. Please re-register for this provider in order to have access to this location."
}
}
Microsoft Azure annouces a breaking change but I don't know what I should do to make the Publish... function of Visual Studio work again. Apparently the template of Visual Studio is still not updated with this change but where I can edit the Azure template for Visual Studio?
Thank you.
EDIT: Download and install latest Azure SDK will solve the problem https://azure.microsoft.com/en-us/downloads/
Download and install latest Azure SDK will solve the problem
https://azure.microsoft.com/en-us/downloads/
The answer is also mentioned in the original post, but it took me an hour to discover this, so for others I pasted it as an answer.

OData Default company and adjusting Service Config Files in Silverlight App being built in MS Visual Studio 2013

I'm building a Lightswitch application using MS Visual Studio 2013. As part of this I access data through an OData url (referencing a dynamics nav project) which does not seem to want to pick up the company data in the url. (It does without it). However then within Visual Studio I only see the column headers and no data. When I debug I get the following error message:
"Cannot process the request because the default Microsoft Dynamics NAV company cannot be found. You can specify a default company in the service configuration file, or specify one for each tenant, or you can add a query string in the form of "company=[name]". You can see the available companies by accessing the default OData web service, Company. For more information, see "OData Web Services" in Help."
For example: (OData url):
localhost:7048/DynamicsNAV70/OData/Company('CRONUS%20International%20Ltd.')/SalesOrder
But only viewable as:
localhost:7048/DynamicsNAV70/OData/ and then selecting SalesOrder
My question is, what config files are they refering to? (Visual studio?If so how do I add the company name?) "OData Web Services" in Help was of no use.
I had to add additional code within Visual Studio to reference the company, for example:
ServiceReference1.NAV nav = new ServiceReference1.NAV(new Uri("http:...../OData/Company('company_name')/"));
nav.Credentials = new System.Net.NetworkCredential("user", "password", "domain");

Continuous Integration from TFS to Azure Inconsistent to Visual Studio Deployment

We are working to migrate to Azure Cloud Services (not Web Site) for our ASP.net Web Application. We are wanting to start using the Team Foundation Service with 'Continuous Integration' publishing like we currently use between AppHarbor and GitHub.
We are running into challenges when using TFS's 'Continuous Integration' feature. The builds are inconsistent when comparing Visual Studio to Azure Cloud Service to TFS to Azure Cloud Service. When we publish to Azure Cloud Service using the TFS's 'Continuous Integration', our static pages work fine but for the pages that have an *.cs extension are not able to find the controls we have placed on those pages. However, when we publish using Visual Studio 2010 to Azure Cloud Service, these pages operate correctly.
Can you offer any insight to why Team Foundation Service's Continuous Integration to Azure Cloud Service would result in pages with an *.cs extension not being able to find the controls we have placed on those pages while a build and deployment using the same exact code from Visual Studio 2010 to Azure Cloud Service works perfect?
Make sure all the referred assemblies that include the custom controls are "NOT" referred from GAC. Ideally put those in a folder (call it libs or references etc to easily identify). Then refer the assemblies from that location in your project, also don't forget to mark them Copy Local = True.
Anything that is not part of the framework should be included like this.

where is the template (zip file) for WCF Rest Service

I've been working on a process for programmatically generating Visual Studio projects using GetProjectTemplate. You provide GetProjectTemplate the name of the template (a .zip file like "MvcWebApplicationProjectTemplatev3.01.cshtml.zip") and the language ("csharp").
Here's the path to MvcWebApplicationProjectTemplatev3.01.cshtml.zip
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache\CSharp\Web\1033\MvcWebApplicationProjectTemplatev3.01.cshtml.zip
I'm trying to find the template name for WCF Rest Service Application. It's the same template used by Visual Studio when creating a new WCF Rest Service project. I've looked all around where MvcWebApplicationProjectTemplatev3.01.cshtml.zip is saved and cannot find anything that resembles WCF Rest Service template.
Thanks Tom
The template is an extension and because of that it is not part of Visual installation (that is affected only by separately installed products). You will find the template under your user profile:
"%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\WCF REST Service Template 40(CS)"

Resources