I wrote both BackEnd and FrontEnd of my web application using c# in visual studio 2015. I am using IIS 8.5 in Windows Server 2012R2 for hotsing (BackEnd and FrontEnd).
I have a caching problem. many times the database changes (threw using my web app or even if I want to edit some info manually), but the information shown in my website is not updated. I think this is a caching problem with my IIS but even after disabling all caching the problem still occurs. Only in case of a IIS reset the info in my web is updated.
for example:
changed the value in my sql database:
The value that shows in my web page(old value):
doing an IIS reset and the web page will show 2 as needed.
any ideas what causing this problem?
ps: even after Ctrl+F5 refresh it wont change.
Related
We have an asp.net Core application (that is running under .net Framework 4.8) which is deployed withing IIS on a Windows Server 2016 box. This application uses asp.net Core identity framework for roles based access.
Everything works great but when we update the "Site Bindings" (by way of an example config change) within IIS all the connected users get logged out upin the next page request, perhaps the cookie/sessions being reset?!
Whilst this might be the behaviour you expect this was not the behavious we had on a previous "identical" installation which was lost (all data was backed up etc etc but the server host died and we lost the exact settings).
I remember reading a while back (but can't find it now) that the session should actually persist as this allows for load-balancing (which we don't need).
Nothing has changed in the code base for this to now not work so this suggests it's an IIS setting.
Does anyone have a magic change we can make for the connections to persists and our users not to be sent back to the logon page on the asp.net core app?
Thanks.
Jim.
*** update ***
Changing the "Identity" property of the Appl pool entry to System Account seems to allow me to change bindings without the (app pool?) reset.
Somewhat annoyingly, this appears to be the only setting that doesnt reset the user sesions when changing the binding. The obv downside of using this are the security considerations which rule it out!
Anyone with a plan c?
I came across a very wierd problem today. After I updated record using sql script in SQL Server Management Studio and confirm the change is affected I refresh my MVC web page which is created by C# and EasyUI, but it stayed the same revealing no change at all.
I even deleted the local browser cache, but it still didn't work out. Eventually I restarted the Web Application in IIS Server and refresh the web page, now it work fine.
In addition if i make change by web page then no problem at all. Can't find out the root cause can anyone help?
I am using IIS to host an internal site. I have used visual studio express for web.
The problem I am having is when try to go to another part of the web site it drops the application name I have given it in IIS
Example:
www.name.com/applicationName/Home (this is whats working)
after trying to move to another part of the site the url becomes
www.name.com/Home/showDevice?sendmsg=192.168.0.1 (This does not work)
if I add the /applicationName/ to the above url it works correctly.
Is this and IIS issue I need to configure or is there something in the code I need to fix.
I am completely lost trying to figure this out. It has been going on for months. Session values just get lost. I check for Session["uid"] on master page to force user to login page.
System : Windows Server 2008 R2 Enterprise
IIS 7.5
.Net Framework 4.5 specified in web config
Application pool .Net Framework V4.0
Application pool Timeout set to standard 1740
Not a Web Farm.
Session In web config:
<sessionState timeout="60" mode="StateServer"></sessionState>
I changed the mode to StateServer thinking it is App pool random recycling causing it loose session
I check this post:
Losing Session State
I tested it myself. On a page where is loads countries and then cities based on country selection (updatepanel)... randomly it would just route me to login page on country change. And this is no delay in between change. Change, change, change... and then session["uid"] lost.
I read up on how IIS manages sessions:
https://abhijitjana.net/2010/03/14/beginner%E2%80%99s-guide-how-iis-process-asp-net-request/
can't seem to find answer there.
then i started getting errors like application pool max reached.
Then i set worker processes to 25, and it says it now a Web Garden.
Then i thought let me read up on Web Garden. According to this post it is a bad thing and should not be used ?
https://serverfault.com/questions/81689/web-gardens-are-they-good-or-bad-or-what
I just did the worker process increase today so i can't say if that will help, but i also dont want to leave that in place if it going to cause me other headaches.
My web site is non MVC, but i added an API controller to it. Not sure if this would be the issue for the session lost or app pool maxing out.
API not my biggest concern as we plan to move it to it's own MVC project.
But for now , my concern is the random session being lost.
I'm not sure it being lost. My code simply check if (Session["uid"] == null) go to login page.
I come from PHP / Apache history and never had any issues with Sessions.
Basic structure the same between c# masterpages and PHP template
I don't have any issues on localhost or dev server enviroment.
It's just when on live server that has a couple of other sites on this happens.
I don't think the other site will influence my site? THis is what application pooling prevents?
I have created an silverlight application and services. After i published it in
IIS(Win Xp or Win server 2003), i need to do an IIS reset to access that app. What may be the reasons?
Thanx in advance
Consider any Asp.net application deployed with some javascript version 1.0 and then after in development you changed the script and re-deployed ,if user don't hit refresh button,asp.net website will keep continue using script 1.0 ,so in this case either we ask user to hit refresh or else change the script version to 1.1 and re-deployed.As it was cached at client (browser)
Silverlight itself is client-side technology,when we request for any silverlight application it downloaded the xap folder (including dlls,client-side code).
Give try ,once you again deploy the Silverlight on IIS. Just Refresh the url,clear browser cache and see,it should work without IIS Reset.