Can we use rest api in ASP.Net? - asp.net

I am new in Rest Api and I am using this api in SharePoint but I just wanna know that can I use Rest Api in Asp.Net with web forms.
Please let me know if we can do this or not ?

Yes you can do it it's simple you can get help and learn about your first WEB API from here.
[REST Web API][1]https://learn.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
you can access it via third party tool also like PostMan and etc.

OFC that you can. There is a framework called ASP.NET Web API. https://www.asp.net/web-api

Related

How to integrate .NET web application project (API) with Apache Cordova Project?

So this is the issue:
I have a .NET project that includes 5 Web Application Layers.
One of them is API.
I Recently added a Cordova project as well and I'd like it to communicate with the API Layer.
Is there anyone who knows what to do?
P.S.:
I use visual studio 2013.
You can use normal jQuery Ajax calls to make requests to the API. http://api.jquery.com/jquery.ajax/ or just normal JavaScript ajax https://stackoverflow.com/a/8567149/487940.
I hope that answers your question.
If you're talking about calling into Web API web services from a Cordova app, you may find the Breeze.JS framework useful to help you. You can either just used the client library or use some server side code in addition to client code to help get you up and running and exposing new web services as well.
Otherwise it is simply a matter of making web service calls to the server from your JavaScript code but the specifics will depend on exactly what you're trying to do and what client UI/utility framework you are using.

symfony2 project for web and mobile app

I want to build an application for web and also for android. The application will have a database, and users should be able to login and perform some actions.
In Symfony2 documentation you can find all the information about how to create a web site, also there is information about how to create a symfony2 REST API.
However it is not clear for me, how to create a symfony2 web site that consumes a symfony2 REST API, and also (as it is a web service) be able to use the same REST API to consume from my android app
Any idea will be really appreciated
I am new using symfony2
Thanks
You can build your REST API easily with FOSRestBundle. There is a nice tutorial on the subject here.
In building your website, you have some options.
You can query the database directly in your controllers.
You can query your REST API in your controllers using cURL.
You can query your REST API in your views use jQuery or just AJAX.

Building a RESTful API in ASP.NET

I have seen a ton of sites on tutorials and how-to's for building your own RESTFul API using ASP.NET. All of them seem to use MVC though. Is it possible to build my own RESTFul API using ASP.NET and WebForms, without using MVC? If anyone has links to a tutorial or something, that'd be great!
Use ASP.NET Web API. It will be the canonical HTTP API server framework moving forward.

Client for Custom OpenId provider in Asp.Net web application

I am relatively new to asp.net so sorry if the question sounds silly.
I have to build an Asp.net web application able to login on a OpenId custom server (i.e. not included in the DotNetOpenAuth library). I am using vs2010 and .net framework 4.0.
After many searches I found these posts where it is explained.
http://blogs.msdn.com/b/webdev/archive/2012/08/23/plugging-custom-oauth-openid-providers.aspx
How to use OpenID providers with unique identifier URLs in ASP.NET MVC4
http://blogs.msdn.com/b/webdev/archive/2012/08/15/oauth-openid-support-for-webforms-mvc-and-webpages.aspx
All of them refer to MVC and to a directory/file called /App_Start/AuthConfig.cs where you have to register your new provider in order to be able to use the client that comes built-in with the library.
From other searching I have understood this directory is not available in Asp.net web application.
Does exist a way/workaround for achieving the same results in Asp.net web application?
Do you have any suggestion/link on how to implements such custom client in my server?
Thank you
stmod
thanks for your help.
After your comment I was back to the provider for asking clarification, but so far, they cannot help me more than providing that link.
So I tried to manage it working in Java and I did it using openid4java library and the following code:
URL u = new URL("https://logint2.idm.toon.sul.t-online.de/gcp-web/login/10000112/");
Identifier i = new MyIdentifier();
*//myIdentifier is my implementation of interface openid4java.discovery.Identifier and returns* "http://specs.openid.net/auth/2.0/identifier_select"
DiscoveryInformation discovered = new DiscoveryInformation(u,i);
AuthRequest authReq = manager.authenticate(discovered, returnToUrl);
With this code (and others for managing the response) I have it working.
I am trying now to apply the same to my dot.net solution.
Can you help me in writing the code for having the DotnethOpenauth working with this endpoint?
I think I have to override the Identifier class as I did in Java, but I am stuck.
Thanks stmod
Adding OpenID Relying Party support to your ASP.NET web application is actually quite easy, and does not require an AuthConfig.cs file. If you are using web forms, the easiest way to go is just drop an OpenIdLogin control onto your web form. If you are using MVC, it's just a few lines of code to write, and you can check out the OpenIdRelyingPartyMvc sample that is included in the dotnetopenauth .zip download from SourceForge to see how it can be done.

ASP.NET chat client

What's my best bet for implementing a simple chat client (2-person) in an ASP.NET 1.1 application? I'm using ExtJS for the front-end so if it integrates well with that it would be great.
It's possible using web services and AJAX but you'll have to hand code it all if you're using 1.1.
if you just look for free see this
http://steveorr.net/Articles/WebChat.aspx

Resources