Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts

November 10, 2020

Run or deploy Go (Golang) project code in IIS as web server

 Hi folks,

Today we are going to see, how we can run or deploy the Go (Golang) project in IIS.

Development

  1. Create your Golang project with web APIs
  2. Build the Go project
  3. Go build
  4. Result will be an .exe file
  5. Create a web.config file
  6. Update the following content

<?xml version="1.0" encoding="utf-8"?>

<configuration>

    <system.webServer>

        <handlers>

            <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />

        </handlers>

        <aspNetCore processPath=".\<<GoProject>>.exe" />

    </system.webServer>

</configuration>

Deployment 

  1. Place the <<GoProject.exe>> and web.config in IIS server accessible folder.
  2. Open IIS
  3. Create a new website
  4. Enter the web app details with port different from the project internal port
  5. Create or choose pool with .NET CLR version as "No managed code"
  6. The configured website looks like below
  7. After starting the website, user should be able to access the APIs
Hope, this information helps you to deploy the GOlang project in IIS.

 Request you send your feedback and comments to psrdotcom@gmail.com


October 07, 2020

Microsoft Azure DevOps Boards move or copy tasks between projects

 Hi all,


Today we will go through the different ways to organize the work items in Microsoft Azure DevOps Boards.

Pre-requisites

User should have appropriate permissions in both the projects.


Moving the work items between projects

  • Select the required items from Boards -> Work items
  • Select the more options icon (...) from any one of the selected work item
  • Choose "Open selected items in Queries" options
  • Queries page navigation will happen
  • Select all the items from query results (Ctrl+A)
  • Select the more options icon (...) from any one of the selected work item
  • Choose "Move to team project" options
  • Queries Page

  • Move work item dialog opens up

  • Choose appropriate options and click Ok.
  • All the items would be listed in moved project queries window.
  • Click on "Save items" option.


Copy work items between projects

Export work items

  • Select the required work items
  • Select the more options icon (...) from any one of the selected work item
  • Choose "Open selected items in Queries" options
  • Queries page navigation will happen
  • Select all the items from query results (Ctrl+A)
  • Export the work items to CSV file



Import the work items

  • Navigate to the required project boards section where the work items has to be created
  • Click on "Import work items" option
  • Import work item

  • Queries page navigation will happen
  • Import work items

  • Choose the exported CSV file and click on "Import" button
  • The work items would be listed in queries section
  • Click on "Save items"
  • Navigate to "Work items" section to view the added work items.


Request you send your comments and feedback below or send mail : psrdotcom@gmail.com


August 24, 2020

Microsoft Azure DevOps Server move or copy Project Source Code from one organization to another organization

Hi folks,

Today I will explain the process of moving the projects from one organization to another in Azure DevOps Server which includes the source repository code, history of commits, tags.


Pre-requisites

  • Git command line tool
  • ssh-keygen tool
  • Azure DevOps Project access


Environment Setup

  1. Create ssh key on your local PC
  2. Same user account on both the organization with required permissions (Admin)
  3. On Azure DevOps, to go user profile
  4. Add the generated SSH pub key of PC to Azure DevOps


Procedure in terminal/command prompt

1. git clone <old org project repo ssh url>

2. cd <project>

3. git branch -a

    a. git checkout <all branches one by one>

4. git fetch --tags

5. git remote rm origin

6. git remote add orgin <new org project repo ssh url>

7. git push origin --all

8. git push --tags


Hope you are able to move/copy the project source code which includes the history of commits and tags.

Please send your comments and feedback to psrdotcom@gmail.com


August 13, 2020

Microsoft Windows Sysinternals Suite with file, disk, network, process, security utilities

Hi Folks,

Today, i will give an overview of Microsoft Windows Sysinternals Suite.

This suite helps users and admins to troubleshoot the OS and devices.

Sysinternals Suite

The Suite is a bundling of the following selected Sysinternals Utilities: AccessChk, AccessEnum, AdExplorer, AdInsight, AdRestore, Autologon, Autoruns, BgInfo, BlueScreen, CacheSet, ClockRes, Contig, Coreinfo, Ctrl2Cap, DebugView, Desktops, Disk2vhd, DiskExt, DiskMon, DiskView, Disk Usage (DU), EFSDump, FindLinks, Handle, Hex2dec, Junction, LDMDump, ListDLLs, LiveKd, LoadOrder, LogonSessions, MoveFile, NotMyFault, NTFSInfo, PageDefrag, PendMoves, PipeList, PortMon, ProcDump, Process Explorer, Process Monitor, PsExec, PsFile, PsGetSid, PsInfo, PsKill, PsList, PsLoggedOn, PsLogList, PsPasswd, PsPing, PsService, PsShutdown, PsSuspend, PsTools, RAMMap, RegDelNull, RegHide, RegJump, Registry Usage (RU), SDelete, ShareEnum, ShellRunas, Sigcheck, Streams, Strings, Sync, Sysmon, TCPView, VMMap, VolumeID, WhoIs, WinObj, ZoomIt

Individual Utilities

If you want to use or explore individual utilities then please use the below links for navigation

  1. File and Disk Utilities
  2. Networking Utilities
  3. Process Utilities
  4. Security Utilities
  5. System Information
  6. Miscellaneous

My favorites

  1. DiskMon - Disk monitor whenever read/write happens to hard disk
  2. Disk2vhd - Convert your physical harddisk to Microsoft VHD (Virtual Hard Disk) format
  3. TCPView - List the TCP and UDP ports usage with process name
  4. Active Director Explorer - Advanced Active Directory (AD) viewer and editor
  5. VMMap - Virutal and physical memory analysis utility

Hope, these tools will help you to troubleshoot and/or make use of official Microsoft utilities to explore OS more.

Please send your feedback and comments to psrdotcom@gmail.com

April 21, 2020

Send email from Microsoft excel with customized sheet data

Hi folks,

Have you ever faced requirement where you have to send email from an excel with excel data. If you are in that situation, this blog makes your life easier.

Pre-requisites
Send customized excel data of each row as an email. You should have data in each row and you should know have recipient e-mail address
You should have configured e-mail client like outlook, mail of desktop

Procedure
  1. Use Hyperlink function of excel
    • Syntax
      • =HYPERLINK("mailto:"&e-mailCellNo&"?subject="&subjectCellNo&"&body="&bodyCellNo&"%0A","Send email")
    • Help
      • Cellno in syntax should point to your data cell number
      • %0A - New line
      • mailto - The recipient mail address
      • subject - the text
      • body - the body text
    • Note
      • If you have any special characters, then use ENCODEURL function
      • Don't put the ENCODEURL function in HYPERLINK function
      • Make sure, ENCODEURL output points to a different cell and use that cell number in HYPERLINK
  2. Use $ to use the same cell data repeatedly
  3. After doing the hyperlink to a cell, you should be able to view "Send email"
  4. Click on the send email
  5. Opens the configured/default e-mail client by filling the recipient, subject and body content from excel sheet
  6. Click on "send" or "Ctrl+Enter" keyboard shortcut to send email
Hope, this helps you to explore excel and send email with excel data to many recipients with single click

Please send your valuable feedback and comments to psrdotcom@gmail.com

April 14, 2020

Microsoft SQL Server 2019 Express Docker image Example

Hi Folks,

Today I am going to explain the procedure for connecting to a Microsoft SQL Server 2019 Express edition docker image

Pre-requisites

  1. Docker Desktop
  2. Windows OS
  3. Powershell/command prompt

Procedure

Get and run docker image

> docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<Your_Password>" -e "MSSQL_PID=Express" --name "<Your_SQL_Server_Name>" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest

Command information

Remove the "MSSQL_PID=Express" to run other version of SQL Server
Replace 2019 with required SQL Server version
Password should be atleast 8 characters with capital, small, numeric, special character combination
Use different port if you already have a local sql server
Name should not contain spaces

Check for docker container

> docker ps

You should able to see the container with your SQL Server name at the end in running status

Connect to SQL Server

docker exec -it "<Your_SQL_Server_Name>" /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "<Your_Password>"

You should be able to see "1>" prompt

Command information

Use the SQL Server name or user the container ID

Use database and play around with table(s)

Important
Multiple commands can be entered one after one, but to execute the set of command(s), you need give "GO" command.

Create Database

CREATE DATABASE SampleDB
GO

List all databases

SELECT Name from sys.Databases
GO

Start using the database

USE SampleDB
GO

Create table

CREATE TABLE UserInfo ( Id INT, Name VARCHAR(64))
GO

Insert values

INSERT INTO UserInfo (1, 'ABC')
GO

Retrieve table contents

SELECT * FROM UserInfo
GO

Exit from SQL Server

QUIT

Hope you are able to run the SQL Server Docker image.

Please send your feedback and comments to psrdotcom@gmail.com

November 01, 2018

Microsoft Visual Studio Code with Debugger for Chrome for Static Website Pages

Hi all,

Have you used the Microsoft's free VS Code editor for you web development. I think, you should try it.

Today I'll discuss about how to debug from the VS Code without placing breakpoints on Chrome browser.

Pre-requisites


  1. VS Code should be installed
  2. Debugger for Chrome extension in VS Code


Configuring the debugger

  • Once you open your website in the VS Code
  • In the activity bar, you will find the debugger icon OR you can use the keyboard shortcut Ctrl+Shift+D
  • Now, we will "Add Configuration" to our project
  • On top of the debug sidebar, you will find an option "Add Configuration"
  • Click on "Add Configuration"
  • It will prompt you to select out of box provided options like "Chrome, NodeJS"
  • Choose Chrome
  • Now, launch.json file will be created
  • Configure the launch.json file by specifying URL with port number
  • Since, our project is of static webpages type, instead of webRoot, we will use "file"


Here is the sample launch.json file

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome for my website",
"url": "http://localhost:3001",
"file": "${workspaceFolder}/index.html"
}
]
}

Debug

  • Click on the "Start Debugging" button OR press F5
  • A new chrome window with debugging enabled will be launched
  • Place your breakpoints in VS Code, just by clicking left to the line number in the editor
  • Perform the action and your debug will be hit
  • Note: You can add conditional debugging by editing the break point


Happy debugging.

Please send your review and comments to psrdotcom@gmail.com

August 10, 2018

Microsoft Excel Copy row values to another sheet next available row when the value changes

Hi friends,

My friend had given me a problem in excel of copy row whenever the values changed to another sheet next available row.

I have come-up with this following code

Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Application.Intersect(Target, Target.ActiveSheet.Range("A1:D1")) Is Nothing Then
        Application.EnableEvents = False
        Application.ScreenUpdating = False
        MsgBox ("Hi")
        Call ValueChange
        Application.EnableEvents = True
    End If
End Sub
Sub ValueChange()
        Dim lastrow As Long
        
        lastrow = Sheets("Sheet2").Range("A65536").End(xlUp).Row + 1
        Sheets("Sheet2").Range("A" & lastrow & ": D" & lastrow).Value = Sheets("Sheet1").Range("A1:D1").Value

End Sub

Hope it will help you.

Note:
Please share your valuable comments and feedback to psrdotcom@gmail.com

March 31, 2017

Change currency (Rupees and Euros) to English text in Microsoft Excel

Hi Friends,

Today I'll discussing about converting currency (Rupees and Euros) to textual representation which I have found by googling and updated to cover 2 currencies.

Source

The VBA Macro code is available on my public GIST
ConvertCurrencyToEnglish.txt

Usage


  • Add this in your excel module using developer options
  • Two functions
  • ConvertRupeesToEnglish - Which converts numeric data to rupees with pre-pending "Rupees " and appending " Only"
  • ConvertEurosToEnglish - Which converts numeric data to rupees with pre-pending "Euros " and appending " Only"
  • Note: If number has precisioin, it will add "Paise" and "Cent" to respective currency.
Please send your review and feedback to psrdotcom@gmail.com

December 17, 2014

Pandoc - Easily convery file format from one markup to another markup language

Hi Friends,

Today I come across very useful tool for easily converting/creating different markup languages.

I personally interested in converting/creating HTML, PDF via Latex, MicroSoft Word .docx files

Try Online

To try the conversion online, please click on below link
http://johnmacfarlane.net/pandoc/try
 

Procedure

  1. In "from" dropdown, you can select "Markdown" and "to" dropdown, select "HTML5"
  2. Type the following content
    • % PSR
      PSR Header
      ==========1234

      PSR Sub Heading
      ---------------
      sub heading contents
  3. Click on "convert" button
  4. Now you will be able to see content converted into HTML5 with appropriate tags.

References

http://johnmacfarlane.net/pandoc/

Please send your comments and feedback to psrdotcom@gmail.com

December 09, 2014

Manually Adding Dependency in Spring MicroSoft SQLServer JDBC Driver

Hi Friends,

Today, I’ve spent more than 40 minutes in understanding the process and setting up the SQLServer JDBC Driver in Spring manually

Pre-requisites

Maven (Download from http://maven.apache.org/download.cgi and add the maven path to environment variables)

Procedure

  1. Download the latest Microsoft JDBC driver for SQL Server from the following official link http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774
  2. I’ve selected sqljdbc jar version 4.0
  3. Navigate to the extracted folder where .jar files available in command prompt
  4. Execute the following command
  5. cmd> mvn install:install-file -DgroupId=com.microsoft.sqlserver.jdbc -DartifactId=sqljdbc -Dversion=4.0 -Dpackaging=jar -Dfile="sqljdbc4.jar"
     
  6. Now you should be able to see the downloading and moving the corresponding .jar and .pom files. Then a message “BUILD SUCCESS” will appear in command prompt.
  7. Add the following dependency to your pom.xml
<!-- Database -->
<dependency>
<groupId>com.microsoft.sqlserver.jdbc</groupId>
<agtifactId>sqljdbc</agtifactId>
<version>4.0</version>
</dependency>

    Now you run the project and enjoy the usage of SQLServer Database with Spring.

    Please send your feedback and comments to psrdotcom@gmail.com

    Blogger Labels: Dependency,MicroSoft,SQLServer,JDBC,Driver,Friends,Procedure,Download,Server,version,Navigate,folder,Execute,DgroupId,DartifactId,Dversion,Dfile,message,BUILD,Database,usage,feedback,sqljdbc,groupId,artifactId

    January 30, 2012

    Hide/Unhide Microsoft Excel 2007 Rows/Columns to Protect your data

    Hi Friends,
    Do you want to hide[protect] the data then please follow the steps

    Step 1: User left click in "Microsoft Excel - Book1"
    Step 2: User mouse drag start in "Microsoft Excel - Book1" to select the rows
    Step 3: User mouse drag end in "Microsoft Excel - Book1" to finish the row selection

    Step 4: User right click on any of the selected row number in "Microsoft Excel - Book1" to get the row selection menu

    Step 5: User left click on "Hide (menu item)" to hide the rows along with data

    Step 6: User right click in "Microsoft Excel - Book1" to unhide the hidden rows

    Step 7: User left click on "Unhide (menu item)" to get the data back

    Step 8: Now User can see the rows along with the data

    Step 9: User right click in "Microsoft Excel - Book1" to see the column selection pop-up menu

    Step 10: User left click on "Hide (menu item)" to hide the columns along with the data

    Step 11: User right click in "Microsoft Excel - Book1" to get the pop-up

    Step 12: User left click on "Unhide (menu item)" to get the data back

    Step 13: See the unhidden columns along with data now













































































    Featured Post

    Java Introdcution

    Please send your review and feedback to psrdotcom@gmail.com