How to make Windows authentication in ASP.NET MVC using LDAPS - c#

I want to build a web application where a user logs in using his windows account through a login form. In this application I'm gonna have to use LDAPS (and not LDAP). I've been searching on internet for a tutorial to guide me but I found some code snippet on forums of people that are having trouble with their code. I couldn't understand where to put that code or why I should put it especially that I'm very new to ASP.NET.
Could you please provide me with some information or links that can help me ?
Also should I use ASP.NET MVC or ASP.NET WEB API?

Related

GoogleDrive let user authenticate

I'm trying to implement GoogleDrive into my .net application
but on the tutorial i'm using from http://www.daimto.com/google-drive-authentication-c/ it says that it simply send the user to a login page of GoogleDrive but the question is where ? i don't see any code that sends the user to a login page.
so my question is how can i let the user authenticate before starting of?
Trying several days now and i don't have a clue how to do it.
hope someone can point me to the right direction.
What you are looking for is called External Authentication Services with ASP.NET Web API. MVC supports many external providers and is reasonably easy to implemented them within Visual Studio and a MVC project.
For implementing a login from ASP.NET have a look at the OAuth 2.0 Web applications (ASP.NET MVC). You can also have a look at this MVC tutorial MVC 5 App with Facebook, Twitter, LinkedIn and Google OAuth2 Sign-on C# - it contains exactly what you ask for - a redirect to the Google login page.
The Access-URL's are embedded into the Nuget-Package Google.Drive.API.v2/Auth/Client - when you use the assembly/the classes the url's are internally known:
A thorough explanation (and also the URL's when using pure REST to access the service) could be found here GDrive .NET Quickstart and here Using OAuth 2.0 for Server to Server Applications

Authorizing Twitter with ASP.NET MVC App

I have an ASP.NET MVC app. I want link a Twitter user's account to a user account in my app. Previously, I was using Twitterizer. However, from my understanding, that library will no longer work because Twitter changed their authorization approach. With that in mind, what library is a C# developer recommended to use?
Does anyone know of a library that a C# developer can use to get a Twitter users access secret and access token?
Thank you
In new ASP MVC 4 template you have all work done and ready to use:
http://blogs.msdn.com/b/webdev/archive/2012/08/15/oauth-openid-support-for-webforms-mvc-and-webpages.aspx
You'd be hooking into their authentication system using OAuth. There are some pretty effective libraries for this kind of thing for .NET, check out twitter's dev site for the most up to date ones:
https://dev.twitter.com/docs/twitter-libraries

What are the Steps to use google & twitter login plugin for registration in asp.net web application c# 2008

Hey i am developing a asp.net web application.I need to know to how can i use google registration for making users register into my site. For that i need to fetch basic info like name,email,dob, gender,location etc. I was able to fetch facebook info.But i am stuck at collecting info from google.Can anybody tel me the basic steps needed to get the basic info from google.How to use the api?or please direct me to some useful links so that i can get a clear cut idea?My working platform is asp.net C# 2008.Framework version is 3.5. It will be very helpful if any suggestion/example from framwork 3.5...
Thanks in advance.
Have you tried DotNetOpenAuth?
Tutorial : http://www.dotnetopenauth.net/developers/help/programmatic-openid-relying-party/
Example : http://visualstudiogallery.msdn.microsoft.com/81153747-70d7-477b-b85a-0374e7edabef/

Can we use Authentication in 'Forms' and as well in 'Windows' for a .net web application

We have an application in Access for UI and MS Sql server as Database server. We now decided to build a new application in web application for UI. This web application is only used by the employees who work for the company. But later we decided to host this web application on outside server. So the user (from this company only.) can able to login anywhere in the world. First I thought creating the web application using 'windows' authentication thinking we may be using it as an intranet web application. But now my manager asked me to use both 'Forms' and as well as 'Windows' for using this application and this web application will be hosted on outside server. I really don't catch his point of using both types of authentication.
Please help me is there any ways to use both authentication methods and please also suggest me why we might need to use both authentication methods. If so could you please help me with some instructions of using the both authentication types. Thank you so much for taking time to read and understand my question and helping me in this regard.
#Will explained in his comment as to why both forms of authentication is preferred. The following article shows one way to implement what you need.
You may also want to check the following article to better understand how Windows Authentication works.

Implementing DotNetOpenid in my asp.net website

I am trying to implement DotNetOpenid in my asp.net website. However, the more I try to read up on DotNetOpenid, the more confused I get. My initial goal is to allow user login process (similar to StackOverflow).
I attempted to get some help via this question dotnetopenid tutorial
but was unsuccessful (since I am not using MVC)
How can I get a tutorial that would help me accomplish that?
I would first start at the developers site
Coding Guidelines
Quick Start
Code Snippets
I have been posting my questions here Support Forum. Pretty helpful.
The ASP.NET OpenID web site (C#) project template isn't a tuturial, but it does create a functioning OpenID ASP.NET web site.
I just installed it and was able to get a site up and running. Here are a few gotchas that I ran into:
When you create a new project using the template, do not choose a deep path - this will create problems during database creation.
When you first run the application, you'll hit an exception - don't worry about it. When you get the YSOD, simply browse to the Setup.aspx page mentioned in the instructions.
If you don't have an OpenID, you'll need to get one. The initial page loaded after database creation has a 'Get OpenID' link if you need to get one. It's a simple process and only takes a few minutes.
Once you get through that, you'll have a working implementation of an OpenID web site.
You might also want to check out the DotNet OpenAuth ASP.NET Controls.
HTH
Edit
For anyone interested, there is also an ASP.NET MVC 2 OpenID web site (C#) template. I'm surprised #Andrew Arnott answered the other question and didn't mention these, since he is the author.

Categories

Resources