This blog is about my history as a software engineer utilizing technologies C#, Java, React, JavaScript, .NET Core, SQL Server , Oracle, GIT, GitHub, Jira, Azure, AWS and HTML5. “I have not failed. I've just found 10,000 ways that won't work.” Thomas A. Edison. Please click on all my ADVERTISING links to help support this blog. Thank you.
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.