Change time zone IIS10 log - iis-10

I want to change time zone for my IIS10 logs (now timestamp is UTC-2 hours).
This guide is ok for previous IIS version:
https://support.microsoft.com/en-nz/help/271196/iis-log-file-entries-have-the-incorrect-date-and-time-stamp
Utility convlog is not present on the server (it's a Windows Server 2016)
Any ideas?
Thanks

Related

Can Azure Application Insights Kusto queries obtain the user's current time zone?

We have a chart that restricts details to "today". Today means something different depending on the viewer's time zone: right now for me (in Adelaide, AUS) today means everything in the last 15 hours but for someone in the UK it only means everything in the last 6.5 hours. Is there any way of retrieving the client's time zone in a Kusto query in Application Insights?
Go to settings of the query console:
Change timezone to "Local Time" (default is UTC)

Azure - http request takes a long time

I have small ASP.NET application and everything was ok, but a day ago I noticed: http request takes a long time (~13-15seconds).
I tried to add simple method to controller:
[HttpGet]
[Route("~/api/[controller]/test")]
public string Test()
{
return "Hello. I'm ok.";
}
But request takes ~13 seconds.
What I tried and what info I have:
On local machines (2 different) everething is ok - I don't see any delays.
Application was deployed on AZURE one week ago, but delays started a day ago.
Restart doesn't help.
Redeploing on Azure doesn't help.
Redeploing on Azure as other service doesn't help.
Connecting to Azure's DB from locale machne is fast.
My AZURE's quota is OK.
List item
Response time and CPU:
Monitor:
Websites effectively go to sleep if not hit so the startup time of the first request can be slow.
Try hitting your url, time it. Then hit it again.
If the second one is fast, its just because nothing is hitting your application and its going into sleep mode.
I resolved it.
It was misconfiguration. I used .net core but with Microsoft.AspNet.Mvc instead of Microsoft.AspNetCore.Mvc.
And I used DNX dnx451.
I ported project to net46 and Microsoft.AspNetCore.Mvc and problem disappeared.

Mono.Security.Protocol.Tls.TlsException Received 0 bytes from stream in MVC under Mono

I have an ASP.NET MVC application running on Mono 4.0.5 under Ubuntu 15.04. The application works as expected while the internet access is available, but if the OS is restarted on a network without internet connection, I get the following error:
I have tried updating machine and user certificate stores without any success using "mozroots --import --sync --machine".
It should be noted that this error only occurs on the Login page (using Forms Authentication with MySQL provider with "requireSSL" set to "false").
I don't use SSL on any of my pages and don't have it enabled/configured in Apache/Mod_Mono configuration. The LoginController doesn't make any (e.g. HTTPS) requests either.
Also, I've tried running the application through XSP4, which produced exactly the same behavior.
Any help would be much appreciated...
After inspecting logs, I've noticed that the system date was set to to 01/01/1970. After updating the date and restarting Apache, everything worked. I guess in my case the NTP was updating the date/time on boot every time and without internet connection was falling back to Unix epoch.

datetime.utcnow returns time 12 hours ago on azure

I'm using windows azure server. Datetime.UtcNow returns time 12 hours ago. How can I get the time equal to my local time?
Update:
On some devices it says 12 hours ago but on some devices it works fine. (both at same place)
Check the timezone in your VM. You should be able to change that to the timezone you prefer. Another way can be to create the VM with the preconfigured timezone as described here.

How to restrart asp.net session start time on server?

My Server (VPS) takes a DateTime about 12 hours more than now DateTime, after a system restart.(tomorrow date and toggled AM/PM time).
The issue is that when I correct the date and the time on server, I can not login to my asp application anymore! In fact the login proccess goes well but it logs out immediately. It seems that the session start time is still tomorrow(the wrong DateTime) and the sliding expiration time always compares to the current server time and causes logout.
How can i restart session start time? Which service or configuration will restart it to take the correct DateTime?
it should not changed after restart, do you share this situation with your service provider?
it's better to work with UTC times.
Dim timeZone = TimeZoneInfo.FindSystemTimeZoneById("Central America Standard Time")
Dim utcNow As Date = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, timeZone)
when you change server time it will not effect your sessions. you must remove or renew your sessions.
if your problem just with sessions
Session.Clear()
Session.Abandon()
Session.RemoveAll()
also restarting application will do same thing.
you can restart your application these ways;
1
restart IIS
2
File.SetLastWriteTime(HttpContext.Current.Request.MapPath("~\Web.config"), Date.Now)
3
rename web.config file to something(like 0web.config) and after that rename it again to web.config
4
create app_offline.htm on your root folder. it will close your app. when you want go online again rename it something else like 0app_offline.htm

Resources