I have an ASP.NET website ( NOT web application ) and I'm looking at how to use Azure Active Directory to authenticate users for single sign on purposes.
The samples from the File > New Project use global.asax.cs to interact with middleware, eg the WSFederationAuthenticationModule_RedirectingToIdentityProvider method. Websites dont have the global.asax or a class that inherits from HTTPApplication
Can I use Azure AD to provide single sign on capabilities for an Asp.Net Website and if so how should I go about it?
Related
I have to create a new ASP.Net MVC web app. This web app will accessed by company users internally and externally. Users are already in active directory.
When accessed externally, authenticate using their AD username and password from login page.
Any reference would be helpful.
The easiest way is to use Windows authentication when creating the ASP.NET MVC site.
This requires your web server to be in the same AD as the users, so if you plan to have it hosted somewhere, that is not an option.
If you plan to have the server hosted somewhere outside your AD, you should take a look at ADFS or sync to Azure AD (you don't have to use Azure for anything else).
The built-in authentication methods are described in the Microsoft docs
I developed a rest api using ASP.net web api. When I deploy this rest api on iis, I need to create it as a web application under an asp.net web site. When I was deploying the rest api as a new web site in iis, then things worked fine. I was using the following Route api/{controller}/{id}.
When I created the rest api as a web application underneath asp.net web site project, I named the web application as api. I can't access the api methods now. Can someone point what I do wrong?
WebApi is based on global.asax and web.config configurations and you can't have 2 of these files inside in the same application. In the scenario you described, it sounds like you need to create a "Virtual Directory" in IIS for the second application instead of making just a "Sub Folder".
The Virtual Directory will allow you to declare a new web.config and global.asax where you set the new routings and configurations method for your second application.
For a full walkthrough on how you can perform this please refer to this site:
http://msdn.microsoft.com/en-us/library/vstudio/bb763173(v=vs.100).aspx
I would like to integrate my own ASP .NET Application into a Sharepoint site in a Page Viewer Web Part (via URL).
My Sharepoint is accessible via: http://subdomain.domain.com
My ASP .NET Application is accessible via: http://othersubdomain.domain.com
Sharepoint and the other application are hosted on different servers.
As the sharepoint and the application should be accesible from outside of my Domain (public via Internet) I use Basic Authentication for both.
Now when I open the Sharepoint site I have to enter my user credentials once and when I navigate to my Applicaiton within sharepoint I have to enter my user credentials for the ASP .NET Application a second time (same credentials, user from a Active directory domain).
Is there a possibility to integrate my application into sharepoint without the need to sign on twice and without the need to install my application on the sharepoint server?
Thank you!
I am deploying a flex application in sharepoint as a web part.
I am planning to use sharepoint user credentials for my flex application.
My flex application consists of various different user roles like author,reviewer etc .
An author should be able to see all the list of sharepoint users available and can make any number of them as reviewer or author . For this I require following functionality through sharepoint for my flex application:-
1) Getting list of all users of sharepoint
2) Getting the username of the current logged in user of sharepoint through the flex application, which is deployed as a web part in sharepoint.
How to do this ?
Did this by creating a custom asp.net web service and deploying it on sharepoint.Through this web service , I retrieved current user and the list of users using share point object model.Flex inquires this web service for current user and list of available users
I need to integrate my sharepoint site and ASP.net site. So, First login will occur in the SharePoint site with Active Directory authentication and from there i need to traverse to ASP.Net site through a link. Now my question is whether its possible to pass my SharePoint Active Directory credentials to ASP.Net site? Will i be able to do this through a query string? Will i be able to navigate to and fro between SharePoint and ASP.Net sites.
The main point here is the user should not enter his credentials twice ( ie.. He should be authenticated automatically while navigating between two sites.)
What are the options available for me?
Do these things possible to achieve? SharePoint will be hosted using Windows SharePoint Services 3.0.
Thanks in advance,
ReplyQuote
Is the ASP.NET site on the same network? If so, then you can use AD (Windows Auth) for authentication on the ASP.NET site just like you're using it on the SharePoint site. You don't need to pass the credentials, and you can't anyway since all you have is an authenticated identity. If you configure the ASP.NET site to require Windows Authentication, you'll be able to get the user's identity from the server variables (AUTH_USER).
See How to: Use Windows Authentication in ASP.NET 2.0