Session variables for classic ASP running on IIS7 - session

Seems that lot of people already know that issue but I can not find solution.
We transferred our web app from IIS6 to IIS7. For authentication purposes and some other functions we using session variables.
While on IIS6 we did not had any problem but now all users losing their time and patience because app variables are being lost somewhere between pages being submitted and as a result users get kicked out of the app.
Server is 2008 R2 with 64 bit OS.
Default installation by Dell so it should be running on 64 bit mode.
We do not have any third party elements or modules. All developed in-house.
Database obviously MS SQL 2008 as well, on the same server (I know it is bad but we limited in resources and money).
So does anyone know what is going on and how to fix this?

Resolution of that problem is simple: do not use any other port except 80.
As soon as I moved site to separate IP with port 80 (use of header on the same IP was not tested) -- all problem gone....

Have you deployed your application as a new website or a virtual directory on the IIS ?
Remember that for the methods in the global.asa to be executed by the server you need to deploy your application as a new website not just a virtual directory under an existing web site.

I think the best way is to add logging code to trace when exactly a session variable is lost; after a post back to the server, redirection, etc... to try to narrow down the causes.
good luck.

Look here for a solution...
the intrinsic checkbox fixed my problem

Related

PHP7 IIS10 Windows Authentication returning various different AD-Users in AUTH_USER and REMOTE_USER

I have a very annoying problem as shortly described in the title. As I don't know which settings would make sense to post here and due to the fact, that exactely the same web application was running before on a Server 2008 with IIS 7 seamlessly, I try to explain the occuring misbehaviour as good as possible. I'd appriciate your ideas or hints very much.
Our web application was running for years now on the 2008 server with IIS7, PHP5.6 in FastCGI Mode. We authenticate our users by "Windows Authentication" (NTLM/Negotiate) against Active Directory and therefor just letting the users enter their domain users credentials at start of the session. Actually we allways used named sessions like this: SESS_[TIMESTAMP] and looped the timestamp through the whole applications session untill it was destroyd by whatever - closing, leaving, etc.
Now we migrated the web application to a new Server 2019 with IIS10 and PHP7.4. The application it self works as expected and absolutely with no problems at all. The only thing causing a critical situation is as follows:
I enter the web application on my machine, enter the credentials and - as expectet - am in. I see my Username at the top, everything is ok. As I go through workflows and data manipulations it's also working correctly. BUT: If my colleague in his homeoffice now enters the web application and starts working at the same time as I do, very often I see his username at the top of my browser window and he is me... (???) As we both then press F5 sometimes, the session changes back and forth. As our users (inside company) work with security sensitive data, this is indeed a showstopper.
As far as I can say, I really checked all settings in IIS and php.ini against the settings on the old server and also searched the web for days now. With absolutely no success.
I even commented out the section at my sessions initiation that sets a custom session_name. And indeed I'm not using a custom folder for session files.
The only thing I'm quite sure is that the misbehaviour results out of a misconfiguration in IIS: If I only open a test-file with phpinfo(), I can reproduce the same behaviour. The AUTH_USER, REMOTE_USER and LOGON_USER are changing back and forth between another users DOMAIN\username and mine.
Does anybody have had this interesting but annoying behaviour also? Any ideas or hints where to apply the lever?
Thank you so much for your input.
New information to my question:
I found out that the most significant difference to the old server is a load balancer! It seams that the load balancing causes this problem as the old server was not balanced.
Any suggestions or ideas how to deal with this?

IIS maximum worker processes

I've been researching this quite a bit and just wanted some professional opinions on this. I am working on an eCommerce site that is really slow for submitting orders. Would creating a web farm be beneficial? If not, what would - server, or network wise (load balancers, etc...)?
Assume the app is optimized as much as can be for now and we need to look at other alternatives.
Environment:
Windows 8 RC 2
IIS 7.5
SQL Server 2008
Ideas
IIS and database on separate server
Load balancers
Maybe we can find a cheaper solution.
If it is only the submit process which is slow perhaps you can just improve the code and use some background workers that won't block the main thread.
Otherwise what about just upgrading your server?
Static file compression.
Create separate application pools for static and dynamic pages with in the website.
Get the heavy feature onto a separate app pool. Check if that helps.
Do optimization on SQL server end. Indexing?
Other than this I would look in to the code. IIS performance is highly dependent upon the pages being executed.
You may also want to check from browser developers tool as to which part of the request is actually clocking the most amount of time. That will give you a better idea of which aspect of performance you should really be concerned about.

Same code on one server runs super slow on one site but fast on another

I'm trying to troubleshoot why our ASP all pages pages are running agonizingly slow. As a test I created a simple hello world ASP page. On the same server, one site will pull it up fast as expected, but on another site it will 30+ seconds!
**UPDATE: I actually realized that it's not just asp, it's all pages, so its some kind of core issue. A 404 page will take 15 seconds to display even. However their are sites on the same server that pop right up without delay.
The only difference I know of is that the site that generates at the acceptable speed is running Coldfusion code, but I can't imagine a reason why that would effect it at all.
I'm not really sure where to go and what to check from here.
FYI running IIS7 on Server 2008R2
Ok, found the problem. The DefaultAppPool was stopped :-/. Started it and all is well with the cosmos

How to minimise differences between a development and production server?

Lots of time, We build a web application in our own personal system, with a local server that comes in packages like WAMP, XAMPP. But, the configuration we have on our system hardly matches 100% with the server where we host that application. This adds up to the debugging complexity a lot. Specially when the server you host is configured to hide the errors. Relying on error logs to debug everything, is a uncomfortable options, which is also not guaranteed to be available.
What are the measures we can take to minimise such differences?
You guys might say, it depends on web server as the configuration might be different from server to server. Even in this case, or shared hosting, I would like to know of the pointers to take, before hosting a application or even start building it.
We use a staging server that is a clone of our deployment server. Running code by the staging server (using version control) is both fast and a reliable way to ensure that the new code/code changes work as expected on the live environment.
That said, we use Ubuntu servers and I've opted to use Ubuntu as my development environment as well, makes stuff so much easier.

windows django server

I have inherited a Windows Server and I have to deploy a django app on it.
Have anyone tried to benchmark http servers with django support on this platform?
Which one is fastest?
Use-case of my application would be:
not so much writes to db
heavy usage of admin panel
display tons of results
Have you looked at either wamp or xampp? They both deliver Apache/MySQL/PHP-and-Perl on a Windows platform. But you need more because neither includes Python. See this SO thread for how to proceed from there. Note, you may encounter problems. See this SO thread for an example.
Ps. Personally, I would just get a an account that supports Django (e.g. webfaction.com) and not screw around with this.
I run a Django site on Windows using Apache. I've posted a write up about some of the hurdles that you're going to face.

Resources