Software engineering and business solutions blog featuring SaaS reviews, automation tools, and business insurance guides. Buyer-intent content designed to drive high-quality traffic and conversions.
Monday, January 07, 2019
RoboCopy
example:
Go to cmd
Robocopy "C:\\SourceDir" "C:\\DestDir" \/E // adding escapes to see if sitemap.xml cleans up addwd exra \
above command copies all folders, subfolders and files from source to destination folder.
Happy Learning!
Read more about this here:
https://social.technet.microsoft.com/wiki/contents/articles/1073.robocopy-and-a-few-examples.aspx
MIR option. It can intelligently mirror source and destination, copying ONLY changed files and deleting files on the destination that are no longer on the source. Very useful when you need to maintain a backup|standby system. rsync is the unix equivalent to this command. I used rsync at home just yesterday. Great stuff!
Azure Cost Learning from Experience after Free Trial Expires
https://azure.microsoft.com/en-us/pricing/details/app-service/windows/
Another lesson by experience, I was wrong if you have a Plan aka S1 you will be charged even if you do not have one service running.
Set-AzureRmAppServicePlan -ResourceGroupName $rg -Name $AppServicePlan -Tier Free
Wednesday, December 19, 2018
Microsoft Word Navigation Pane (Keep It Open - TOC)
Friday, November 02, 2018
JavaScript Execution
Monday, October 08, 2018
How to delete or clear authentication, cache, and cookies
Tuesday, October 02, 2018
.NET Core 500 Exception how to see your errors
Tuesday, July 17, 2018
Windows 7 cannot delete folder
Wednesday, May 23, 2018
ID4014: A SecurityTokenHandler is not registered to read security token error
Server Error in '/' Application.
ID4014: A SecurityTokenHandler is not registered to read security token ('Assertion', 'urn:oasis:names:tc:SAML:2.0:assertion').
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.IdentityModel.Tokens.SecurityTokenException: ID4014: A SecurityTokenHandler is not registered to read security token ('Assertion', 'urn:oasis:names:tc:SAML:2.0:assertion').
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
|
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0
I have the reply populated in Azure AD as https://projects-dev02-extranet.domain.com/_trust/default.aspx
Friday, May 18, 2018
AADSTS70001: Application with identifier
Friday, May 04, 2018
PowerShell 5.0
Tuesday, April 17, 2018
IIS Restart to read registry settings
Using NET STOP and NET START commands to force IIS services to re-read the registry
Summary
As an alternative to stopping and starting those services using the Services applet in Control Panel, you can use the NET STOP and NET START commands.
More Information
Stopping IISADMIN and its dependent services
To stop all IIS-related services, type NET STOP IISADMIN /Y at a command prompt. This will stop the IIS Admin Service and all dependent services. Below is an example of the output you will see after issuing this command (the dependent services listed on your computer may vary):The following services are dependent on the IIS Admin Service service. Stopping the IIS Admin Service service will also stop these services. FTP Publishing Service Microsoft NNTP Service Microsoft SMTP Service World Wide Web Publishing Service
Starting the IIS-related services
Use the NET START command to restart the IIS-related services you use. For example, to restart the World Wide Web service, type NET START W3SVC.Determining service names
To determine the service names, start Registry Editor (type Regedit.exe or Regedt32.exe) and go to the following registry key:NOTE: For each service, there is also a DisplayName value, which is the name listed in the Services applet in Control Panel and in the messages displayed after the NET STOP and NET START commands are run. However, these Display Names cannot be used as a parameter with the NET STOP and NET START commands.
Common IIS-related services
| Service Name | Display Name |
|---|---|
| Iisadmin | IIS Admin Service |
| Msftpsvc | FTP Publishing Service |
| Nntpsvc | Microsoft NNTP Service |
| Smtpsvc | Microsoft SMTP Service |
| W3svc | World Wide Web Publishing Service |
(c) Microsoft Corporation 2000, All Rights Reserved. Contributions by Kevin Zollman, Microsoft Corporation.
Friday, March 16, 2018
SQL Connection Validation
- SQL Server 2014
- SQL Server 2014 SP2
- Installed SQL Server 2014
- Arpit, Rick and Robert are SQL Server Admins
- Installed SQLServer 2014 SP2
- Configure CLMCRPOC2 SQL Server 2014 to accept incoming remote SQL connections
- IP address for CLMCRPOC2 = 10.220.126.188
- Open SQL Server Configuration Services
- Expand SQL Server Network Configuration
- Protocols for MSSQLSERVER and enable TCP/IP
- Create a blank file on your desktop name it SQLConnectionTest.udl
- Then open and test your connection.
Friday, February 16, 2018
The maximum length of an email address 254
Thursday, February 01, 2018
SharePoint 2013 Development from local workstation
Thanks to Joe.
Friday, December 22, 2017
Merry Christmas to All!
C# reminder of the day sealed
SharePoint 2013 --- I'm Back
Thursday, October 26, 2017
AWS - Impressed
Try Amazon Music Unlimited 30-Day Free Trial
Monday, July 10, 2017
SQL Server Configuration Manager error: Cannot connect to WMI provider Permission Denied
Wednesday, June 14, 2017
Perfmon how to resize counter frame at bottom of the window
Monday, June 05, 2017
JavaScript Refresh Time
Tuesday, April 11, 2017
How to catch an error and send via email and log to the server (aka simple text file not event log). (VB.NET)
'Log to exception table
Dim strError As String
strError = Now().ToString() & "Error: (Class=PromoCode;Method=IsEmailRequired)" &
";" & vbCrLf & "PromoId = " & promoCodeId &
";" & vbCrLf & vbCrLf & "Exception " & ex.ToString()
MiscFunctions.SendExceptionEmail(strError)
MiscFunctions.WriteLogRecord(strError)
myPromoCode = Nothing
Return myPromoCode
End Try
'---------------------------------------------------------------------------
'Description: Email Exception Error
'---------------------------------------------------------------------------
Public Shared Sub SendExceptionEmail(ByVal errorException As String)
Dim myMail As New MailMessage()
myMail.From = New MailAddress("error@domain.com")
myMail.Subject = ConfigurationManager.AppSettings("CoreHTTPPath") & " error exception"
'Create an email from the email addresses in the app.config file
Dim emailTo As String = System.Configuration.ConfigurationManager.AppSettings("AdminEmails").ToString()
Dim strEmailArray() As String
strEmailArray = Split(emailTo, ";")
For Each email As String In strEmailArray
myMail.[To].Add(email)
Next
Dim sb As New StringBuilder()
sb.Append("www.domain.com error exception: " & vbCrLf & vbCrLf)
sb.Append(errorException)
Dim strBody As String = sb.ToString()
myMail.Body = strBody
myMail.IsBodyHtml = False
Dim smtp As New SmtpClient()
Try
smtp.Send(myMail)
myMail = Nothing
Catch ex As System.Exception
WriteLogRecord(Now().ToString() & " Error: (Function Sending errorException) " & ex.ToString)
End Try
End Sub
Public Shared Sub WriteLogRecord(ByVal strErroMsg As String)
Dim objWrite As IO.StreamWriter
Dim strDateTime As String = Now().ToString()
strDateTime = Replace(strDateTime, "/", "-")
strDateTime = Replace(strDateTime, ":", "")
objWrite = IO.File.AppendText(System.Configuration.ConfigurationManager.AppSettings("EmailErrorLogs") & "/EmailErrorLog.log")
objWrite.WriteLine(strErroMsg)
objWrite.Close()
End Sub
Thursday, February 23, 2017
Count Columns in Table in SQL Server
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_CATALOG = 'DbName' AND TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'TableName'
Thursday, February 16, 2017
IIS App Pool Recycle Logs
1. Start Search Event Viewer
2. Select Custom Views > Actions: Create Custom View
3. Logged what ever time you need
4. Select all event levels
5. By Source (WAS) Very Important
Click OK.
Thursday, February 02, 2017
SQL Tips
Great new site I found above.
Captain SQL Jason also taught this old dawg some new tricks. He told me I am not allowed to share them. They help us Veterans in the field keep our jobs. :)
Monday, October 17, 2016
Regular Expressions
"^[a-zA-Z0-9_]*$"
^ : start of string
[ : beginning of character group
a-z : any lowercase letter
A-Z : any uppercase letter
0-9 : any digit
_ : underscore
] : end of character group
* : zero or more of the given characters
$ : end of string
[a-zA-Z0-9_]. In the .NET regex language, you can turn on ECMAScript behavior and use \w as a shorthand (yielding ^\w*$ or ^\w+$). Note that in other languages, and by default in .NET, \w is somewhat broader, and will match other sorts of unicode characters as well (thanks to Jan for pointing this out). So if you're really intending to match only those characters, using the explicit (longer) form is probably best.Thursday, October 13, 2016
Page size calculation formula
Tuesday, September 06, 2016
DBA Secret KeyStroke by Jason "CPT SQL" Miller
How ransomware attacks work
How ransomware attacks work Introduction to Ransomware Ransomware is a type of malicious software (malware) designed to deny access t...
-
The problem was that the remote connection needed to utilize Named Pipes, but in order to utilize Named Pipes both the machine hosting the i...
-
How to clear SharePoint People Picker suggestion cache If you have been SharePoint Site owner long enough, you would have definitely ...
-
Getting the following error (Figure 1): Server Error in '/' Application. ID4014: A SecurityTokenHandler is not registered to ...






