Leave a comment

Check IIS Version Installed on Windows – Experts Way

How to Check IIS Version or Need to confirm IIS Version ? I have described all the ways to Verify IIS Version In this Article.

Internet Information Services (IIS) is an Windows Web Server comes with inbuilt Windows/Windows Server and its supported protocols HTTP, HTTPS, FTP, SMTP, You can deploy Web sits/application for example the websites you need http://example.com or https://example.com for the .html .asp .aspx .net pages then you need to install windows IIS (Inetrnet Information Services) from Windows (Add Remove Programs or appwiz.cpl). You can Go through below steps:
Verify First if you have installed Internet Information Services (IIS) Go to run type inetmgr it will open Inertnet information Services (IIS) Manager. If not installed follow the below instructions.
Press Windows+R Key and type “appwiz.cpl” Or Go to ControlPanel->Add Remove Programs , Click Add Remove Windows Components and select Internet Information Services from the list to install IIS components and Install IIS

1. Once you have installed IIS Go to Start => Run (Shortcut Press Windows +R) type inetmgr and press OK. wait for few second and you will get an output as a IIS Configuration screen.

Output Screen:

In your fron screen you will see IIS version as well you can click In IIS, select “Help”, click “About”
For Windows XP system the way to go Start => Control Panel => Administrative Tools => Internet Information Services, Click Help =>About Internet Information Services

2. Second way: To check IIS version simpley execute the command in Command Promt or (Windows + R) to go run and type:

%SystemRoot%\system32\inetsrv\InetMgr.exe

It will display the Internet Information Services Version You can also Click on “HELP” Go => ABOUT IIS:

3. You can confirm the IIS Version from Registry editor:

Go to to run (Windows+R) => Type = “regedit”
Complete Path:

(HKLM) HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \InetStp\ VersionString value of 7.5

4.The fourth way:

To check IIS version is Windows PowerShell you can Open Windows Power Shell and hit command:

[System.Diagnostics.FileVersionInfo]::GetVersionInfo(“C:\Windows\system32\notepad.exe”).FileVersion

Output:

5. Another way:

To check IIS version simple execute the command again in Windows Power Shell:

Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\ | Select-Object

Output:

6.The amazing way:

To check IIS Version from the dll also help you go to the directory C:\Windows\system32\inetsrv\
Right Click on “inetmgr.dll” and go to Details Tab you will see out like below:
Output:

7. You can also execute the amazing command to check IIS Version.
[System.Diagnostics.FileVersionInfo]::GetVersionInfo(“$env:SystemRoot\system32\inetsrv\InetMgr.exe”).ProductVersion

PS C:\Users\Administrator> [System.Diagnostics.FileVersionInfo]::GetVersionInfo(“$env:SystemRoot\system32\inetsrv\InetMg r.exe”).ProductVersion
10.0.14393.0
PS C:\Users\Administrator>

8. If you are using any Hosting where you don’t have access for CPenal/Plesk/RDP you can simply upload a asp page for example iischeck.asp uing FTP access to a Folder in the root path of website or virtual directory i.e. to grasp the IIS version:

<%
response.write(Request.ServerVariables(“SERVER_SOFTWARE”))
%>

9. If you know the Windows Server Wndows Opreation System you can simply know which version of IIS is currenly running Please refer the Chard Below:

 

Version Obtained from Operating System
1.0 Included with Windows NT 3.51 SP 3 (or as a self-contained download). Windows NT Server 3.51
2.0 Included with Windows NT Server 4.0. Windows NT Server 4.0
3.0 Included with Windows NT Server 4.0 Service Pack 3 (Internet Information Server 2.0 is automatically upgraded to Internet Information Server 3.0 during the install of SP3). Windows NT Server 4.0
4.0 Self-contained download from www.microsoft.com or the Windows NT Option Pack compact disc. Windows NT Server 4.0 SP3 and Microsoft Internet Explorer 4.01
5.0 Built-in component of Windows 2000. Windows 2000
5.1 Built-in component of Windows XP Professional. Windows XP Professional
6.0 Built-in component of Windows Server 2003. WIndows Server 2003
7.0 Built-in component of Windows Vista and Windows Server 2008. Windows Vista and WIndows Server 2008
7.5 Built-in component of Windows 7 and Windows Server 2008 R2. Windows 7 and Windows Server 2008 R2
8.0 Built-in component of Windows 8 and Windows Server 2012. Windows 8 and Windows Server 2012

8.5             Built-in component of Windows 8.1 and Windows Server 2012 R2.                           Windows 8.1 and Windows Server 2012 R2

10              Built-in component of Windows 10 and Windows Server 2016.                                    Windows 10 and Windows Server 2016

From the refrel url: https://support.microsoft.com/en-us/help/224609/how-to-obtain-versions-of-internet-information-server-iis

Leave a comment

Could not open a connection to SQL Server Error-40|Error: 1326

The Article regarding the SQL Server Error-40|Error: 1326 Could not open a connection to SQL Server Instance Remotely. In this topic I will describe why the SQL Server Instance unable to connect and What configurations required to resolve the SQL Server Issue.

I am working as a SQL server Administrator and I have to provide access to the user for their .net Applications/Java Application, “Cannot connect to SQL Server” lots of user facing Issue with the error (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 1326) ,


SQLError:

TITLE: Connect to Server

—————————

Cannot connect to SQL2005 SQL-2008 SQL-2012 SQL-2016.

——————————

ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 1326)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=1326&LinkId=20476

The user name or password is incorrect

BUTTONS:

OK

Solutions and Troubleshooting Steps Below:

1. Try to find SQL Server Configurations Manager on your Windows System All Programs or type “sql” in your Windows Search bar.

SQL

2. Expand the “SQL Server Network Configurations ” See Image below:

SQL

3. Next to select “TCP/IP ==> Properties” and Enabled it from drop down list See Image below:

SQL

4. Next go to the Tab “IP Addresses” and Port 1433 in IPv4 Section.

SQL

5. Open SQL Server Management Studio or type the short command to open it “SSMC” see the example below:SQL

6. Once you have opened the SQL Server management Studio => Connect the SQL server Instance by Default it comes with Basic Authentication => Right Click on the Instance connected and Click on Properties:

 

7. Next Click on Security Tab => and Enable SQL Server Windows and SQL SQLServer Authentication Mode.SQL

8. Next Click on Connections Tab => To Allow Remote Connections to this Server” If this is not checked you can access the SQL server Remotely.

SQL

9. Check the SQL Server Instance Services and using “services.msc” Start or set “Automatic” see the example image below:

SQL

10. Configure Windows Firewall to Allow SQL Server Port “1433” for Remote Access.

Go to => Control Panel\All Control Panel Items\Windows Firewall Or directly run the command “firewall.cpl” it will open Firewall Management see below Image:SQL

11. Next to click on Advance Settings ==> Inbound Firewall Setting refer the image below:

SQL

12. Next Click on “Inbound Rules” and click “New Rule” Select “TCP Port” and click on Next:
Example here:

SQL

13. Next specify the port “1433” to Allow the Connection and continue.

SQL

14. Select the option “Allow The Connection” and Click Next:
Example:SQL

15. Next Give the name of Rule you want to create I used “SQL Server Remote Access ” and continue to Finish.

SQL

Next Client Machine Firewall Configuration.
==> Also check Client Machine Firewall for the incoming port 1433 from where you are trying to connect.

1. Utility: SQL Server Management Studio or your application code where you can access the SQL server Access.
2. Utility: Telnet Client is as windows client tool to test the open port connectivity. Open your Commad Promt type “telnet host IP 1433” you can also your Server host computer.

Testing the SQL Server Access:

Example:

C:\Users\Administrator>telnet 192.168.1.7 1433

Connecting To 192.168.1.7..

Success!

After these I was also Facing issue and Troubleshooting I did below:

Q. Still facing the SQL Server “Could not open a connection to SQL Server ?”

After few months accidentally, I face such issue on a windows 7 Computer, even Clean Installations on that Computer I was getting issue, And other Client Computers machines able to connect the SQL server and one client machine was not able to connect SQL server.

2 . Solutions :create a new User for SQL server Database and tried it to access now it works for me !

Leave a comment

Check Last Logon User’s Time Windows Linux Command Line

Many times we have to check the server logs for the security reason who is trying to access the server or when something went wrong. Admin have to check the logs using “eventvwr” to identify that who changed or from where the server last accessed. to check last user’s login time we can perform the following commands:

For windows Users: Open Command Promt and type “last” command without quote.

last # Last command will display current user logged in time detail.

Output:

Administ tty0 client01 Tue May 24 18:15 still logged in
Administ tty0 client01 Tue May 24 18:11 – 18:15 (00:03)
Administ tty0 client01 Tue May 24 18:11 – 18:11 (00:00)
Administ tty0 client01 Tue May 24 18:10 – 18:11 (00:00)

last username # It will display specified user log in time.

Output:

C:\Users\Administrator>last testuser

wtmp begins Tue Mar 10 18:49:11 2015

net user administrator | findstr /B /C:”Last logon”

Output:

C:\Users\Administrator>net user administrator | findstr /B /C:”Last logon”
Last logon 5/24/2016 6:11:45 PM

The command will show you the user last login time.

For more details using event log you can go through the link 

For Linux Users:

$ last

Output:
svn_user pts/0 192.168.1.7 Mon May 23 19:42 still logged in
svn_user pts/0 cl040 Mon May 23 17:01 – 19:08 (02:07)
svn_user pts/0 192.168.1.7 Tue May 17 15:59 – 19:16 (3+03:16)

$lastlog -u svn_user

Output:
Username Port From Latest
svn_user pts/0 192.168.1.7 Mon May 23 19:42:27 +0530 2016
$last reboot                     # It will show you when your system last rebooted
OutPut:
reboot system boot 3.16.0-30-generi Tue May 17 12:43 – 18:37 (7+05:54)

$last shutdown           #It will display when you have shutdown the system.

Output:
wtmp begins Mon May 2 15:30:26 2016

 

5 Comments

AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate

In Yii Framework trying to use AWS bucket to upload images and getting error: 

AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate

Solution:

To solve  the above error you have use ssl certificate to transfer the data securely. 

I have resolved it by using http method this is not secure.

To use secure way enter  below line in your php.ini file :

curl.cainfo = “/path/to/file.cacert.pem”

 

‘options’ => [
‘scheme’ => ‘http’,
],

Complete Example Code without http method:

https://github.com/frostealth/yii2-aws-s3/tree/1.x
// …
‘s3bucket’ => [
‘class’ => \frostealth\yii2\aws\s3\Storage::className(),
‘region’ => ‘ap-southeast-2’,
‘credentials’ => [ // Aws\Credentials\CredentialsInterface|array|callable
‘key’ => ‘JGUTEHCDE………….OSHS’,
‘secret’ => ‘SJEUC———–jzy1—–rrT’,
],
‘bucket’ => ‘yours3bucket’,
//’cdnHostname’ => ‘http://example.cloudfront.net’,
‘defaultAcl’ => \frostealth\yii2\aws\s3\Storage::ACL_PUBLIC_READ,
‘debug’ => false, // bool|array
‘options’ => [
‘scheme’ => ‘http’,
],

],
// …

More regarding AWS SDK with Yii Framework Please go throuhg http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html#verify

http://docs.aws.amazon.com/aws-sdk-php/guide/latest/faq.html#what-do-i-do-about-a-curl-ssl-certificate-error

2 Comments

Detailed Steps to setup wildcard SSL certificate with domain and sub domain:

Following are the detailed steps to setup wild card SSL Certificate with your domain and Sub domains:

First of all we should have wild card SSL certificate purchased from CA. I have purchased SSL and hosting from godaddy : Please check properly few registrar provide SSL for their own server if you have hosting with them. Godaddy provide SSL Certificate for their hosing as well as if you have hosting with other provider. It depend on your requirements.

You can check other ssl provider below:

https://www.sslshopper.com/

https://www.ssls.com/

https://www.digicert.com/order/order-1.php

https://in.godaddy.com/web-security/ssl-certificate?ci=8346

Login into your godaddy account and next Select  your Purchased certificate I have (Standard UCC SSL Certificate) ==> Click on Manage :

Generate CSR request to submit Certificate Signing Request (CSR). and Click on Re-Key certificate to submit CSR Request with CA for their approval.

1

Online and offline tool or utility can also help you to generate CSR Request

https://www.gogetssl.com/online-csr-generator/

https://www.digicert.com/easy-csr/openssl.htm

https://csrgenerator.com/

CSR generation Example with online tools you can fill your certificate see the details in below image :

1

Next copy the text from Information column and use putty or Opens SSL:

 openssl req -new -newkey rsa:2048 -nodes -out www_example_com.csr -keyout www_example_com.key -subj “/C=IN/ST=23/L=Chandigarh/O=Example Org/OU=Sales Dept./CN=www.example.com”

It will create www_example_com.csr  and www_example_com.key file on your desire location.

Copy www_example_com.csr file or by editing its content to paste in the Certificate Signing Request (CSR) Box:

———BEGIN CERTIFICATE REQUEST—–
MIICujCCAaICAQAwdTELMAkGA1UEB…
/vw+86aiaBJM+m
—–END CERTIFICATE REQUEST—–

1

Save and submit all Changes. Once CA will approve the Certificate it will be available for downloading. Click on Download and select your file for IIS/Apache or any other As i have selected for IIS. and extract the zip in your desired location. It has 2 files 1 like 755fadc3.crt and second has gd-g2_iis_intermediates (PKCS #7 Certificates (.p7b) file.

Next use convert gd-g2_iis_intermediates to .pem format $ openssl pkcs7 -in gd-g2_iis_intermediates -print_certs -out renderwebsols.pem

If Not then you will get the error:

Error: Unable to set the certificate: Invalid certificate format

Solutions: openssl pkcs7 -in gd-g2_iis_intermediates -print_certs -out renderwebsols.pem

Next Login into your Control Penal to setup SSL with your domain and go the Website & Domains

1

Select the website and click on “Secure Site with SSL” :

 *

1

Now you have to “enable SSL support ” in your Plesk for your desired website.

1Godaddy Instruction here for the Wild Card SSL:

Give try with to test SSL certificate with great tools:

https://www.sslshopper.com/ssl-checker.html

Hostname:
renderwebsolutoin.com Check SSL

https://www.ssllabs.com/ssltest/index.html

Hostname: renderwebsolutions

Then click on Submit button.

 

Error & Solutions:

Unable to set the certificate: Invalid certificate format

$ openssl pkcs7 -in gd-g2_iis_intermediates -print_certs -out myssl.pem

Now upload the files now the issue resolved for me: