Onedrive wcf web service [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Hi I'm developing a wcf web service that integrates with OneDrive and I need to access to the files (list, delete, download and upload) of the users that use my web service.
Is there a way to use Onedrive in an easy way? maybe some C# API...
I found the Live SDK but I can't understand how to use it, then there is SkyNet but I don't know how to use it and if it works with OneDrive.
In case I would have to use REST calls, can you explain how to authenticate and list file with REST?
thank you all

The main challenge you'll have with writing a WCF service is doing authentication. I'm not aware of a straightforward way to proxy authentication with your WCF service into the OneDrive service. The easiest approach would be to have the caller of the WCF service handle generating the auth token (see the examples for how to generate an auth token in the OAuth reference) and pass it to your service as one of the call parameters.
After that, you can use the Live SDK to make server-side calls using the token provided to your service from the caller as a parameter to your WCF method. You can either use the Live SDK to generate those calls, or you can make them yourself following the REST reference. Neither give you an object model that you can interact with, you'll need to understand how the REST service works and the structure of the returned JSON data to use the Live SDK.

Related

How to implement ASP.NET MVC fetching its information from a remote web-service? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have an android application which fetch its information from a web-service which itself apply some rules to information read from database and returns it to android application.
Currently I'm going to develop a web application which mimics android application and use it temporarily for iOS users.
I'm going to use an ASP.NET MVC application for this purpose (since I know ASP.NET MVC) and implement it like architecture represented in below picture:
Prior to this I have developed web-api and asp.net MVC application but both of theme were reading information from database but currently I'm going to read information from a remote webservice and I don't know how to do this?
I want to know which method or APIs should I use to fetch information from remote database and populate my models.
For the actual retrieval of data, you can use HttpClient to send requests to your remote web service and get data from it.
For accessing the data internally, you can do this by implementing the Repository pattern to create the internal interface(s) for getting data to your controllers (or services first if needed).

How to integrate Quickbook web connector with Web API [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I was told to integrate our application with QuickBook Desktop version. When i checked about that, Connecting via WebConnector seems promising. But all the documents and samples are created with WebService.
But i want to implement the functionalities with WebAPI. Is that possible and that will work without any issues (still in research, so i haven't tried it yet)? i have searched for reference but no help. May be i looked in wrong places.
Secondly, the webservice example uses qbXML to send and receive data with WebConnector. Is there any possibility that i can use Interop library QBFC ?
Any help appreciated thanks.
Note: I have referred the Samples and Docs that comes with SDK
But all the documents and samples are created with WebService.
You should use the Web Connector, which requires you to implement a SOAP web service.
But i want to implement the functionalities with WebAPI.
No, QuickBooks desktop does not support a REST API of any sort natively (though if you want to pay, Autofy http://www.propelware.com/ has a solution for you).
i have searched for reference but no help. May be i looked in wrong places.
You should probably start with Intuit's documentation. There's literally a 100+ page PDF on specifically the top of integrating via the Web Connector, and several hundred more pages on QuickBooks integration in general - install the SDK and look at the included PDF docs:
https://developer.intuit.com/docs/0200_quickbooks_desktop/0100_essentials/0000_overview
Is there any possibility that i can use Interop library QBFC ?
QBFC can generate qbXML requests. So you can use that to generate qbXML requests, yes.
You'll still have to implement some web service components though - you can't use QBFC to natively talk to QuickBooks desktop from a web app.

Restful service with WebAPI and MVC as client architecture [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am building a restful web service api using ASP.NET WebAPI. I'll be consuming it with MVC as a web application and eventually in a mobile app. I want to make the api standalone and not couple it with the MVC application.
I am having trouble figuring out how the authentication should be structured. I need the api to be consumable only from a specific sources(the web app and the mobile app). However, I dont know how to link the authentication in the WebAPI with the MVC one. New users should register in the MVC and their auth info should be supplied to the WebAPI. I'm using the Individual accounts Identity system for the project.
In short, how to use the same authentication for both the Api and the Client? Should they be deployed to the same domain?
I recently did something similar.
I think you have 2 issues here:
You want to only accept Web API requests from known sources.
You want to authenticate the user.
For number 1:
You want to add authentication to the Web API Request. This could be basic authentication, but it shows the call is coming from a known application. By using this, you know where the call is coming from. Despite what you read, Basic Authentication is ok, but only if the call is over a TLS (HTTPS) connection . Otherwise the call could be seen and the authentication could be used in a replay attack.
For number 2:
You could have a method that the user can call, such as a login request, where the user can be authenticated and, if successful, issue them with a token. JWTs (Javascript Web Tokens) are one token that you can use. Then the token can be sent with each subsequent call. However, please bear in mind that they can be a pain to use!
It depends on how tight your security needs to be. It might be that basic authentication, along with TLS might be enough for you.

Using iOS for existing .Net MVC database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I currently have an MVC 4 app running on a Windows Azure website. Some of the users need to use the app, but may be at a location without internet access. The goal is to have an iPad app with offline capability, and will push the changes to the Windows Azure database when an internet connection is established. I am in the planning process, and I have questions about how both apps can use the same database concurrently. When I create a Windows Azure Mobile Service and use the same database the Azure dashboard does not show the existing tables used by the MVC app. Is it possible for both the iOS app and MVC 4 app to use the same tables, or am I going to have to go a different way? Thanks.
You would have to write web api against your database,its very easy to Write Web Api 2 that can easily communicate with any sort of device or application because it is HTTP based.I personally have done this. Web api returns xml or JSON based data you can use this to populate your local database in your iOS Application.
You can also implement some logic to save data back to the database when you got connected to the internet.
The iOS app should absolutely not connect directly to your database. I actually don't think it's possible through the iOS SDK to do that if you wanted to, anyways, but just in case: don't.
Instead, your iOS app should connect to an API that you will need to build. The API, alone, will interact with the database. You can also retrofit your existing website to use the API as well, removing database concurrency issues entirely.

which one to use : Web Services or WCF Services [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
We have a c#net windows application. now our company decided to develop a web application using asp.net to support some of the windows application functionality on the world wide web.
so we are going to deploy some services in our windows application an let the web application to use them.
Which one is the better choice : deploying WCF services or Web services ?
Web Services is a name for services that are reachable over the web infrastructure. Classically that has meant SOAP services, but the last years REST and REST-style (JSON over HTTP but not employing full REST semantics) have grown more popular.
So first you have to choose what kind of API you want to expose: SOAP or JSON over HTTP.
Second, you need a suitable framework for implementing such a services for SOAP services WCF is the right choice. asmx services are deprecated. For JSON over HTTP you can use WCF, but WebApi is easier to work with.
WCF are more complex and powerful than ASMX. However, that also means it takes a lot more effort to write them and a lot more knowledge to handle them. ASMX are super easy to write. Unless you specifically need features in WCF, go with ASMX. That said, there's also the option of ASP.NET Web Api which is the most recent service framework. It's similar to ASMX but much smarter and nicer to work with. I would recommend Web Api if you can use it in your situation.

Categories