Looking for any recent examples using OAuth with OData pref. from a WPF client without AppFabric or other dependencies
found this year+ old article
http://blogs.msdn.com/b/astoriateam/archive/2011/01/20/oauth-2-0-and-odata-protecting-an-odata-service-using-oauth-2-0.aspx
which requires AppFabric
another from DevEx also a year+ old but the sample doesn't compile
http://community.devexpress.com/blogs/theonewith/archive/2011/02/24/odata-and-oauth-part-1-introduction.aspx
all the other search results refer to these 2 sites
wondering if there's been any new developments over the past year to build upon
ASP.NET 4.5 WebAPI will support both oData as well as oAuth out of the box. If you are starting a new project I would recommend looking into that one.
Scott Gu's last info is that the ASP.NET WebAPI beta oData is already supported and oAuth will be shipped with the RTM.
Based on past experiences with ASP.NET versions, the availability of the RTM is not for too long.
You can read about the ASP.NET WebAPI (also see comments):
http://weblogs.asp.net/scottgu/archive/2012/02/23/asp-net-web-api-part-1.aspx
Related
Based on the answer here: How to explain Katana and OWIN in simple words and uses?
Regarding the comment above, OWIN is not a framework. OWIN is a
specification on how web servers and web applications should be built
in order to decouple one from another and allow movement of ASP.NET
applications to environments where at the current state it is not
possible.
Prior to OWIN, when you are building ASP.NET application, you are
inheritedly bound to IIS due to the heavy dependency on System.Web
assembly.
System.Web is something that exist ever since ASP (non .NET version)
and internally contains many things that you might not even need (such
as Web Forms or URL Authorization), which by the default run on every
request, thus consuming the resources and making ASP.NET applications
in general lot slower than it's counterparts at i.e. Node.js.
So OWIN itself does not have any tools, libraries or anything else. It
is just a specification.
If OWIN is just a specification with Katana its .NET implementation in order for ASP.NET applications to not be bound with IIS, then in the case of ASP.NET Core applications working with Kestrell and another webserver like nginx (acting as a reverse proxy) why we would still need OWIN?
ASP.NET Core is an evolution of the Microsoft.Owin.*, what Microsoft refers to as Katana.
The Microsoft.Owin.* libraries are not available for .NET Core because ASP.NET Core has equivalent replacements for them. See https://learn.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/
I have recently found that the Twitter API V1 is no longer working and I need to migrate to V1.1. I am getting the following message:
"The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview."
http://search.twitter.com/search.atom?q=Twitter&rpp=30
However, after reading all the documentation and realising that I need to use OAuth with this new version I cannot find any C# code to use in ASP.net as a starting point. What I am looking to do is search for a list of keywords and download all tweets for this keyword. It was working up until last month using API v1. Does anyone have any support material that shows this type of solution? The only ones I can see are downloading and displaying a user's timeline.
Thanks.
There are several open-source .NET libraries that would be great places to check out.
TweetSharp - GitHub repository
Twitterizer (no longer updated, but code is still valid) - GitHub repository
TwitterVB (no longer updated, but code is still valid) - GitHub repository
(Full disclosure: TwitterVB is the library that I wrote. I recommend you start with TweetSharp).
I am looking for guidance on how to start building a http REST server using C# and a SQL Server database?
Is there a recommended server framework for http web server? The same for REST services?
How should I start? Raising regular server and after that taking care of the SQL Server database?
Thanks.
I'm starting to evaluate REST frameworks for .Net and python. So far I like ServiceStack for .Net the best. It's simple, far easier to config than WCF, supports dependency injection, and seems to be fast.
When VS 11 and .Net 4.5 are completely released, Microsoft is also offering Web API. It can be used to build REST API's as well so it's worth looking into.
I haven't done enough research on Web API to see which would be better but those are some considerations for you.
Use OData. Have a look at Creating an OData API for StackOverflow including XML and JSON in 30 minutes
Consider using the new ASP.NET Web API:
ASP.NET Web API is a framework that makes it easy to build HTTP services . . . ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
It is currently in beta but was built specifically for building RESTful HTTP services in .NET, unlike WCF. See SO question WCF vs ASP.NET Web API for more details.
There are samples and video tutorials, and in one they are using Entity Framework models which can be backed by SQL. This SO question specifically covers that example: How to mix Entity Framework with Web API
I've been looking on how to create profile links like in Facebook "www.facebook.com/profile_name"?
Anyone knows how what is the term for that or links for that tutorial in ASP .Net C#?
EDIT:
What I'm trying to achieve here is to create a link for each member that could redirect to their profile page.
Here is an example of the link: www.mywebsite.com/Member_Name
I'm using ASP .Net Framework 3.5
Thanks
I think you're looking for mod_rewrite.
Search the web for apache mod_rewrite or friendly URLS to get up to speed on this topic.
http://en.wikipedia.org/wiki/Rewrite_engine
So it seems you are talking about Url rewriting or routing.
I would suggest using Asp.net Url routing, which is supported Asp.net 3.5 SP1 onward.It's what asp.net mvc uses.
Rewriting:
See this SO answer and this article on the difference between routing and rewriting. (This is to do with IIS/aspnet)
Url Rewrite is at the IIS level, for newer versions of IIS there is a URl rewrite module. See this. For older versions of IIS there is this open source module.
Routing:
Asp.net 3.5 SP1 onward supports routing, which is at the application code level. It can do what you want, something like www.mysite.com/username instead of www.mysite.com/User.aspx?id=1234. See this article and this MSDN article for more info on this.
This question has two related parts.
First, I'm looking for a a small example of how to handle a series of RESTful URLs, such as /Account/{userName} and /Account/{userName}/Profile with a single HttpHandler.
At this time, I'm not interested in embracing MVC or using the REST Starter Kit.
Should I place the HttpHandler class in a Class Library? Should I publish to the root of the RESTful URL?
My second issue stems from the fact that my ASP.NET hosting is done through a web-hosting company. Will I need to ask their tech team to configure IIS for me? Is that normal practice?
This is already built into ASP.NET 3.5 SP1 with the UrlRoutingModule. For details check out this article. If a hosting company supports ASP.NET 3.5 SP1, it will support this.