HttpContext.Session is null behind Application Request Routing (ARR) - iis

I'm struggling with the following issue. The setup:
ASP.NET webforms application on .NET 4.
Session State by State Service.
Three webservers. All three host the webapplication. One is also acting as the ARR Controller.
Webserver 1:
Windows 2012. IIS 8. ASP.NET State Service. ARR Controller.
Webserver 2:
Windows 2012. IIS 8.
Webserver 3:
Windows Server 2008R2. IIS 7.5. ASP.NET 4.5.2 is installed.
While navigating/switching between the servers, the Httpcontext.Session is null:
HttpContext context = HttpContext.Current;
if (context.Session == null)
{
CurrentLogger.Logger.Info("Context.Session is null");
}
If I'm lucky, and the request redirects to the same server, It keeps the session.
The sessionState server is configured like this:
<sessionState mode="StateServer" stateConnectionString="tcpip=192.168.2.53:42424" cookieless="false" timeout="30" />
I've also set the machine Key:
<machineKey validationKey="[xxxxx]" decryptionKey="[xxxx]" validation="SHA1" />
I require all my cookies to be sent only over SSL. Using IIS logging I see that this isn't a problem. The auth & session cookies are beïng sent to all webservers.
What might cause my session to be null between the servers?

The solution is found here: https://stackoverflow.com/a/456238/167196.
To maintain session state across different Web servers in the Web farm, the application path of the Web site (for example, \LM\W3SVC\2) in the Microsoft Internet Information Services (IIS) metabase must be the same for all of the Web servers in the Web farm. The case also needs to be the same because the application path is case-sensitive.

Related

Selfhosted Asp.Net Core WebAPi with http.sys webserver deploy

I'm trying to deploy selfhosted Asp.Net Core WebApi. I replaced the default Kestrel web server with Http.sys. I'm deploying on a virtual machine with Windows Server 2016.
When I request the api locally (from the virtual machine) I can access it without any problems on http://localhost:61152.
The problem is that I can't access it from the host machine.
I opened the port 61152 in the Windows Firewall.
In the program.cs I have:
.UseStartup<Startup>().UseHttpSys(options =>
{
options.Authentication.Schemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM;
options.Authentication.AllowAnonymous = false;
options.MaxConnections = null;
options.MaxRequestBodySize = 30000000;
options.UrlPrefixes.Add("http://localhost:61152/");
}).Build();
I use asp.net core 2.0. I browse with the IP of the server which like this:
http://192.168.0.112:61152/
Also I have IIS running on the guest machine and I can see the default IIS page.
Can you please tell what I'm doing wrong or direct me to an article how to fix this.
Thanks
I found a solution. I just changed the http://localhost:61152/ to http://*:61152/

Issue in accesing a website hosting on weblogic server through IIS

We are facing issue while configuring IIS setup for weblogic servers.
Following are the environment details:
IIS8.5 on windows 2012 R2 standard 64x, wls_plugin_12.2.1.2.0 for weblogic server.
We have done the following steps:
Created a new web site on IIS.
Enabling the authentication settings.
Enabling the Directory browsing.
Added the script mapping in Handler mapping and set the path of iisproxy.dll as executor.
ISAPI filter setting for the iisproxy.dll
We are able to view the directory structure while accessing the IP and Port, but the request is not redirecting to the weblogic ip and port what we have configured in iisproxy.ini.
Is there any web.config or handler settings required to process the request?
The issue is that we are using wls-Plugin12.2.1.2.0 whose iisproxy.dll is not working in IIS8.5 on windows 2012 R2 server. After using the lower version of the plugin, able to access the web logic instance through proxy the IIS.
After that we are able to view the login page of web logic instance but not able to login to the application as it through s "404 Not found error". For this we have to change the handler mapping settings --> Request restrictions --> Mapping --> uncheck the invoke handle, restart the iis application and try browsing again. You will be able to login to web logic applications.

If deploy an ASP.NET Core as a web app to Azure, what is used for hosting?

ASP.NET Core out of the box supports hosting in IIS and self-hosting scenarios using the Kestrel and WebListener HTTP servers. Accordingly to web.config / project.json looks like IIS is used, but if so it is not clear for my "why" so, as now IIS is acting just as a reverse proxy and the application itself runs as a separate process using the Kestrel HTTP server.
So the main question is "what" and "why" is used by default, if deploy to Azure?
Yes, when you publish to Azure App Services, IIS is used to host your application. As you said, it acts as a reverse proxy to your application, which is running Kestrel HTTP server. But IIS does more than that - it also manages the application process through application pool, which includes or may include:
restarting the app when web.config changes
starting the app on the first HTTP request
running the app as a specified user
recycling the app pool (and effectively restarting the app) on certain conditions
starting multiple app processes
handle webdeploy (this is what happens when you hit "Publish" in Visual Studio

Minimum install of Shibboleth on IIS, when Deamon is on Separate Computer

I have a Shibboleth service provider (SP) served by a web farm with no outbound internet access (for security reasons). The web farm forwards authentication requests to the shibboleth daemon running on a computer that does have outbound internet.
Because of this separation, I'd like to minimize the installation on each box in the web farm. I have the following questions:
Is it possible to xcopy-deploy Shibboleth to the web farm, rather than using the installer? If so, what are the minimum files in addition to the isapi_shib.dll?
If using the installer on each server in the web farm is necessary, what folders/files can be removed post-installation? (For instance, I see I can disable the "Shibboleth 2 Daemon" service...)
And by-the-way I am using using http://www.testshib.org for integration testing.

Applications Session Timeout at IIS 7.5

I have two applications hosted at IIS 7.5 on Windows 2008 Server R2. One application is hosting at .net framework 4.0 and other on framework 2.0. Both have Integrated and Classic values for Managed Pipeline Mode property of Application Pool.
Issue is, at client machine only one application is login at a time, if I login to 1st application 2nd gone to session timeout and vice verse.
Please help and suggest which configuration is require at IIS end.

Resources