HttpContext.Current.User on a Linux, Nginx server and Node JS? - node.js

I am working on an Enterprise web application for a large company.
The application will be hosted on their internal servers and will be accessed from employees' PCs (Windows 10 only).
Currently, all their internal web applications are written in .NET and they are recognizing users using HttpContext.Current.User.Identity.Name.
I will be running my application on Ubuntu with Nginx and Node (a very strange beast in a world full of .NET apps).
Will I be able to identify their users using the HttpContext also? If not, is there a workaround/different approach?

Related

The web server built-in Azure app service

Background:
I am hosting a static web app, generated by NUXTJS on an Azure App Service.
Now I want to configure something more by the web.config like set CORS setting for multiple domains.
But I cannot find any document to figure out what kind of web server has been integrated/installed within the azure app service.
Questions:
Maybe an IIS if the platform is Window based, otherwise Apache when creating AAS in Linux based. Is it correct?
And what is the corresponding version for each?
There are different HTTP server approaches in App Service for Windows and App Service for Linux.
Azure App Service for Windows runs on IIS with the use of modules.
.NET Core apps in App Service on Windows are hosted by ASP.NET Core module
Node.js apps in App Service on Windows are hosted with IISNode.
The IISNode project provides a native IIS 7/8 module that allows hosting of node.js applications in IIS 7/8 and IIS 7/8 Express.
Python 2.7 and Python 3.4 is by default is installed on App Service in root folders on the server
Java apps in App Service on Windows are hosted with Maven plugin
Azure App Service for Linux works a bit differently.
https://anthonychu.ca/post/jekyll-azure-app-service-linux/
App Service for Linux comes with a bunch of preconfigured containers such as Node, PHP, Java, Python, Ruby and .NET Core.
https://learn.microsoft.com/en-us/azure/app-service/configure-common#configure-language-stack-settings

Consul and IIS hosted applications

I'm trying to to use Consul to implement service discovery in a microservice architecture.
I've tried to setup my dotnet core 3.1 application to self register with Consul, and I have 3 VM's running Consul, automatically picking a leader of the 3.
Reading numerous examples online, they all have one thing in common: I need to know the URL of my microservice. Now, using IIS I have 2 options when it comes to hosting; Sites and applications. Sites have a certain URL connected to them (Example: http://api.microservice1.com) whereas application use the servername in the URL (Example: http://webappserver1/microservice1).
As I have 2 servers (Let's say webapp01 and webapp02) I can't know what server the service is running on, and therefore I can't seem to find a solution as to using IIS applications instead of IIS sites. My service would be one of the following routes:
http://webapp01/microservice1
http://webapp02/microservice1
Is there a way for me to use IIS applications and not sites? How would I register my microservice with Consul? Perhaps I'm just forced to use IIS sites and not applications?

Self Hosting Web Application versus IIS Hosting?

I am in the process of building a Web based client for a Server application which is running as a Windows Service. The server application currently has a Windows Form based Client Application written in C# and the idea is to obsolete it and provide a new Web based Client Application. The Server application will be exposing REST based APIs and the Client Application would be using the REST APIs to communicate with the Server Application. (Currently the Server App exposes SOAP based endpoints which are consumed by the Windows Form Based App)
The Browser based client application would be written using Angular JS. The Client Application would be used by at max 10 concurrent users. The App is targeted for system administrators and would be used inside the enterprise environment.
Another requirement is to integrate Active Directory Authentication for the Client Application. So given the performance requirement and authentication requirements, I am wondering whether I should use IIS for hosting the Web Application. Or should I just use the existing Server to self host the web pages.
If at all I go with Self Hosting option, would Katana Self host be a good option? Or should i use WCF Rest kit to serve the pages?
What are the performance implications of using a Self Hosted mechanism for hosing the Web Application compared to IIS?
Any suggestion would be greatly appreciated.
WCF REST Starter kit is still in second preview 2 version from 2009 so I'd be pushed to recommend using it.
The question of IIS or self host depends, do you need the features that IIS has out of the box like logging, restart after failure, etc?
My suggestion would be to use ASP.NET Web API (or Nancy, which is an excellent choice too) but keep your hosting layer separate from your application layer so you have the flexibility to decide how you host your service later on.
The second suggestion is performance test early on, pick a hosting mechanism and measure how the service copes under load - you may find out that you're worrying about something that you don't need to.

Single Sign On with NodeJS on Linux Server in Windows domain network

in the company i work for we've got a lot of windows 20xx servers.
we're using an active directory domain controller for authentication.
programs like SharePoint or Dynamics CRM 2015 (hosted on IIS of course) don't need a separate input of user credentials when opened in IE. you open it and you're logged in - magic :) i think it's something that only works with IIS?
i'm developing AngularJS applications with a NodeJS backend. NodeJS backend runs on linux machine, AngularJS app is hosted on the same machine by Nginx webserver. everything is in the same network.
is there any way to authenticate a user in my AngularJS app hosted on that linux machine without asking him/her for his/her credentials? a working solution that doesn't require IE would be best case.
thank you very much!

Confused about terminology and concepts used in IIS

I am a little confused about some basic concepts about Microsoft IIS 7 (Internet Information Services). Could anyone give me concise definitions on the following terms:
Host
Site
Web Application
Virtual Directory
Application Pool
Especially: what's the difference between Site, Web Application and Virtual Directory?
Update - 1 - 8:49 AM 12/20/2010
A related topic: Difference between web site and web application
Some "quick and dirty" answers:
Host: The machine that is hosting IIS (can be a physical machine or a virtual machine).
Site: A website that is not the child of another site.
Web Application: A website. Usually if they are referred to as "web applications" then they are very data driven and it is not a static site.
Application Directory: Essentially a child website. It can have its own application pool, but settings can also be inherited from the parent website (HTTP handlers and HTTP modules for example). You didn't specifically ask about this one, but I added it as it may have been what you meant by "Web Application".
Virtual Directory: A directory of a website that has a physical location that is different than the website itself. One common use for this is to have a web farm, but some of the content is located on a shared resource (such as a SAN or NAS). This prevents the need of replicating files between all servers of a web farm. There are other purposes of a virtual directory, but this is the main reason I've used them in the past.
Application Pool: The process that a .NET application runs as. This may be used by things over than .NET, but that's the only piece I know that currently uses application pools. Essentially this holds the user and other information that the .NET application runs under. For instance, if you are using a trusted connection to SQL Server (SSPI), then by default, the user it will connect to the database as the user that this process is running as (unless you have impersonation in the web application set). This is also the user that will be used if the web application accesses system resources.

Resources