Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to have a NodeJS app under iisnode authenticate with ASP.NET FormsAuthentication?

1) We have a NodeJS app that we need to host under IIS 7.5/Win2k8 R2.
2) We have other apps that already use ASP.NET FormsAuthentication. 3) The users that will use the NodeJS app are the same users as existing apps' users.

So we put FormsAuthentication config settings in web.config and it is being read by IIS:

[ IIS > Sites > {iisnode-site} > Authentication ] - can't post images yet!

However, it completely ignores the configuration - so I thought maybe iisnode module was being called before FormsAuthentication Module, but when I look at the modules list (ordered view), it lists iisnode at the bottom for this site, while FormsAuthentication module is listed above iisnode.

Is this even possible? I saw on another post @ Intercept requests for iisnode with HttpModule which may be work-around, but such approach means we need to roll a XHR header proxy (of sorts) - which we can do, but as a last resort.

like image 654
offthemesh Avatar asked Mar 29 '13 00:03

offthemesh


1 Answers

In IIS manager, go to modules, find the FormsAuthentication module and uncheck "Invoke only for requests to ASP.NET applications or managed handlers".

From: IIS7 - making Forms Authentication to work for all the requests

like image 92
Michiel van Oosterhout Avatar answered Oct 20 '22 18:10

Michiel van Oosterhout