Understanding the different ways to connect to CRM 2011 - winforms

I'm a beginner CRM developer and I'm quite confused about the connection methods to CRM.
What's the difference between creating a SOAP service reference to connect to CRM 2011 from a windows form application VS using connection string VS creating a web service?
Are they the same and I can use them interchangeably ? Or it depends on the task I want to do?
Thanks

Out of the 3 links that you have provided, one contains the best approach.
this - CRM SDK says to use this approach when you want to connect with CRM from some other application like Winform app, WPF app, website. In summary, you provide connection values through configuration and then use dlls provided by CRM to access data.
this - This is a special case in CRM. So here you are accessing some data from CRM, processing it in a service and then using that service to access processed data.
this - This document itself says that you should not use this approach. Problem with this approach is about hard coded service references.
You can find plenty of examples to start up with from CRM SDK.

Related

How to call SOAP web service from InTouch Wonderware or SQL Server 2014

I've been trying for a while to call an existing SOAP web service from InTouch Wonderware or MS SQL 2014. It doesn't matter which of the two calls it, as the Wonderware project reads/writes to the SQL Server database anyway.
My knowledge is mostly limited to Wonderware and its in-program options to access the SQL Server database, which doesn't work well with the usual guides on the web service topic.
The web service is provided by the customer, over a decade old and outsourced, which rules out any changes to it. The goal is to request raw material data from the web service by ID, and later returning the produced material data. The parameters of each function is documented, but the only existing URL requires username/password and directly shows the content of the WSDL file. That file (when saved locally) works on SoapUI, and test cases deliver the required results.
My problem is the first step - connecting to the web service and sending/receiving the messages. WebSVC (the InTouch web service client) cannot handle the basic authentification, even failing to connect when including username and password in the link (which works in any browser). Guides on that topic are often outdated, or don't match the problem at hand.
As my knowledge of databases and web programming is limited, how can I use the web service (in a preferably uncomplicated way)? Performance doesn't matter - the database handles less than 10 requests per minute on average, and delays don't disrupt anything essential.
To quote Jeroen Mostert's comment: "if you're on Windows, PowerShell's New-WebServiceProxy allows you to wire up SOAP services quite easily, and inserting things into SQL Server from it is equally simple (Invoke-Sqlcmd)."
This approach works. To sum up the steps until I got an answer from the web service:
Upgrade to PowerShell 5.1 (Win7 VM didn't have it)
Set up WebServiceProxy by microsoft guide
Add credentials, attributes and test method by external guide, solving the authentication issue and getting the required input format

What technology to deploy RESTful Server with SQL+COM capability

We're developing a cloud based web application for customer management. One of the main goals i the capability to connect to different local applications on the customer endpoint.
As example, we don't want to have a customer database in out application, the customer should be able to search within his local ERP system right away.
What we need is not much. Only a client on the customers server with access to the local SQL server as well as the COM model.
But as webdevelopers and mainly going with PHP the question came up, what technology we should use?
I've got two approaches in mind:
NodeJS
Lightweight, Javascript and with the Express and winole32 extension we should have everything we need. But the deployment and installation as a service seems to be a bit wacky.
C# .Net Web API
Also a good approach I guess since the client servers are allways windows. But is there a way without IIS?
Or do you have something completely different in mind? It should be very fast and compact. So its basically just a RESTservice that can be deployed with ease.
Thanks for your inputs and thoughts.
C# .Net Web API Also a good approach I guess since the client servers are
allways windows. But is there a way without IIS
It is called OWIN and it is properly documented (web api self host is a good keyword) and works like a charm. Using that on various services to expose an API into the service.

Silverlight Sharepoint 2010 web part windows authentication

I'm trying to authenticate my silverlight application to get windows user name, which then I use to get some further information. Have looked it up, but the answers I found were about configuring the web service to get it. Is there a way, to get windows credentials strictly in Silverlight? I cannot find .Credentials, the only thing I see is .ClientCredentials, but apparently it doesn't show the required information. I am getting the string "System.ServiceModel.Security.UserNamePasswordClientCredential". It actually allows me to set up the name, not retrieve it. Also there is a web service called authentication.asmx, but as before it applies to other purposes. Neither do I have any web service I could reference to and configure them. Or am I missing something? Perhaps I can retrieve the windows credential by NTLM or Kerberos? I am using Visual Web Developer 2010 Express with Silverlight 5.
My Experience is that the Membership framework that is present in the asp.net world is not available in silverlight. In order to achieve something similar I had to implement a web service (WCF) that was directed at the domain's active directory (ldap) server. Silverlight is a very strict framework in terms of interoperability, its good for security but has some limitations.
I am not sure about your level of knowledge of the active directory but here is a link that deal with a lot of the possible operations and has sample C# code to go along.
http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C#40a

A starting point to create a web service?

I have built an ERP for a small company using MS-Access (front end) and SQL Server 2008 R2 as database. Now one of their clients is implementing "SAP Business one" and I am asked to provide a web service for that SAP to enquire our database for stock availability.
I don't really know where to start. I have seen there are native web services in SQL Server, but MS seems to discontinue that.
From what I have googled, I understand that REST is not appropriate, because we want the service to be restricted to identified clients, so we would have to go for SOA and WCF ?
Is that correct or stupid ?
I am looking for links / books, or very simple code samples (if that exists).
I have already found Good starting point for learning to create ASP.NET SOAP web services and https://stackoverflow.com/q/296040/78522.
Any suggestion welcome, thanks.
Edit: just for the info: I have found these 2 links quite usefull, specially the 1st one, which is really "quick and practical", ideal for a total newbie in the field.
on w3schools.com
on siteduzero.com (in French)
Windows Communication Foundation
Windows Communication Foundation Walkthrough
https://stackoverflow.com/questions/386801/wcf-book-recommendations
I understand that REST is not appropriate, because we want the service to be restricted to identified clients.
This is not correct. REST services can have security, and most of them that I'm aware of do. The common ways to do this are:
Use HTTP authentication (basic or digest). Most languages will already have libraries to handle this for you.
Define some other way of logging in. Some REST services accept a username and password and return a cookie. Some use OAuth. Twitter is a good example of this.
Don't use login at all, just validate that the client has some sort of token or password (probably sent as a cookie).
Use any other form of security that works over HTTP.

SharePoint 2010 Silverlight application server object model?

I am currently getting myself up to speed with SharePoint 2010 and I am working my way through the different way SharePoint can expose silverlight applications.
As I understand it, the client object model is more restricted, and is for other applications to interact with SharePoint via WCF for example. An example would be a custom build system that retrieves reference data from SharePoint lists.
The server object model provides more functionality in SharePoint. One example is code written for a web part.
I have been told to deploy a silverlight application, you create the xap, make it accessible by SharePoint web front end, create a silverlight web part and point to it.
So, my question is, assuming what I have previously mentioned is more-or-less the case, can SharePoint access the server object model or is it the same as an external system for example, and uses the client object model?
I am learning all of this so happy to receive feedback on anything I may have not understood correctly.
You would access the client object model from Silverlight. Silverlight is a client. It runs in the user's browser, so it is not on the server, and therefore cannot access the server's features except via service calls. The client object model will provide you direct integration with various lists and functions, and makes it very easy to integrate.
Check out this video for more:
http://channel9.msdn.com/learn/courses/SharePoint2010Developer/ClientObjectModel/SilverlightClientObjectModel/

Resources