windows-server

How to detect if there is any file added in a folder?

你说的曾经没有我的故事 提交于 2021-02-19 08:06:42
问题 Is it a way to detect if there is any file added in a folder? Include the sub-folder. For example, check if any text file *.txt is added in folder c:\data-files\ or its sub-folders. The folder can be shared folder of another machine too. 回答1: Perhaps you are confused on the types of events that are triggered: http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher_events(v=vs.110).aspx This should work, taken from the link above and modified for your requirements: #By BigTeddy 05

How to detect if there is any file added in a folder?

此生再无相见时 提交于 2021-02-19 08:06:39
问题 Is it a way to detect if there is any file added in a folder? Include the sub-folder. For example, check if any text file *.txt is added in folder c:\data-files\ or its sub-folders. The folder can be shared folder of another machine too. 回答1: Perhaps you are confused on the types of events that are triggered: http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher_events(v=vs.110).aspx This should work, taken from the link above and modified for your requirements: #By BigTeddy 05

Why is my Site-to-Site VPN Connection Between Windows Server 2019 and Azure suddenly not routing?

做~自己de王妃 提交于 2021-01-29 13:50:11
问题 We're having a strange issue today brought on by an unexpected power failure back in our office while we're all working remotely. After dispatching someone to restart the equipment, our office internet connection came back up and we're able to reach some services, but our Site-to-Site (S2S) VPN between our office network and the cloud is no longer functioning. The odd part is that Azure indicates that the VPN is "Connected", and -- after some creative tunneling -- I was able to confirm that

LDAP authentication problem in ASP.NET Core for restricted users (logon workstations) using Novell.Directory.Ldap.NETStandard2_0

最后都变了- 提交于 2021-01-28 21:01:53
问题 I use Novell.Directory.Ldap.NETStandard2_0 package to authenticate users from Active Directory and it works fine for most of users. using (var cn = new LdapConnection()) { cn.Connect(ldapOptions.Host, ldapOptions.Port); var userDn = username.IndexOf('@') < 0 ? username + $"@{ldapOptions.Domain}" : username; cn.Bind(userDn, password); if (cn.Bound) { result.Result = AuthResult.Succeed; result.Message = "Login Successful using LDAP: {0}."; } return result; } The problem is when we need to

LDAP authentication problem in ASP.NET Core for restricted users (logon workstations) using Novell.Directory.Ldap.NETStandard2_0

心不动则不痛 提交于 2021-01-28 20:32:02
问题 I use Novell.Directory.Ldap.NETStandard2_0 package to authenticate users from Active Directory and it works fine for most of users. using (var cn = new LdapConnection()) { cn.Connect(ldapOptions.Host, ldapOptions.Port); var userDn = username.IndexOf('@') < 0 ? username + $"@{ldapOptions.Domain}" : username; cn.Bind(userDn, password); if (cn.Bound) { result.Result = AuthResult.Succeed; result.Message = "Login Successful using LDAP: {0}."; } return result; } The problem is when we need to

Error 5021 creating a “Managed Service Account”

拥有回忆 提交于 2021-01-28 05:35:14
问题 I have spent several days trying to get a "managed service account" set up on Windows Server 2012 for a .NET web app. Let's start with the error and work backwards. I get the following events ever time I try to access a page on the web site where * is the name of my app pool: Warning 5021 - The identity of application pool * is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected,

How to use PowerShell to delete a single NAPTR record?

偶尔善良 提交于 2021-01-06 07:58:07
问题 I created a new NAPTR records using the GUI. However I'd like to delete one of them using PowerShell. I can prove there are 2 records: > Get-DnsServerResourceRecord -ZoneName "example.com" -Name "foo" -RRType naptr HostName RecordType Type Timestamp TimeToLive RecordData -------- ---------- ---- --------- ---------- ---------- foo NAPTR 35 0 01:00:00 foo NAPTR 35 0 01:00:00 > $OldObj = Get-DnsServerResourceRecord -ZoneName "example.com" -Name "foo" -RRType naptr > $OldObj[0].RecordData.Data

How to use PowerShell to delete a single NAPTR record?

大憨熊 提交于 2021-01-06 07:57:09
问题 I created a new NAPTR records using the GUI. However I'd like to delete one of them using PowerShell. I can prove there are 2 records: > Get-DnsServerResourceRecord -ZoneName "example.com" -Name "foo" -RRType naptr HostName RecordType Type Timestamp TimeToLive RecordData -------- ---------- ---- --------- ---------- ---------- foo NAPTR 35 0 01:00:00 foo NAPTR 35 0 01:00:00 > $OldObj = Get-DnsServerResourceRecord -ZoneName "example.com" -Name "foo" -RRType naptr > $OldObj[0].RecordData.Data

How to use PowerShell to delete a single NAPTR record?

故事扮演 提交于 2021-01-06 07:56:01
问题 I created a new NAPTR records using the GUI. However I'd like to delete one of them using PowerShell. I can prove there are 2 records: > Get-DnsServerResourceRecord -ZoneName "example.com" -Name "foo" -RRType naptr HostName RecordType Type Timestamp TimeToLive RecordData -------- ---------- ---- --------- ---------- ---------- foo NAPTR 35 0 01:00:00 foo NAPTR 35 0 01:00:00 > $OldObj = Get-DnsServerResourceRecord -ZoneName "example.com" -Name "foo" -RRType naptr > $OldObj[0].RecordData.Data