tag:blogger.com,1999:blog-30603327394186226942024-03-25T19:27:33.023+05:30DJ BlogsIn this blog, I will explain how things work in azure and how design cloud application.Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.comBlogger55125tag:blogger.com,1999:blog-3060332739418622694.post-5244060299568352012022-02-13T13:53:00.025+05:302022-02-13T19:46:35.866+05:30Functions triggers and bindings<p> Triggers are what cause a function to run. A trigger defines
how a function is invoked and a function must have exactly one trigger.
Triggers have associated data, which is often provided as the payload of the
function.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEje6AXdH078gbntpjS637GXmGYKJTDnoU4FjPZotey1oRhm8m4pV6O39zRRE1bcBHREnJwQSY3QqZznBazLRT2W8t0eHBXE8d0_v3l8FPbF7wwrsLeIbj6tPbWbI0KdEjgxo0EbaZAAH65v9eigZg8iW8siFGdgOumD7oDym9BYdrp8t3_0jGZEQ8t5=s672" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="356" data-original-width="672" src="https://blogger.googleusercontent.com/img/a/AVvXsEje6AXdH078gbntpjS637GXmGYKJTDnoU4FjPZotey1oRhm8m4pV6O39zRRE1bcBHREnJwQSY3QqZznBazLRT2W8t0eHBXE8d0_v3l8FPbF7wwrsLeIbj6tPbWbI0KdEjgxo0EbaZAAH65v9eigZg8iW8siFGdgOumD7oDym9BYdrp8t3_0jGZEQ8t5=s16000" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">Binding to a function is a way of declaratively connecting
another resource to the function; bindings may be connected as input bindings,
output bindings, or both. Data from bindings are provided to the function as
parameters. All triggers and bindings have a direction property in the <b>function.json </b>file<o:p></o:p></p><p class="MsoNormal"></p><ol style="text-align: left;"><li>For triggers, the direction is always <b>in</b></li><li>Input and output bindings use <b>in </b>and <b>out</b></li><li>Some bindings support a special direction input. If you use input, only the <b>Advanced editor</b> is available via the <b>Integrate </b>tab in the portal</li></ol><p></p><p class="MsoNormal"><b><span style="font-size: medium;">Triggers and bindings let you avoid hardcoding access to
other services. </span></b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiJ2934qq2a_c9F6jd2cwcvfPkDf6ovvWPkTFobDF5ARTdRV5quBcf7IeKTL68-CKWmjX89wKNKSNn5pqr-Bq0z_zDot3w7WrY1ewoQDdYPYULL0MkGYJ5HT3-NqzoKOo50fNvzAqW2UoraWljM2bRcHMHsaXKPGUm3sn26g0CHlfCdfD6C6Vpxsl-P=s1339" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="359" data-original-width="1339" height="172" src="https://blogger.googleusercontent.com/img/a/AVvXsEiJ2934qq2a_c9F6jd2cwcvfPkDf6ovvWPkTFobDF5ARTdRV5quBcf7IeKTL68-CKWmjX89wKNKSNn5pqr-Bq0z_zDot3w7WrY1ewoQDdYPYULL0MkGYJ5HT3-NqzoKOo50fNvzAqW2UoraWljM2bRcHMHsaXKPGUm3sn26g0CHlfCdfD6C6Vpxsl-P=w640-h172" width="640" /></a></div><p class="MsoNormal"><br /></p>
<p class="MsoNoSpacing">In the above screenshot, we are copying a newly uploaded file in the blob
input container to the same blob output container with help of the azure function <o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj7I5Mi8ujdUz82DqSAFfDPzrVDLiS3wU2lXL0llm-uCTMXQFjmmVoqIlAHWxcU3cwH4ucQEWFCDauD4pDdQyOhFSrFog0KtMjQ0w3i5pmpM_35G3IfdS2NOxZwJuCRQOQ9po_9W7EvxT0SllTNV4dpGCH57GzabiL_blIWZK87UACk_Tam5iVYs5yb=s493" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="493" data-original-width="316" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEj7I5Mi8ujdUz82DqSAFfDPzrVDLiS3wU2lXL0llm-uCTMXQFjmmVoqIlAHWxcU3cwH4ucQEWFCDauD4pDdQyOhFSrFog0KtMjQ0w3i5pmpM_35G3IfdS2NOxZwJuCRQOQ9po_9W7EvxT0SllTNV4dpGCH57GzabiL_blIWZK87UACk_Tam5iVYs5yb=w410-h640" width="410" /></a></div><br /><p class="MsoNoSpacing"><br /></p><p class="MsoNoSpacing">If you want to learn more about the azure function then read my previous blog about <a href="https://blogs.deepakjoshi.info/2020/08/what-is-azure-function.html" target="_blank">Azure Function</a></p>
<h1><a name="_Toc95651842">Azure Function in Azure portal</a><o:p></o:p></h1>
<p class="MsoNoSpacing">We will create an azure function with help of the Azure portal. In
this demo, we will create 2 containers inside the blob <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Input<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Output<o:p></o:p></p>
<p class="MsoNoSpacing">When the user will upload any file in the input container blob it
will copy to the output container blob with help of the azure function binding feature
without any code. </p>
<p class="MsoNoSpacing">Need to follow the below steps<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Go to the Azure portal (<a href="https://portal.azure.com" target="_blank">https://portal.azure.com</a>/)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->I have created an Azure Function with a consumption plan
which will be hosted in <b>djblogs</b> storage account. If you want to learn more
about the azure function, please my previous blog <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">about <a href="https://blogs.deepakjoshi.info/2020/09/what-is-azure-storage-account.html" target="_blank">AzureStorage Account</a>.</p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjBR7FFK2Fjh036gPqq6EOyfmDRzrPXVoD98ND8ssnZk-F1kUPfu-5UjMj_8mnICTsVsiAKE1-Woj8xXQcrYFnl6sKyimkFW1uIsB7NSgPODEJShnQMadc65qfN-oA8FBUJuKVJxE9MU4tVSiq-eUT9NvR3flFdsgyPS73KMnGqt4iAQ0eLI_qo7FUq=s1181" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="444" data-original-width="1181" height="241" src="https://blogger.googleusercontent.com/img/a/AVvXsEjBR7FFK2Fjh036gPqq6EOyfmDRzrPXVoD98ND8ssnZk-F1kUPfu-5UjMj_8mnICTsVsiAKE1-Woj8xXQcrYFnl6sKyimkFW1uIsB7NSgPODEJShnQMadc65qfN-oA8FBUJuKVJxE9MU4tVSiq-eUT9NvR3flFdsgyPS73KMnGqt4iAQ0eLI_qo7FUq=w640-h241" width="640" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"></p><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Add new function “BlobTrigger1” in the newly created
function app. We will use Azure blob trigger to invoke this function.</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi0lkiVGmfLoWoqAG6k6aXlieJPNLKE6eUDJ_7UYLiQXCz6ZJV8DEQn5TvlQmRZBbOyaPEDsJSDDz-nWz5hQVARs_jADiPAfQobWkeTqT9XSvuaSh5D2YotUF2w9SRAblo7bpGePaamjo5heW5_VNEyTHzmg8AgYvFExsMvJ1xyc7XW2KxdrqqNlOUl=s1344" style="margin-left: 1em; margin-right: 1em; text-align: center; text-indent: 0px;"><img border="0" data-original-height="656" data-original-width="1344" height="312" src="https://blogger.googleusercontent.com/img/a/AVvXsEi0lkiVGmfLoWoqAG6k6aXlieJPNLKE6eUDJ_7UYLiQXCz6ZJV8DEQn5TvlQmRZBbOyaPEDsJSDDz-nWz5hQVARs_jADiPAfQobWkeTqT9XSvuaSh5D2YotUF2w9SRAblo7bpGePaamjo5heW5_VNEyTHzmg8AgYvFExsMvJ1xyc7XW2KxdrqqNlOUl=w640-h312" width="640" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Once the function is created, we can add output in function
on the azure portal and click in the integration link below</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEikua2i1ude9YZWThRBjzRgX8ecS2EXHjKpEVrcqsBUakVMFoSqdZKxAaMcdZT7uk_8-U3snYwHAcHtk3eMsXctjYq8aADaCJg4m5vp9c0MD-0K03CfMqhikSAI9z8F9lhYgu_CjKMgAHbuVqwJsvgxa8qJlEcKBMQ-mQrtAJUgpcddg0ZfUyfvjDAH=s1306" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="616" data-original-width="1306" height="302" src="https://blogger.googleusercontent.com/img/a/AVvXsEikua2i1ude9YZWThRBjzRgX8ecS2EXHjKpEVrcqsBUakVMFoSqdZKxAaMcdZT7uk_8-U3snYwHAcHtk3eMsXctjYq8aADaCJg4m5vp9c0MD-0K03CfMqhikSAI9z8F9lhYgu_CjKMgAHbuVqwJsvgxa8qJlEcKBMQ-mQrtAJUgpcddg0ZfUyfvjDAH=w640-h302" width="640" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"></p><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->5.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->In this demo we will show how to copy any file
which will be uploaded in blob input container with help of the azure function to the same
blob output container.</p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiAYUEEEdPZhVsdeDA6sq_4H1VbhGOoVmvrkSlZ04Nd_sWUjajqqZ7w32DQc5S1ZLUVIOWHNlxLSxa5mV2lZzXwPM4nTtLf6J-O52TbJdzsn6orIBz_dNOEZt934Bhl6gDRqkE9H0EO4-7PIja9Mq8iAewWOhN2P9XgtnXhvcgv97M7Or_s-LuflZOX=s592" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="592" data-original-width="501" src="https://blogger.googleusercontent.com/img/a/AVvXsEiAYUEEEdPZhVsdeDA6sq_4H1VbhGOoVmvrkSlZ04Nd_sWUjajqqZ7w32DQc5S1ZLUVIOWHNlxLSxa5mV2lZzXwPM4nTtLf6J-O52TbJdzsn6orIBz_dNOEZt934Bhl6gDRqkE9H0EO4-7PIja9Mq8iAewWOhN2P9XgtnXhvcgv97M7Or_s-LuflZOX=s16000" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->6.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Once the output is added then we click on the integration
link inside the azure function it will display a link this</p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj0xK2khQzUI31vzf6oH2bZRbsfL30ufeG_rZMKCBa2vyfsLhjZy_Fe_eC_7DaHlIuPw-I049BEyYp4fl25Xve66MP_Y2p3G79a0r9UQ8fgRNEW0I70ICLwigoMJejIk4NW7Hdm6VNmYTMYb_dAAk4i7sfJb4njbWasmG6usUYwV5XoMbzO-IrJjUiA=s1185" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="765" data-original-width="1185" height="414" src="https://blogger.googleusercontent.com/img/a/AVvXsEj0xK2khQzUI31vzf6oH2bZRbsfL30ufeG_rZMKCBa2vyfsLhjZy_Fe_eC_7DaHlIuPw-I049BEyYp4fl25Xve66MP_Y2p3G79a0r9UQ8fgRNEW0I70ICLwigoMJejIk4NW7Hdm6VNmYTMYb_dAAk4i7sfJb4njbWasmG6usUYwV5XoMbzO-IrJjUiA=w640-h414" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->7.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->If we want to see the azure function code, then
need to click on the Code +Test link<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">Function code as below<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b><span style="font-size: 12pt;">Run.csx</span></b></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">No code change in this file</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjHWKxRYV19_n0R3fS4EvzGw6iOPHGcXN2Fm1RZ_DOUOOEym_2fXyh11cbxxtcoboLAzC6LvSR0_Uj4u70A-9NPSovYsb_19n11tRBDYTFJ5tKDut3flMWyixWwtph6JNsvBv3mJqZcIDAku6N53h6UYTeNVELdQTnIaywW_hA_D5TH7dMh1F34Ehxn=s1078" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="335" data-original-width="1078" src="https://blogger.googleusercontent.com/img/a/AVvXsEjHWKxRYV19_n0R3fS4EvzGw6iOPHGcXN2Fm1RZ_DOUOOEym_2fXyh11cbxxtcoboLAzC6LvSR0_Uj4u70A-9NPSovYsb_19n11tRBDYTFJ5tKDut3flMWyixWwtph6JNsvBv3mJqZcIDAku6N53h6UYTeNVELdQTnIaywW_hA_D5TH7dMh1F34Ehxn=s16000" /></a></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b><span style="font-size: 12pt;">Function.json<o:p></o:p></span></b></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">Azure function all binding
defined inside function.json file, so we can see the binding which we have defined</p><p class="MsoNoSpacing"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgo5dwqhIRJ8TnRXXc6ujXnmiXlYkr_8Y8W3MPsYMZLdQakft8YIaQiHCRsj3jIoR6yTvHC7I3DcIBfL_0tI3PvtsmwMOu_DtAkxszEA9cmq8bnZjEyUOtltg_8Cmw88qjKJ_oSCdCeQ9Ba7cWcHCR87M0BBlV0Reu62wpUFsdzZn0cv2lWTyarkGwh=s658" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="556" data-original-width="658" src="https://blogger.googleusercontent.com/img/a/AVvXsEgo5dwqhIRJ8TnRXXc6ujXnmiXlYkr_8Y8W3MPsYMZLdQakft8YIaQiHCRsj3jIoR6yTvHC7I3DcIBfL_0tI3PvtsmwMOu_DtAkxszEA9cmq8bnZjEyUOtltg_8Cmw88qjKJ_oSCdCeQ9Ba7cWcHCR87M0BBlV0Reu62wpUFsdzZn0cv2lWTyarkGwh=s16000" /></a></div><p></p>
<p class="MsoNoSpacing">Hope it will help you to give a little understanding of the azure function trigger and binding<o:p></o:p></p>
<p class="MsoNoSpacing">Keep sharing keep learning. Cheers </p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-29440792034831939562021-10-16T15:06:00.004+05:302021-10-19T06:17:13.189+05:30Web App with Azure Active directory Authentication<p>This article shows you how to configure authentication for Web application so that your app signs in users with the
Microsoft Identity Platform (Azure AD) as the authentication provider.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU47PB0zYY-JXzgTSYjMH8SRCUMjG3e0jnOX566Rw-YQSfGee_rXhk-ZzzqAC-Y9Ehdj-VpUxfkljge6eTDUle4DO59ibZXKyQZ34gDpz6kLh5GXHYrg4R-h8SzPXGNawBRLaV1ZVQdak/s883/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="516" data-original-width="883" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU47PB0zYY-JXzgTSYjMH8SRCUMjG3e0jnOX566Rw-YQSfGee_rXhk-ZzzqAC-Y9Ehdj-VpUxfkljge6eTDUle4DO59ibZXKyQZ34gDpz6kLh5GXHYrg4R-h8SzPXGNawBRLaV1ZVQdak/s16000/1.png" /></a></div>
<p class="MsoNoSpacing">In this blog we will create web application in .net core
with azure active directory authentication. <o:p></o:p></p>
<p class="MsoNoSpacing">We need to follow below steps<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->App registration for azure active directory authentication<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Once registration done then get follow
information from app registration <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l3 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->a.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Domain
(tenant.onmicrosoft.com) <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l3 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->b.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->TenantId<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l3 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->c.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->ClientId
(Application ID)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Create web application in .net core with
Microsoft identity platform authentication type <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Set Domain, TenantId and ClientId in your web
app appsettings. json<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->5.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Add redirect URL for registered app <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->6.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Run the application and it will authenticate with
Azure Active directory <o:p></o:p></p>
<h1><a name="_Toc85288538">App registration for azure active directory authentication</a><o:p></o:p></h1>
<p class="MsoNoSpacing">When we want to authenticate our application with azure
active directory, first we need to register app in our azure active directory.
I have written in previous blog, how we can register app with help of azure
portal. If you have not known about it. Please read that post. I will use same
app registration (HRApp) for azure active directory authentication.</p>
<p class="MsoNoSpacing">What is Azure service principal? <a href="https://blogs.deepakjoshi.info/2021/08/azure-service-principal.html" target="_blank">link</a></p>
<p class="MsoNormal">In this post I have created app with name HRApp. Now I will
use same app for authentication.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWfYhyphenhyphenhO5A6NiJ3O5S5nj-Xsm4uq3YGLgeKZxBccRKt8nNJEGuOJT8o3csY8K24XNlc7Jwjn9e6iJMrlGXtl4Vp74SEwOussSC0AhHiwwSPL9QV5rZjN1-RIMhzgFofMa7UrXTA1BiHLc/s762/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="445" data-original-width="762" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWfYhyphenhyphenhO5A6NiJ3O5S5nj-Xsm4uq3YGLgeKZxBccRKt8nNJEGuOJT8o3csY8K24XNlc7Jwjn9e6iJMrlGXtl4Vp74SEwOussSC0AhHiwwSPL9QV5rZjN1-RIMhzgFofMa7UrXTA1BiHLc/s16000/2.png" /></a></div><p class="MsoNormal"><br /></p>
<h1><a name="_Toc85288539">Create App Web in .net core</a><o:p></o:p></h1>
<p class="MsoNormal">Once app is registered after that we can use that in our web
application for authentication purpose. You need to follow simple steps for it.<o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Open visual studio 2019 <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Creating <b>ASP.NET Core Web App</b>
with name <b>HRApp</b> for demo purpose</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbhyphenhyphen86ThMneCDPwS4Wa5rmZw98Q3C84nBMtcuq_wTC882rLCMeiFw73OC_kxnLc8R4kbRRwrTWMlEm1DCb4yzXU8BVlAaDrxa4yEzj4_mDmt3dY85UJIRfXmLKsh9xPeRow1T2H2rYP0c/s1299/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="363" data-original-width="1299" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbhyphenhyphen86ThMneCDPwS4Wa5rmZw98Q3C84nBMtcuq_wTC882rLCMeiFw73OC_kxnLc8R4kbRRwrTWMlEm1DCb4yzXU8BVlAaDrxa4yEzj4_mDmt3dY85UJIRfXmLKsh9xPeRow1T2H2rYP0c/w640-h179/3.png" width="640" /></a></div><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Once new project name is given
then click on next. It will ask for the .net core framework and authentication type.
I have selected as below</span></p>
<p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"> </span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfqrxVSlxRd3yrawiqQPE1AXqV4YlHDFIjBOF2E70nHSkNCjNyW9O3UUbXUAkhXlnWAn474u2BBiTeVM3SkkBm9P4obM_5SCfO2oF_4JD7okpcgteYIcTtYtzaOJxfKpAH4C18ReNzdv0/s632/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="416" data-original-width="632" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfqrxVSlxRd3yrawiqQPE1AXqV4YlHDFIjBOF2E70nHSkNCjNyW9O3UUbXUAkhXlnWAn474u2BBiTeVM3SkkBm9P4obM_5SCfO2oF_4JD7okpcgteYIcTtYtzaOJxfKpAH4C18ReNzdv0/s16000/4.png" /></a></div><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Once all selected as above
click on create button. It will create web application for you. <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">5.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Project is created now you can
open appsettings. json and some default values setted for Domain, TenantId and ClientId<o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivOjw7S-mPK6PSv-oHk5LDH0vw2YYPVwWHQqqQQIihQB6qCxAxjLLEONlG8e5MdX3VnHqBn8wb_zLvqCg-zuKEwIHlRVbqjYUATZyoZN8wOq4Xw7sCARCR3KIazFE318f8aBrqvrva7kU/s783/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="322" data-original-width="783" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivOjw7S-mPK6PSv-oHk5LDH0vw2YYPVwWHQqqQQIihQB6qCxAxjLLEONlG8e5MdX3VnHqBn8wb_zLvqCg-zuKEwIHlRVbqjYUATZyoZN8wOq4Xw7sCARCR3KIazFE318f8aBrqvrva7kU/s16000/5.png" /></a></div><p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><br /></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">6.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">We need to replace these values
with our app registration values like below screen</span></p><p class="MsoListParagraphCxSpLast"><span lang="EN-IN"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD4tqlC6uLK6M2tctHCugTw95FLnA0EQwWbcFGQ3NP5FG1yiImKnhdr3v_WJDsTtNVMn4Hf-S5cwXGOEWghB8rVTjBGWax55i8A9WNKSrP-wZVmrWgoClUT58sVuaeDON79ANX1J3Utsc/s844/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="666" data-original-width="844" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD4tqlC6uLK6M2tctHCugTw95FLnA0EQwWbcFGQ3NP5FG1yiImKnhdr3v_WJDsTtNVMn4Hf-S5cwXGOEWghB8rVTjBGWax55i8A9WNKSrP-wZVmrWgoClUT58sVuaeDON79ANX1J3Utsc/s16000/6.png" /></a></div><br /><p></p>
<h1><a name="_Toc85288540">Add redirect URL in registered app</a> <o:p></o:p></h1>
<p class="MsoNormal">Once all values updated, we need to get the .net web
application url and add that url in app registration redirect url. In my case
application URL is <a href="https://localhost:44381/">https://localhost:44381</a>.
I have followed below steps for it<o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Go to azure portal <a href="https://portal.azure.com/">https://portal.azure.com/</a><o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Once login in portal go to
azure active directory and select your tenant where your app was registered<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Go to App registrations and
selected your app (HRApp)</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><span lang="EN-IN"> </span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsvGY0J5PdnVWVAdcmlYYFi1kvD_97tceQmMZKql2hYtdiFI7SKYrcHATLhn9gLYWSYbR849Qlkmj-Xi9uxcyNgG82RrneWmvqhRurk6BO7PQ0ul9g-SCamalfxLaEm4LqVUvM_CM-iJQ/s1044/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="588" data-original-width="1044" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsvGY0J5PdnVWVAdcmlYYFi1kvD_97tceQmMZKql2hYtdiFI7SKYrcHATLhn9gLYWSYbR849Qlkmj-Xi9uxcyNgG82RrneWmvqhRurk6BO7PQ0ul9g-SCamalfxLaEm4LqVUvM_CM-iJQ/s16000/7.png" /></a></div><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Click on Authentication and Add
a platform for configurations. I have selected Web.</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8S2PPg8MA1LcezGbWUF5JQUzlg6lZmEh337pkal_TMLPTDmBzOBGiPQd-HoZafy8awuljm2MBeIgWPCH89byz5PfRwThuOXHtRBcRZPT0_MTFEqzqZrY_XEqxFvUGWAj7H9Lq2DOfYVg/s1048/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="508" data-original-width="1048" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8S2PPg8MA1LcezGbWUF5JQUzlg6lZmEh337pkal_TMLPTDmBzOBGiPQd-HoZafy8awuljm2MBeIgWPCH89byz5PfRwThuOXHtRBcRZPT0_MTFEqzqZrY_XEqxFvUGWAj7H9Lq2DOfYVg/w640-h310/8.png" width="640" /></a></div><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">5.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Once web is selected then need
to put redirect URL and checkbox checked <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 77.25pt; mso-add-space: auto; mso-list: l0 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">a.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Redirect URIs: <a href="https://localhost:44381/signin-oidc" rel="nofollow">https://localhost:44381/signin-oidc</a><o:p></o:p></span></p>
<p class="MsoListParagraphCxSpLast" style="margin-left: 77.25pt; mso-add-space: auto; mso-list: l0 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">b.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Checked checkbox: ID tokens (used for implicit and hybrid flows)</span><o:p></o:p></p>
<p class="MsoNormal"> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwtZ7KqRf5WULnlihOKeeTuCUTd7EYq9psJzPuqsdTZIGpFJPDigqEjPQ4eCWiZJOsKRAI1Luqu59IbLappWYILPjA4Y0SaDOcA5PysELmD5LioLnb2AkRdEwDw_NhXWeLyvsNxMWrI6I/s514/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="514" data-original-width="509" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwtZ7KqRf5WULnlihOKeeTuCUTd7EYq9psJzPuqsdTZIGpFJPDigqEjPQ4eCWiZJOsKRAI1Luqu59IbLappWYILPjA4Y0SaDOcA5PysELmD5LioLnb2AkRdEwDw_NhXWeLyvsNxMWrI6I/s16000/9.png" /></a></div><br /><o:p></o:p><p></p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">6.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Click on configure it will show
like below. You can add multiple Redirect URIs</span></p><p class="MsoListParagraphCxSpFirst" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtzGldthmwRLR9bG2zhGQB2OkjoYSgejB0mm9-piW9ExveLXbo07qPEk1BHy-t8CURxx7L4jbFHQhMWy-pzFuUtYyoFAb7PFUkKhpaxPAJhdqZ-Ze0y8q2OPXBOpsAWAHEaHfY25jRYwc/s1161/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="550" data-original-width="1161" height="303" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtzGldthmwRLR9bG2zhGQB2OkjoYSgejB0mm9-piW9ExveLXbo07qPEk1BHy-t8CURxx7L4jbFHQhMWy-pzFuUtYyoFAb7PFUkKhpaxPAJhdqZ-Ze0y8q2OPXBOpsAWAHEaHfY25jRYwc/w640-h303/10.png" width="640" /></a></div><br /><span lang="EN-IN"><br /></span><p></p>
<h1><a name="_Toc85288541">Run the application</a><o:p></o:p></h1>
<p class="MsoNormal">Now all set now, we can run our application in visual studio
2019. When we run it will do below things?<o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Run the application and it will
redirect us to Microsoft login screen <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><span lang="EN-IN"> </span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLwQ1GrQWhnFcD1rsvBBgnfzM8R5MfxPZvMTxfZ41MbqmNmFF4kjrSjCrIKI6Kmf5_ofYpeXpvrduYag6iqhRwzDxnNQsW2OgbYVW8_GO24b6D6bWzA_wa_UEXswKEqSHB6gI6eFaCXW8/s462/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="373" data-original-width="462" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLwQ1GrQWhnFcD1rsvBBgnfzM8R5MfxPZvMTxfZ41MbqmNmFF4kjrSjCrIKI6Kmf5_ofYpeXpvrduYag6iqhRwzDxnNQsW2OgbYVW8_GO24b6D6bWzA_wa_UEXswKEqSHB6gI6eFaCXW8/s16000/11.png" /></a></div><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Enter your email id and
password and click on Sign in <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">If sign in successful it will
ask for your consent<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><span lang="EN-IN"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHj6sx0Q0UgP9e1W4W79eHmZ-_BYgpCW6b2IT3UxryeIpJtLDNxuvSyYu8Ibhx643YxLsORKG8sV3FTA1jULWf5PNHwTV5_2FavXvdohcevpbWoHtnfdkRmXQDC2EQuHgt8qEFj1e0-G4/s608/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="608" data-original-width="471" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHj6sx0Q0UgP9e1W4W79eHmZ-_BYgpCW6b2IT3UxryeIpJtLDNxuvSyYu8Ibhx643YxLsORKG8sV3FTA1jULWf5PNHwTV5_2FavXvdohcevpbWoHtnfdkRmXQDC2EQuHgt8qEFj1e0-G4/s16000/12.png" /></a></div><br /> <p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Click on accept button. It will
open web application with active directory authentication</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWUXtpJmK-8P3urDlBGvDo9Y3ZnnhHq9VEORC9hmoBU2TMwhma-5nckSW_vV2FDq0e-_zob0DaWSGY_wopTVTms2dAez6ZPKAHYDeGH7iaAoFNZZuxB6zBH0XsFVPh0aJ0iHkiLlamYqo/s1244/13.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="358" data-original-width="1244" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWUXtpJmK-8P3urDlBGvDo9Y3ZnnhHq9VEORC9hmoBU2TMwhma-5nckSW_vV2FDq0e-_zob0DaWSGY_wopTVTms2dAez6ZPKAHYDeGH7iaAoFNZZuxB6zBH0XsFVPh0aJ0iHkiLlamYqo/w640-h184/13.png" width="640" /></a></div><br /><o:p></o:p><p></p>
<p class="MsoNoSpacing">Hope it will help you to implement active directory authentication
in your web application.<o:p></o:p></p>
<p class="MsoNoSpacing">Keep sharing keep learning <o:p></o:p></p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com7tag:blogger.com,1999:blog-3060332739418622694.post-75716660835612456482021-08-22T11:25:00.008+05:302021-08-22T11:31:55.455+05:30Azure service principal<p><span style="text-align: justify;">An Azure Active Directory (Azure
AD) service principal is the local representation of an application object in a
single tenant or directory. It functions as the identity of the application instance.
Service principals define who can access the application, and what resources
the application can access. A service principal is created in each tenant where
the application is used and references the globally unique application object.
The tenant secures the service principal’s sign in and access to resources.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhADHS-be7hS3dPu8aZHWPhfnt87P2b5IEr3C20yCSGcXiRH4mmekIiXI2Ww2n-7MYHU4xsPtPzoidm28qTxUponvvHVZ48txHohpIx1nwZf0vYppg-gxqeAwITyCNCRuZ9j-DcGK7YWVs/s667/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="441" data-original-width="667" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhADHS-be7hS3dPu8aZHWPhfnt87P2b5IEr3C20yCSGcXiRH4mmekIiXI2Ww2n-7MYHU4xsPtPzoidm28qTxUponvvHVZ48txHohpIx1nwZf0vYppg-gxqeAwITyCNCRuZ9j-DcGK7YWVs/s16000/1.png" /></a></div><br /><span style="text-align: justify;"><br /></span><p></p>
<p class="MsoNormal" style="text-align: justify;">A multi-tenant application is
homed in a single-tenant (home tenant) and is designed to have instances in
other tenants. Most software-as-a-service (SaaS) applications are designed for
multi-tenancy. Use service principals to ensure the right security posture for
the application and its users in both single-tenant and multi-tenant use cases.<o:p></o:p></p>
<h1><a name="_Toc80523633">Application registration</a></h1>
<p class="MsoNoSpacing">When you register your application with Azure AD, you're
creating an identity configuration for your application that allows it to
integrate with Azure AD. When you register an app in the Azure portal, you
choose whether it's a single-tenant (only accessible in your tenant) or
multi-tenant (accessible in other tenants) and can optionally set a redirect
URI (where the access token is sent to).<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">When you've completed the app
registration, you have a globally unique instance of the app (the application
object) which lives within your home tenant or directory. You also have a
globally unique ID for your app (the app or client ID).</p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjocB4irmRXJ-ix4_u54S2sj2SLdSyyCTtPLxJrL-ELENIflM50NldkwQxh-Y2Kym5IUNXkAJJZiWd-KmQk4Sv4C6dTVfM0V1y_VcdZXii_8Kul-TDG3Qb5wSqfkLWzuCF5fynq7hZW1dM/s753/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="638" data-original-width="753" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjocB4irmRXJ-ix4_u54S2sj2SLdSyyCTtPLxJrL-ELENIflM50NldkwQxh-Y2Kym5IUNXkAJJZiWd-KmQk4Sv4C6dTVfM0V1y_VcdZXii_8Kul-TDG3Qb5wSqfkLWzuCF5fynq7hZW1dM/s16000/2.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="text-align: justify;">If you register an application
in the portal, an application object, as well as a service principal object, are
automatically created in your home tenant.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj53A0ZGlCdp4UXMHa5tOhBHt2wN7j16FTLg2JJpRk8It_UUWhtnsRbzkeHxMJqwGGb9hlzdubRTbwELMNDxh-gronoSI8RhxBJkNJa2Sfat3r-fY1g05Yrj94M5TBAlH9gsfTJ6DePjkA/s1024/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="695" data-original-width="1024" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj53A0ZGlCdp4UXMHa5tOhBHt2wN7j16FTLg2JJpRk8It_UUWhtnsRbzkeHxMJqwGGb9hlzdubRTbwELMNDxh-gronoSI8RhxBJkNJa2Sfat3r-fY1g05Yrj94M5TBAlH9gsfTJ6DePjkA/s16000/3.png" /></a></div><br /><p class="MsoNormal" style="text-align: justify;"><br /></p>
<h2><a name="_Toc80523634">Application object</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">An Azure AD application is
defined by its one and only application object, which resides in the Azure AD
tenant where the application was registered (known as the application's
"home" tenant). An application object is used as a template or
blueprint to create one or more service principal objects. A service principal
is created in every tenant where the application is used.<o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">The application object describes
three aspects of an application.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->How the service can issue tokens in order to
access the application.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Resources that the application might need to
access.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->The actions that the application can take.</p>
<h3><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP60fTiXoYc3XhirX2GTvvbnMSosYSwDF_pNTVpmk3264b5H7citIDRRTtru8_04eNNsNf7kwdCEKHHjXeaNAxjfyan1X0mvbR3_j1AHzLJGRoyh7kYqkrm-K_pUz3KdNN5hlYm38kCNg/s762/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="445" data-original-width="762" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP60fTiXoYc3XhirX2GTvvbnMSosYSwDF_pNTVpmk3264b5H7citIDRRTtru8_04eNNsNf7kwdCEKHHjXeaNAxjfyan1X0mvbR3_j1AHzLJGRoyh7kYqkrm-K_pUz3KdNN5hlYm38kCNg/s16000/4.png" /></a></div><a name="_Toc80523635"><br /></a></h3><h3><a name="_Toc80523635">Application Id</a><o:p></o:p></h3>
<p class="MsoNoSpacing">ApplicationId will be same for single application object
that represents this application as well as it will be same for all service
principals created for this application.<o:p></o:p></p>
<h3><o:p> </o:p></h3>
<h3><a name="_Toc80523636">Object Id</a><o:p></o:p></h3>
<p class="MsoNoSpacing">ObjectId will be a unique value for application object
and each of the service principal. This uniquely identifies the object in Azure
AD.<o:p></o:p></p>
<h2><a name="_Toc80523637">Service principal object</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">To access resources that are
secured by an Azure AD tenant, the entity that requires access must be
represented by a security principal. This requirement is true for both users
(user principal) and applications (service principal). The security principal
defines the access policy and permissions for the user/application in the Azure
AD tenant. This enables core features such as authentication of the
user/application during sign-in, and authorization during resource access.<o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">There are three types of service
principal<o:p></o:p></p>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><span lang="EN-IN">1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Application- The type of
service principal is the local representation, or application instance, of a
global application object in a single tenant or directory.<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><span lang="EN-IN">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Managed identity- This type of
service principal is used to represent a managed identity. It is used for
“linking” a Service Principal security object to an Azure Resource like a
Virtual Machine, Web App, Logic App or similar. If you want to learn more about
it, you can read my <a href="https://blogs.deepakjoshi.info/2021/06/managed-identity.html" target="_blank">previous blog</a>.<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><span lang="EN-IN">3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Legacy- This type of service
principal represents a legacy app, which is an app created before app
registrations were introduced or an app created through legacy experiences.<o:p></o:p></span></p></blockquote><p class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--></p>
<p class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--></p>
<p class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--></p>
<p class="MsoListParagraphCxSpLast" style="text-align: justify;"><span lang="EN-IN"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKqkRd8LKN6tq_dQ-YYshC97AY9JZmpMS7TEDsr48ffUJECeBUV9p_H3-VM-KBYpi61PZ9fJWH1VEGuZB_2EkETGWwjnWS-ydeKY7REVizzRWAQfRlwJI6Q-NJZLxD4daGvq5qnG11pg4/s1351/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="728" data-original-width="1351" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKqkRd8LKN6tq_dQ-YYshC97AY9JZmpMS7TEDsr48ffUJECeBUV9p_H3-VM-KBYpi61PZ9fJWH1VEGuZB_2EkETGWwjnWS-ydeKY7REVizzRWAQfRlwJI6Q-NJZLxD4daGvq5qnG11pg4/w640-h345/5.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing">Hope it will help you to understand service principle and
in a future blog, we will use them<o:p></o:p></p>
<p class="MsoNoSpacing">Keep sharing keep learning </p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-7464276779336208672021-07-21T13:27:00.006+05:302021-07-21T13:39:29.488+05:30Authenticate Azure Functions with Swagger UI<p> In this blog, we will see how we can secure our azure
functions with API Keys and use swagger for API documentation. Swagger is an
Interface Description Language for describing RESTful APIs expressed using
JSON. If you want to learn more about azure function. Please look into my previous
blog (<a href="https://blogs.deepakjoshi.info/2020/08/serverless-apis-with-azure-function_30.html" target="_blank">link</a>)
about azure function to create rest serverless api .</p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">There are multiple ways to secure your Azure Functions like
API Keys, API Management, App Service Authentication (App registration in
active directory), etc. If you want to make a start with minimal effort and
less setup of Infrastructure, then API Keys is the ideal choice.<o:p></o:p></p>
<p class="MsoNormal">Azure Functions allows you to secure HTTP-triggered
functions by API access key in the request. We can send HTTP request with help
of <b>Swagger</b>, <b>Postman</b>, <b>JavaScript</b> etc. <span style="mso-spacerun: yes;"> </span>As part of creating new Azure Functions, we
can select the Authorization Level enum value.<o:p></o:p></p>
<div style="margin-left: 1em; margin-right: 1em; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJZkj_RoA1RsvDRyaIcPQbdrdlo7Il95IH1fE-GuihTTbReH69MlM1sIbvOSOlM_TLCS9hKn9mLeBFd3QCDSympnN1mGHQ0eyAbl45lcOQaxfMPchXAIgjQczvsNxFf8v6Ns1K-n8qTI8/s712/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="531" data-original-width="712" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJZkj_RoA1RsvDRyaIcPQbdrdlo7Il95IH1fE-GuihTTbReH69MlM1sIbvOSOlM_TLCS9hKn9mLeBFd3QCDSympnN1mGHQ0eyAbl45lcOQaxfMPchXAIgjQczvsNxFf8v6Ns1K-n8qTI8/s16000/1.png" /></a></div><h1><a name="_Toc77765418">Azure Functions with Swagger UI</a> <o:p></o:p></h1>
<p class="MsoNormal" style="text-align: justify;">I am creating new project in
visual studio 2019 to demonstrate. How we can add swagger ui in azure function.
We need follow below steps. <o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Open visual studio 2019 and
create new azure function project with name <b>FunctionApp.Swagger</b></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxcLGaBAi46RjXW8R1b2pTMupJjEmGnyqhiPqogNm_WwkXA9bc_UTXuV2vzjus8IzPriW1IbMvCgOBYjrqP6PKV25gEGBt7q4ARN0S_oEEOflvoXjWA4myKw9Tj2kws0usFDPmyWVMJMM/s1306/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="698" data-original-width="1306" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxcLGaBAi46RjXW8R1b2pTMupJjEmGnyqhiPqogNm_WwkXA9bc_UTXuV2vzjus8IzPriW1IbMvCgOBYjrqP6PKV25gEGBt7q4ARN0S_oEEOflvoXjWA4myKw9Tj2kws0usFDPmyWVMJMM/w640-h342/2.png" width="640" /></a></div><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Choose option as above screen.
If you want to add swagger UI in API make sure you have selected <b>Http
Trigger with OpenAPI</b> option. <span style="mso-spacerun: yes;"> </span><o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">In this project we are using <b>Function</b>
level Authorization. When we set Authorization level then need to pass authentication
token to access the resource. We will pass API key as authentication token with
HTTP request <span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once all information filled as
above then we will click on create button. It will create Function1<span style="mso-spacerun: yes;"> </span>as below<o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipHEID0zGaFulYqArOPQxspOTQPo1e2lddOXJE36tkn8iQfywbCpQK1FItxgTUceLBKzPg65y_FdXVBp981DDcsF3SP_tipYJ7Se6RMJYHCuureNHT5jSC1i0IpwIlt0e_mWsOw71kf_w/s1087/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="630" data-original-width="1087" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipHEID0zGaFulYqArOPQxspOTQPo1e2lddOXJE36tkn8iQfywbCpQK1FItxgTUceLBKzPg65y_FdXVBp981DDcsF3SP_tipYJ7Se6RMJYHCuureNHT5jSC1i0IpwIlt0e_mWsOw71kf_w/s16000/3.png" /></a></div>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">If we run the azure function
with help of Visual studio 2019. It will open console window with swagger ui
url as above screen. In my case azure function swagger UI is <a href="http://localhost:7071/api/swagger/ui">http://localhost:7071/api/swagger/ui</a><o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">If we open the swagger ui url
in browser it will display like this and we can make HTTP request<o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWvHv7TVRJUikv5jYA-qOiGT0PaUVqt9sjsdz75tt-qF8oZzSfNQZLxgbC7Ht1mVG5GiYw0xcSx3pSkYNSt72J3s6G0QTMBWrfaSzSXAMgQR1JnNiOZUb00aChg4OrkmDbmcs2FyvQVcM/s1257/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="403" data-original-width="1257" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWvHv7TVRJUikv5jYA-qOiGT0PaUVqt9sjsdz75tt-qF8oZzSfNQZLxgbC7Ht1mVG5GiYw0xcSx3pSkYNSt72J3s6G0QTMBWrfaSzSXAMgQR1JnNiOZUb00aChg4OrkmDbmcs2FyvQVcM/w640-h205/4.png" width="640" /></a></div>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">When we run application in localhost,
we don’t need to pass API key in Swagger UI. It will execute our HTTP request
without it. Once we deploy the application in Azure then need to pass API key by
clicking on Authorize<o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjynwUNfs6mbbGQrVM5lj_1DsnS48vwD9LPa7l50mOpJ5IIKiN0ZYutyFhxFDHthqmKjEeychaCXKV9zzZTn6Bq6kLaM15Y6zsHYcrOXnVcAEhDHZ6QeVDM2N8TY1f-ofurU1hz0Yn6PgI/s1183/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="697" data-original-width="1183" height="377" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjynwUNfs6mbbGQrVM5lj_1DsnS48vwD9LPa7l50mOpJ5IIKiN0ZYutyFhxFDHthqmKjEeychaCXKV9zzZTn6Bq6kLaM15Y6zsHYcrOXnVcAEhDHZ6QeVDM2N8TY1f-ofurU1hz0Yn6PgI/w640-h377/5.png" width="640" /></a></div><p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; text-align: justify;"><br /></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN"><span style="mso-spacerun: yes;"> </span>You can see swagger UI added in our API and we
can make HTTP request directly from browser with help of swagger <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpLast" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Now we ready to deploy
application Azure.</span></p>
<h1><a name="_Toc77765419">Consume Azure Function</a> <span style="mso-spacerun: yes;"> </span><o:p></o:p></h1>
<p class="MsoNormal">Once our application tested in local machine then we need to
deploy it on Azure. I have created new azure function (djblogsfuncappwithswagger)
in Azure with help of portal. Once azure function created in azure then we need
to download the publish profile and publish our code directly from visual
studio 2019. <o:p></o:p></p>
<p class="MsoNormal">Need to follow below steps to publish azure function in Azure<o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Created new azure function (djblogsfuncappwithswagger)
with consumption app service plan in portal<o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxCzNxGu_349mJQy4bcooyXAc_aytTz2liR7LkoHzrdtnz2m-0rCtHyajIQCuCv_LRTqKi2dESlAQAGrXSgesh65TTxrOr5Pg81D6Y_pn5K4Enl9XKlrqNrg-5lwvvOjmCAm1ujH41G1s/s1272/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="656" data-original-width="1272" height="330" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxCzNxGu_349mJQy4bcooyXAc_aytTz2liR7LkoHzrdtnz2m-0rCtHyajIQCuCv_LRTqKi2dESlAQAGrXSgesh65TTxrOr5Pg81D6Y_pn5K4Enl9XKlrqNrg-5lwvvOjmCAm1ujH41G1s/w640-h330/6.png" width="640" /></a></div>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once azure function created
then need to download publish profile to publish azure function code from
visual studio 2019 as below<o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFtk7HAaWRXfEF-53XzDfKK-BREOaQQASNbaIQgZ_mIXO59KJA4oHbpa0v9COG4nKePnXVTQn8YguJIyGZkWBRKG6AQvIKfSRqMf4FOArTCS7AjnS7wktRdwy3kB96Xn2yTY-H5iAHiEM/s1143/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1143" data-original-width="1030" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFtk7HAaWRXfEF-53XzDfKK-BREOaQQASNbaIQgZ_mIXO59KJA4oHbpa0v9COG4nKePnXVTQn8YguJIyGZkWBRKG6AQvIKfSRqMf4FOArTCS7AjnS7wktRdwy3kB96Xn2yTY-H5iAHiEM/s16000/7.png" /></a></div>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once azure function published in
Azure then we can make HTTP request with help of swagger UI.<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto;"><span lang="EN-IN">URL: <a href="https://djblogsfuncappwithswagger.azurewebsites.net/api/swagger/ui" target="_blank">https://djblogsfuncappwithswagger.azurewebsites.net/api/swagger/ui</a><o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">When we run API in browser
without API Key it will give this Unauthorized error <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto;"><b><i><span lang="EN-IN">401 Error: Unauthorized<o:p></o:p></span></i></b></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw-5pWkGflmk78lsiWtqdkjT7kJzdx_meL_-mBncz2zpXWaENJJKkhAsVyA6YV63LfXRClHrrD7D_HOZqm7AZJx0fq6rz3-U4UcV8mIVDt5d7IpO1WuBVNHHXWggS8lZbCXDB0G60cClg/s771/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="648" data-original-width="771" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw-5pWkGflmk78lsiWtqdkjT7kJzdx_meL_-mBncz2zpXWaENJJKkhAsVyA6YV63LfXRClHrrD7D_HOZqm7AZJx0fq6rz3-U4UcV8mIVDt5d7IpO1WuBVNHHXWggS8lZbCXDB0G60cClg/s16000/8.png" /></a></div><br /><p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto;"><br /></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto;"><b><i><span lang="EN-IN"><o:p> </o:p></span></i></b></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">We can get API key from Azure function.
Need to open azure portal and go to azure function there is default API key.
This is created by default when azure function created. <span style="mso-spacerun: yes;"> </span>If you want you can create multiple keys as per
our requirement <span style="mso-spacerun: yes;"> </span><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwbx1pZcvPeGESONrrpbcbkOMR9AYD-fAS-lRcyqEEp8acuYk77h-Qh3IJFQZFRsNP1aOCYOk2yEd2s0G1-Wi_bvAxrYJc5SeDY-38-18wr4WSqHCh4FA5ndTOYW5PUXRYs2SW4Ou6Xwc/s1076/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="940" data-original-width="1076" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwbx1pZcvPeGESONrrpbcbkOMR9AYD-fAS-lRcyqEEp8acuYk77h-Qh3IJFQZFRsNP1aOCYOk2yEd2s0G1-Wi_bvAxrYJc5SeDY-38-18wr4WSqHCh4FA5ndTOYW5PUXRYs2SW4Ou6Xwc/s16000/9.png" /></a></div><p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; text-align: justify;"><br /></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">We will copy the default key from
functions keys and add that key in swagger authorize as below screen.</span> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6dgaoTkVtQZyE5dLGVyKPLxUKtSSlxjRBKw3TL7dsYliX2z8OJhjdkQwn5HHksTbpbLRFZmXOJPsWnw0j46xamj-hnrO1vFsCFkhoSeGjB2b-xTfflnoKwUPvXs2p37sbJ48Z7q_Yerg/s1075/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="696" data-original-width="1075" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6dgaoTkVtQZyE5dLGVyKPLxUKtSSlxjRBKw3TL7dsYliX2z8OJhjdkQwn5HHksTbpbLRFZmXOJPsWnw0j46xamj-hnrO1vFsCFkhoSeGjB2b-xTfflnoKwUPvXs2p37sbJ48Z7q_Yerg/s16000/10.png" /></a></div><br /><p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once key added in Swagger UI Authorize
and then we try to make HTTP request. It will be executed with HTTP code 200. <span style="mso-spacerun: yes;"> </span><o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">We can make the HTTP request
from Postman as well by adding <b>x-functions-key </b>in HTTP request header
like below screen shot.<o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDwsvMN2rDW8VMjFxKjnAMyComNifUq7Lo___yc4JTCzrNpuG95KO8rsMnh6fMhs32W4Wz-hc2lCe8qA9r1km007u0VjZ2bHN_c2p3B_92OJ8ZZFW4AQ795iIZaOeZfOUI5R94COUIjIU/s858/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="422" data-original-width="858" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDwsvMN2rDW8VMjFxKjnAMyComNifUq7Lo___yc4JTCzrNpuG95KO8rsMnh6fMhs32W4Wz-hc2lCe8qA9r1km007u0VjZ2bHN_c2p3B_92OJ8ZZFW4AQ795iIZaOeZfOUI5R94COUIjIU/s16000/11.png" /></a></div>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Same way we can make request
from JavaScript and jQuery as well.<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 38.25pt; mso-add-space: auto;"><span lang="EN-IN">GitHub Link: <a href="https://github.com/deepakjoshiinfo/FunctionApp.Swagger/blob/master/WebApp/Pages/Index.cshtml" target="_blank">https://github.com/deepakjoshiinfo/FunctionApp.Swagger/blob/master/WebApp/Pages/Index.cshtml</a></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjHwsE-ybMMSmkK5kbTEy7msZvazPxLU90ut8_auzX2npWbyujEShvcp4pPmTCkPobmPdGulG3ptupnhYDhswSdPHdE3Z2lEBIjpPaoqZz32zDe4Z7w8O-cQrgjHQTKIk-li9up8gkngQ/s996/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="439" data-original-width="996" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjHwsE-ybMMSmkK5kbTEy7msZvazPxLU90ut8_auzX2npWbyujEShvcp4pPmTCkPobmPdGulG3ptupnhYDhswSdPHdE3Z2lEBIjpPaoqZz32zDe4Z7w8O-cQrgjHQTKIk-li9up8gkngQ/s16000/12.png" /></a></div><p></p>
<p class="MsoNormal">I have uploaded code in GitHub. You can download code from
there<o:p></o:p></p>
<p class="MsoNormal">GitHub: <a href="https://github.com/deepakjoshiinfo/FunctionApp.Swagger" target="_blank">https://github.com/deepakjoshiinfo/FunctionApp.Swagger</a><o:p></o:p></p>
<p class="MsoNormal">Hope it will help you give little idea about authorization
and authentication of Azure functions<o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">Keep sharing keep learning.
Cheers</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com1tag:blogger.com,1999:blog-3060332739418622694.post-22724880342334600952021-07-14T11:03:00.006+05:302021-07-14T11:22:45.536+05:30What is bicep in azure?<p><span style="text-align: justify;">Bicep is a Domain Specific
Language (DSL) for deploying Azure infrastructure (resources) declaratively. Bicep
code is transpiled to standard ARM Template JSON files (Infrastructure as code
file), which effectively treats the ARM Template as an Intermediate Language
(IL). Bicep provides concise syntax, reliable type safety, and support for code
reuse. We believe Bicep offers the best authoring experience for your Azure
infrastructure as code solutions.</span></p><p class="MsoNormal" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">You can use Bicep instead of JSON
to develop your Azure Resource Manager templates (ARM templates). The JSON
syntax to create an ARM template can be verbose and require complicated
expressions. Bicep syntax reduces that complexity and improves the development
experience. Bicep is a transparent abstraction over ARM template JSON and
doesn't lose any of the JSON template capabilities. During deployment, Bicep
CLI transpiles a Bicep file into ARM template JSON.</p><p class="MsoNormal" style="text-align: justify;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim8rnC-dxhXO-pK3AX-p4lZ5AsAoOsy_kwUc3xclKy437_VaUvRJjL_QMg9n629g2eX8SwnRv7pCwEJRTy_DbIjZuIqR_PMgM4vPrazrmWUsrAFanTnPqRW83CgDn3stOjQ62VtaHqLb8/s679/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="577" data-original-width="679" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim8rnC-dxhXO-pK3AX-p4lZ5AsAoOsy_kwUc3xclKy437_VaUvRJjL_QMg9n629g2eX8SwnRv7pCwEJRTy_DbIjZuIqR_PMgM4vPrazrmWUsrAFanTnPqRW83CgDn3stOjQ62VtaHqLb8/s16000/1.png" /></a></div><br /><p></p>
<h1><a name="_Toc77151685">Create Azure Resource (Infrastructure) in Visual
studio code</a><o:p></o:p></h1>
<p class="MsoNormal" style="text-align: justify;">We will create azure resource
inside visual studio code with help of Bicep. Need to follow below steps.<o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Install visual studio code below
URL<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN"><a href="https://code.visualstudio.com/download" target="_blank">https://code.visualstudio.com/download</a></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once visual studio code is
installed then need to add Bicep extension like below</span></p><p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN"><span style="mso-spacerun: yes;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOiY-gWIwjojPYtMHbKY6k5J3EUkOZSg39WfH4m1ydByUt2gMn581NCo8LdINph9lyLX7u5YrUPxBEkjXh5X1XS6wujaPKne2GnU1HLWtx7EM7ihH0QZLE9pIdFiaW67RL47Qg-3iuSWA/s1268/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="690" data-original-width="1268" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOiY-gWIwjojPYtMHbKY6k5J3EUkOZSg39WfH4m1ydByUt2gMn581NCo8LdINph9lyLX7u5YrUPxBEkjXh5X1XS6wujaPKne2GnU1HLWtx7EM7ihH0QZLE9pIdFiaW67RL47Qg-3iuSWA/w640-h348/2.png" width="640" /></a></div><br /><o:p></o:p><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">After installing Bicep then
code IntelliSense will come in VS Code for azure resources. Now open to the
folder from VS code file menu, where you want to create Bicep project and add
new file name (main.bicep)</span> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcpzfXL9m70GbFZL4JZ5PuAuhvEnFjOPGaG9_vABR4SizFUTKbj0OHdycrOXYcM-vKgg_P6LggNV0MCl4L2ySHtZxmuqK2CKEF-Fo9G_BiwwlmRa2MfQPqjVRHkczmLdtFQKcCGn4vJIc/s914/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="608" data-original-width="914" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcpzfXL9m70GbFZL4JZ5PuAuhvEnFjOPGaG9_vABR4SizFUTKbj0OHdycrOXYcM-vKgg_P6LggNV0MCl4L2ySHtZxmuqK2CKEF-Fo9G_BiwwlmRa2MfQPqjVRHkczmLdtFQKcCGn4vJIc/s16000/3.png" /></a></div><br /><p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><br /></p><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">We will write code for azure storage
account (infrastructure) inside bicep file like below. I have also mapped bicep
code with azure storage account resource for better understanding.</span></p><p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN"><o:p></o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVuV7OM8YoP_sqJdAqH-R61By78gl7c9b9bgcX1OS6SECQhR0kRbH_fXTUsbW6ZbhwwR1ReeURmp9fsdBuYAWRfB7n1UHGWm51gZE5jnWMPDUjlYul90JqFj5jgS7Ht7oMwaPG8yMWCHg/s1168/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="590" data-original-width="1168" height="323" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVuV7OM8YoP_sqJdAqH-R61By78gl7c9b9bgcX1OS6SECQhR0kRbH_fXTUsbW6ZbhwwR1ReeURmp9fsdBuYAWRfB7n1UHGWm51gZE5jnWMPDUjlYul90JqFj5jgS7Ht7oMwaPG8yMWCHg/w640-h323/4.png" width="640" /></a></div><div><br /></div>Sample code:<div><br /><div><div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #c586c0;">resource</span> <span style="color: #9cdcfe;">stg</span> <span style="color: #ce9178;">'Microsoft.Storage/storageAccounts@2019-06-01'</span>={</div><div> <span style="color: #dcdcaa;">name</span>: <span style="color: #ce9178;">'bicepstoarge'</span></div><div> <span style="color: #dcdcaa;">location</span>: <span style="color: #ce9178;">'eastus'</span></div><div> <span style="color: #dcdcaa;">kind</span>:<span style="color: #ce9178;">'Storage'</span></div><div> <span style="color: #dcdcaa;">sku</span>:{</div><div> <span style="color: #dcdcaa;">name</span>:<span style="color: #ce9178;">'Premium_LRS'</span></div><div> }</div><div>}</div></div><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once code if written for azure resource
(infrastructure) then build the code it will convert bicep file into ARM
template JSON.<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">To build the bicep file we need
to run Bicep CLI in visual studio code terminal as below<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><b><span lang="EN-IN">Manual with PowerShell<o:p></o:p></span></b></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN"><a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/install#install-manually" target="_blank">https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/install#install-manually</a><o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><b><span lang="EN-IN"><o:p> </o:p></span></b></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"># Create
the install folder<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">$installPath
= "$env:USERPROFILE\.bicep"<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">$installDir
= New-Item -ItemType Directory -Path $installPath -Force<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">$installDir.Attributes
+= 'Hidden'<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"># Fetch the
latest Bicep CLI binary<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">(New-Object
Net.WebClient).DownloadFile("https://github.com/Azure/bicep/releases/latest/download/bicep-win-x64.exe",
"$installPath\bicep.exe")<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"># Add bicep
to your PATH<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">$currentPath
= (Get-Item -path "HKCU:\Environment" ).GetValue('Path', '',
'DoNotExpandEnvironmentNames')<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">if (-not
$currentPath.Contains("%USERPROFILE%\.bicep")) { setx PATH
($currentPath + ";%USERPROFILE%\.bicep") }<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">if (-not
$env:path.Contains($installPath)) { $env:path += ";$installPath" }<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"># Verify
you can now access the 'bicep' command.<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">bicep
--help<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto;"><i><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"># Done!<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><o:p> </o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQOn2ede9TKIZY6aq_hhUOm0TL-Cy3WHjX2TbaO6XfVJzyUmqHEyboLQYpsaDXVPN4sTxdrnd2zkNCwlZkSGNMb9aUJoy-3sxwj6PM3J-gAYtGVDPqu0DHm4qve_79HknMI8mc_10OWNs/s1358/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="705" data-original-width="1358" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQOn2ede9TKIZY6aq_hhUOm0TL-Cy3WHjX2TbaO6XfVJzyUmqHEyboLQYpsaDXVPN4sTxdrnd2zkNCwlZkSGNMb9aUJoy-3sxwj6PM3J-gAYtGVDPqu0DHm4qve_79HknMI8mc_10OWNs/w640-h332/5.png" width="640" /></a></div><p></p><p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><br /></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once Bicep CLI is installed,
now build the bicep file below command<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN">bicep build main.bicep</span> </p><p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN"><o:p></o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyTWCTbmT4_GLeRzpptzr7TsLiR3E2I0LNQDqGf0AIppXJxQmehPMZ4FvXX-U4mQUgBKMZbI7khsdUgmsXan9I2Go24ZtcOmxhMZR0gNg7eQmi664lWJ-WaCKBtImLV039Mfxs8snFGzA/s1027/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="361" data-original-width="1027" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyTWCTbmT4_GLeRzpptzr7TsLiR3E2I0LNQDqGf0AIppXJxQmehPMZ4FvXX-U4mQUgBKMZbI7khsdUgmsXan9I2Go24ZtcOmxhMZR0gNg7eQmi664lWJ-WaCKBtImLV039Mfxs8snFGzA/s16000/6.png" /></a></div><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">After build new JSON file (main.json)
will created in visual studio code. It is ARM (Azure Resource Manager) template
which we will deploy with help of Azure CLI.</span></p><p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_7czxh87NznAS2BP4-4cfmZcE_KVUruiAeKpF6udQkBfsVz5LhftI-HCX42uobuNCMdaW6mTB4VztsumZQC1Ug5Y0IN8fXCft1wdVm7P7nYugRhIffMu6XuZGs7Ao7Jayp3ZykFFRC50/s1005/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1005" data-original-width="901" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_7czxh87NznAS2BP4-4cfmZcE_KVUruiAeKpF6udQkBfsVz5LhftI-HCX42uobuNCMdaW6mTB4VztsumZQC1Ug5Y0IN8fXCft1wdVm7P7nYugRhIffMu6XuZGs7Ao7Jayp3ZykFFRC50/s16000/7.png" /></a></div><p></p>
<p class="MsoListParagraphCxSpLast" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once ARM templated (JSON) is
created now we will deploy this resource in Azure with help of Azure CLI.<o:p></o:p></span></p>
<h1><a name="_Toc77151686">Deploy resources with ARM templates and Azure CLI</a><o:p></o:p></h1>
<p class="MsoNoSpacing">We will see how to use Azure CLI with Azure Resource
Manager templates (ARM templates) to deploy your resources to Azure.<o:p></o:p></p>
<p class="MsoNoSpacing">To deploy ARM template, install the latest version of the
Azure CLI. <o:p></o:p></p>
<p class="MsoNoSpacing">URL: <a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli" target="_blank">https://docs.microsoft.com/en-us/cli/azure/install-azure-cli</a></p>
<p class="MsoNoSpacing">Deploy resource in Azure need to follow these steps</p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Run <b>az login</b> to create a
connection with Azure</span></p><p class="MsoListParagraphCxSpFirst" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj39Jezd8NPnDAL9GD0-JwkVblAQa3_z9izeqt0Ruv_PaXEvjNn9cOKZ7TETy44PJ09Ri-VGmtDugU_EWZp07slRIIzVULYMkUFt6ZPeKjvjj11r_jhp_g0fOI8IL4JRvV_mKy1MVNQCqI/s1071/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="643" data-original-width="1071" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj39Jezd8NPnDAL9GD0-JwkVblAQa3_z9izeqt0Ruv_PaXEvjNn9cOKZ7TETy44PJ09Ri-VGmtDugU_EWZp07slRIIzVULYMkUFt6ZPeKjvjj11r_jhp_g0fOI8IL4JRvV_mKy1MVNQCqI/s16000/8.png" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><span lang="EN-IN"><br /></span><p></p> <p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">It will open azure portal login
screen. We need to put our azure loginid and password.</span></p><p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN"><span style="mso-spacerun: yes;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Jq_hu0aJa3ANY64d2SPpFWgY95sEdSRHZRhfWae8KUupcI1c_PcgzPab0GKeRVsNjIgx5EPO8U9PiGtc1wnpMmAmdwCpMmL2N_IpTbQPsNI2uI7Ns2k7YcMlwQYL7JOhT2f1hbY9fHM/s610/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="60" data-original-width="610" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Jq_hu0aJa3ANY64d2SPpFWgY95sEdSRHZRhfWae8KUupcI1c_PcgzPab0GKeRVsNjIgx5EPO8U9PiGtc1wnpMmAmdwCpMmL2N_IpTbQPsNI2uI7Ns2k7YcMlwQYL7JOhT2f1hbY9fHM/s16000/9.png" /></a></div><br /><o:p></o:p><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once login done successfully then
need to select the subscription, where you want to deploy your resource.<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN">az account set --subscription "<Your
Subscription name>"<o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNzZpQSDcX48M5FYikz14fE7OeSkUTl979mpJvKMhahS_mYYq_IlJVwKZxYkGwNAjxjk83QhVcPuJZ-NQuU0wMF5oZQWR16OCNjClxgsQaD71LjSdZtn8v18hdddmB8ebHUzxnyWdCWpw/s740/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="64" data-original-width="740" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNzZpQSDcX48M5FYikz14fE7OeSkUTl979mpJvKMhahS_mYYq_IlJVwKZxYkGwNAjxjk83QhVcPuJZ-NQuU0wMF5oZQWR16OCNjClxgsQaD71LjSdZtn8v18hdddmB8ebHUzxnyWdCWpw/s16000/10.png" /></a><span style="text-align: justify;"> </span></div>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once subscription is selected
then we ready to deploy our ARM template (JSON) on azure. We will do that with
below command<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN">az deployment group create
--resource-group <b>DJBlogs</b> --template-file <b>main.json</b></span></p><p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN"><o:p></o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVqA6GreavZxkQ8B2ibszkXaDD5YiJI9DumeLrG0CY2kntuG6xnQCCeVl-qIOZHYetXmyOfI-_isQxfF4vZZYXQn2XsSOtYOb8zn3R3YgCwFEYiIx8-p3A-e70xWcOkB4dEA-ppJyh56c/s1184/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="529" data-original-width="1184" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVqA6GreavZxkQ8B2ibszkXaDD5YiJI9DumeLrG0CY2kntuG6xnQCCeVl-qIOZHYetXmyOfI-_isQxfF4vZZYXQn2XsSOtYOb8zn3R3YgCwFEYiIx8-p3A-e70xWcOkB4dEA-ppJyh56c/w640-h286/11.png" width="640" /></a></div><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.25pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once above command is executed successfully
then resource will be created in Azure</span></p><p class="MsoListParagraphCxSpLast" style="margin-left: 41.25pt; mso-add-space: auto; text-align: justify;"><span lang="EN-IN"><o:p></o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtbg7DWIPRe07HPytTJg0UtzmvnwPRl5vzo3dSNHSTBcA5FXDZfDv0XBp5TqBtnFMjnf0C0XbHW1D3MPYfyTG8nTIMkflEUf5F1kchRW5jvxT0NLJR-rfQCZEy4ZMKpTnHqV3sMbCvpt4/s1168/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="404" data-original-width="1168" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtbg7DWIPRe07HPytTJg0UtzmvnwPRl5vzo3dSNHSTBcA5FXDZfDv0XBp5TqBtnFMjnf0C0XbHW1D3MPYfyTG8nTIMkflEUf5F1kchRW5jvxT0NLJR-rfQCZEy4ZMKpTnHqV3sMbCvpt4/w640-h221/12.png" width="640" /></a></div><p></p><p class="MsoNormal" style="text-align: justify;"><br /></p>
<p class="MsoNormal" style="text-align: justify;">Hope it will help you to give
little idea about bicep and ARM template and We can use all these to put our application
infrastructure in code repository and automate our infrastructure.<o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">Keep sharing keep learning.
Cheers</p></div></div>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com3tag:blogger.com,1999:blog-3060332739418622694.post-6323070458026193662021-06-05T12:42:00.001+05:302021-06-05T12:47:19.571+05:30Managed Identity<p><span style="text-align: justify;">Managed Identity is an Azure
feature, which allows Identity managed access to Azure resources. This improves
security, by reducing the need for applications, to have credentials in code,
configurations. It creates an identity, which is linked to an Azure resource.
The identity can then be granted access to Azure resources.</span></p><p class="MsoNormal" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">A common challenge for developers
is the management of secrets and credentials used to secure communication
between different components making up a solution. Managed identities eliminate
the need for developers to manage credentials. Managed identities provide an
identity for applications to use when connecting to resources that support
Azure Active Directory (Azure AD) authentication. Applications may use the
managed identity to obtain Azure AD tokens. For example, an application may use
a managed identity to access resources like <b>Azure Key Vault</b> where
developers can store credentials in a secure manner or to access storage
accounts.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZhGfRVPnXZGlAiN3hfPavP9OEg5KHY80l3HD-r324PJ9H0-Mxn9A2ThBN9l6e-B9FzxD0dVwUDiE4y5m1pO4reY_RR3QjJoWx5W55aoczx3S1Tt9v8LXTWSJPucQXr4E_aiuB8J8MYG8/s836/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="380" data-original-width="836" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZhGfRVPnXZGlAiN3hfPavP9OEg5KHY80l3HD-r324PJ9H0-Mxn9A2ThBN9l6e-B9FzxD0dVwUDiE4y5m1pO4reY_RR3QjJoWx5W55aoczx3S1Tt9v8LXTWSJPucQXr4E_aiuB8J8MYG8/s16000/1.png" /></a></div><p class="MsoNormal" style="text-align: justify;"><br /></p>
<p class="MsoNormal" style="text-align: justify;">In above diagram we are getting secret
from key vault in Logic App with help of managed identity. I will explain all
in detail.</p><p class="MsoNormal" style="text-align: justify;">We will do below things in this
blog</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-align: justify; text-indent: -.25in;"><span lang="EN-IN">1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Create new secret inside key vault
<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo1; text-align: justify; text-indent: -.25in;"><span lang="EN-IN">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Create new Logic App and enable
system assigned managed identity <o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo1; text-align: justify; text-indent: -.25in;"><span lang="EN-IN">3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Add logic app inside key vault Access
policies<o:p></o:p></span></p><p class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo1; text-align: justify; text-indent: -.25in;"><span lang="EN-IN">4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Make Http GET call from Logic
App and get secret<o:p></o:p></span></p></blockquote><p class="MsoNormal" style="text-align: justify;"><o:p></o:p></p>
<h1><a name="_Toc73786108">Create new secret inside key vault</a> <o:p></o:p></h1>
<p class="MsoNormal" style="text-align: justify;">First, need to create new secret
key inside key vault. In this example I am using my old key vault service <b>djsecrets</b>
If you want to learn more about key vault. Please read my previous blog about key
<a href="https://blogs.deepakjoshi.info/2021/03/what-is-azure-key-vault.html" target="_blank">AzureKey Vault</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Need follow below steps to add
new secret key inside key vault</p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l2 level1 lfo2; text-indent: -.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Go to key vault </p><p class="MsoNoSpacing" style="margin-left: .5in;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicLdhJO13UIPG2bEnhXNqnlfn-awOvwy_ulnfbqhBp9N1r4WBxXTX7UXil_lzb-WNPcPJdLZnThSg5xRqMEApIYgRmyyW1ysnr3aGcmBPMb7s-cVQ6oXb5hC-Yg2D3mBU8SONJaVuOYk4/s909/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="525" data-original-width="909" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicLdhJO13UIPG2bEnhXNqnlfn-awOvwy_ulnfbqhBp9N1r4WBxXTX7UXil_lzb-WNPcPJdLZnThSg5xRqMEApIYgRmyyW1ysnr3aGcmBPMb7s-cVQ6oXb5hC-Yg2D3mBU8SONJaVuOYk4/s16000/2.png" /></a></div><p></p><p class="MsoNoSpacing" style="margin-left: .5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l2 level1 lfo2; text-indent: -.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Create new secret key with “<b>Name</b>” with value
“<b>DJ Blogs</b>”</p>
<p class="MsoNoSpacing" style="margin-left: .5in;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE4tg8OskpEZnh1hk8vsGDuLzAyA6IlvPDVvCEhOEkV00LJI8o-pYxTusOvJtFbabtVC1jxJ1rKz2fjejj4wHZ1Wgr75mrB68QZ5E_pxv6ZB0610EkZk4w7MLFhlkXhYBPySaDWfd6-0Y/s680/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="498" data-original-width="680" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE4tg8OskpEZnh1hk8vsGDuLzAyA6IlvPDVvCEhOEkV00LJI8o-pYxTusOvJtFbabtVC1jxJ1rKz2fjejj4wHZ1Wgr75mrB68QZ5E_pxv6ZB0610EkZk4w7MLFhlkXhYBPySaDWfd6-0Y/s16000/3.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l2 level1 lfo2; text-indent: -.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Click on create then secret added in key vault. If
we open the secret it will look like as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOazp7mMHJEspWWsJm2KjQGguPKHTxHujc3gYZIekV05QHFWIC9i-XOaba3s46RTvYviCjDlKORY_93aXB9OUlPmOUGCpoZpankxC2GOIPIQIWicJWO0VcF3OKu53mdbutFFZdGstTGyg/s637/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="637" data-original-width="459" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOazp7mMHJEspWWsJm2KjQGguPKHTxHujc3gYZIekV05QHFWIC9i-XOaba3s46RTvYviCjDlKORY_93aXB9OUlPmOUGCpoZpankxC2GOIPIQIWicJWO0VcF3OKu53mdbutFFZdGstTGyg/s16000/4.png" /></a></div>
<p class="MsoNoSpacing">Secret URL look like <a href="https://djsecrets.vault.azure.net/secrets/Name/version-number" target="_blank">https://djsecrets.vault.azure.net/secrets/Name/version-number</a>
<o:p></o:p></p>
<p class="MsoNoSpacing">If you want to get latest value every time, then we don’t
need to add version number in URL then it will be <a href="https://djsecrets.vault.azure.net/secrets/Name" target="_blank">https://djsecrets.vault.azure.net/secrets/Name</a></p>
<p class="MsoNoSpacing">This URL we will be used in our logic app to get the latest
value of secret<o:p></o:p></p>
<h1><a name="_Toc73786109">Logic App and enable system assigned managed
identity</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">Now we will create logic app
which will get secret with help of HTTP Get request and managed identity authentication.
If you want to learn more about logic app. Please read my previous blog <a href="https://blogs.deepakjoshi.info/2020/08/azure-logic-apps.html" target="_blank">Logic App</a>.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Follow below steps to create
logic app</p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="color: windowtext;">1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><!--[endif]--><span class="MsoHyperlink"><span style="color: windowtext;">Go to your resource
group where you want to create logic app and click on add button</span></span></p>
<p class="MsoNoSpacing" style="margin-left: .5in;"><span class="MsoHyperlink"><span style="color: windowtext;"> </span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSb-KzuYwfvcEeDs9CBBySHFEjm04Vb1ncJqYv7IYYqZMJD7CGraldTK_ha_Wao1qHucwgqxBAqdamHfMPcM1aZ5LyIrAA3R1vDBC9S5cNF_FfAZKNCG-B7PLDRK27nPK78qrBdDB0jnw/s755/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="690" data-original-width="755" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSb-KzuYwfvcEeDs9CBBySHFEjm04Vb1ncJqYv7IYYqZMJD7CGraldTK_ha_Wao1qHucwgqxBAqdamHfMPcM1aZ5LyIrAA3R1vDBC9S5cNF_FfAZKNCG-B7PLDRK27nPK78qrBdDB0jnw/s16000/5.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="color: windowtext;">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><!--[endif]--><span class="MsoHyperlink"><span style="color: windowtext;">Creating
logic app with name “<b>djmanagedidentity</b>” in <b>Center US</b> data center.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: .5in;"><span class="MsoHyperlink"><span style="color: windowtext;"> </span></span></p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]--><span class="MsoHyperlink"><span style="color: windowtext;">Once Logic App created then
e</span></span>nable system assigned managed identity in Logic App</p><p class="MsoNoSpacing" style="margin-left: .5in;"><span class="MsoHyperlink"><span style="color: windowtext;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz4y7KU65-ojbikxaq4y2nkQxLnukn-KdUX1LSFjIaceDKVs8gRlerZNwdYfFxCorjmYmRol_UPnEM01F4LvYZlmc6TE6ecQxmT28wVHEXUzUJHKfy1KriZy4Tt1PKRQ9MFL6uQE61I3c/s748/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="690" data-original-width="748" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz4y7KU65-ojbikxaq4y2nkQxLnukn-KdUX1LSFjIaceDKVs8gRlerZNwdYfFxCorjmYmRol_UPnEM01F4LvYZlmc6TE6ecQxmT28wVHEXUzUJHKfy1KriZy4Tt1PKRQ9MFL6uQE61I3c/s16000/6.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="color: windowtext;">4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><!--[endif]--><span class="MsoHyperlink"><span style="color: windowtext;">As above follow
steps it will create <b>Object ID </b>now our resource ready for assign managed
identity.</span></span></p>
<h1><a name="_Toc73786110">Add logic app inside key vault Access policies</a></h1>
<p class="MsoNoSpacing"><span class="MsoHyperlink"><span style="color: windowtext;">Once in any resource system assigned
managed identity enabled in azure then we can add that resource in Access
policies of other resource to access it. Follow below steps to get key from key
vault to logic app</span></span></p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l3 level1 lfo4; text-indent: -.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="color: windowtext;">1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><!--[endif]--><span class="MsoHyperlink"><span style="color: windowtext;">Go to your
key vault and select access policies</span></span></p>
<p class="MsoNoSpacing" style="margin-left: .5in;"><span class="MsoHyperlink"><span style="color: windowtext;"> </span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicaXWWJI7khhmsfNiUcOl15kBhB9W6suZd8v1RrsjqumTRA2nodEnqmgpFPRKjMPVg5ViJr_iksYwrQfyLQmgvn7_aQycThr56xVfPV1nV6rWEWTtjHP64oRbxwJaTt2uCp-8Jm1V7QMc/s1290/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="603" data-original-width="1290" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicaXWWJI7khhmsfNiUcOl15kBhB9W6suZd8v1RrsjqumTRA2nodEnqmgpFPRKjMPVg5ViJr_iksYwrQfyLQmgvn7_aQycThr56xVfPV1nV6rWEWTtjHP64oRbxwJaTt2uCp-8Jm1V7QMc/w640-h300/7.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l3 level1 lfo4; text-indent: -.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="color: windowtext;">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><!--[endif]--><span class="MsoHyperlink"><span style="color: windowtext;">Click on <b>Add
Access Policy</b> will add logic app object for access the secret</span></span></p><p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l3 level1 lfo4; text-indent: -.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqq9o2DJd2-gftlEZfGvJJVKjVquSYBfRaM2K2qVypi7VIGJ6S4HS0tzu2Y1guDr7RFeAelRl6RaPF10nahJl6bn15gePCNy3I4KY3T-HrqLrJf307SQIDBhESN-YDGlRNcg784yy-EPU/s1143/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="531" data-original-width="1143" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqq9o2DJd2-gftlEZfGvJJVKjVquSYBfRaM2K2qVypi7VIGJ6S4HS0tzu2Y1guDr7RFeAelRl6RaPF10nahJl6bn15gePCNy3I4KY3T-HrqLrJf307SQIDBhESN-YDGlRNcg784yy-EPU/w640-h298/8.png" width="640" /></a></div><span style="color: windowtext;"><br /></span><p></p>
<p class="MsoNoSpacing" style="margin-left: .5in; mso-list: l3 level1 lfo4; text-indent: -.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="color: windowtext;">3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><!--[endif]--><span class="MsoHyperlink"><span style="color: windowtext;">Once logic app
added in access policy. Now we will get the secret key value with help of HTTP
GET request. <o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><span class="MsoHyperlink"><span style="color: windowtext;"> </span></span></p>
<h1>Http GET call from Logic App and get secret<o:p></o:p></h1>
<p class="MsoNoSpacing">Now managed identity setup between 2 resource (Key Vault
and Logic App) within azure. To get secret in logic app need to add 2 steps inside
logic app.</p>
<p class="MsoNoSpacing"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY08O9E-x4-jWHdv5ORAfZc443il2JhTwHKEUMEf45FK8y1uitlrLhMBQj-cpLQjeVCYzHKDIp5DuvE2iYC6daECAFchiKO0it2xKdZ0FFZxWxnTgo5xC_Tt5_Bc3QFXOpZ1D7xGCaFEI/s659/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="172" data-original-width="659" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY08O9E-x4-jWHdv5ORAfZc443il2JhTwHKEUMEf45FK8y1uitlrLhMBQj-cpLQjeVCYzHKDIp5DuvE2iYC6daECAFchiKO0it2xKdZ0FFZxWxnTgo5xC_Tt5_Bc3QFXOpZ1D7xGCaFEI/s16000/9.png" /></a></div><p></p><p class="MsoNoSpacing"><br /></p>
<p class="MsoNoSpacing">We need to add key vault secret URL and authentication
details inside HTTP step like below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8xHfGUEAHDf3C2xBJGNd1P21OpDEpf4FbaTrQ5qWK_iv0U5DXNfVrvJdMoDylh_n7cXiotq65_pT7GvEg2BTiUy7VRLV2k0HHUlrmowHihv1JEj7di6Xx-mJAc9JQ2_tWhAtq7E8oIf0/s474/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="474" data-original-width="446" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8xHfGUEAHDf3C2xBJGNd1P21OpDEpf4FbaTrQ5qWK_iv0U5DXNfVrvJdMoDylh_n7cXiotq65_pT7GvEg2BTiUy7VRLV2k0HHUlrmowHihv1JEj7di6Xx-mJAc9JQ2_tWhAtq7E8oIf0/s16000/10.png" /></a></div>
<p class="MsoNoSpacing">Method: GET<o:p></o:p></p>
<p class="MsoNoSpacing">URL: <a href="https://djsecrets.vault.azure.net/secrets/Name?api-version=7.2">https://djsecrets.vault.azure.net/secrets/Name?api-version=7.2</a><o:p></o:p></p>
<p class="MsoNoSpacing">Audience: <a href="https://vault.azure.net/">https://vault.azure.net</a></p>
<p class="MsoNoSpacing">Once all this information filled as above now, we will
run the logic app. It will show the input and output as below<o:p></o:p></p>
<p class="MsoNoSpacing"><b><span style="font-size: 14.0pt;">Input</span></b></p><p class="MsoNoSpacing"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3sOlrqrLOVTBb6iFtcr16SRxOHKcS110Cexm5LS0sP3hFX-iH_W_gbdeL6g8nYdh5Kg14XXETjpfdrgGEp0v5H-6wkAIy_WpkUTgZVdFgTDZ3HsSBDx9hHr8dJ6uDKtyYUmwgcrCBK0/s667/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="310" data-original-width="667" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3sOlrqrLOVTBb6iFtcr16SRxOHKcS110Cexm5LS0sP3hFX-iH_W_gbdeL6g8nYdh5Kg14XXETjpfdrgGEp0v5H-6wkAIy_WpkUTgZVdFgTDZ3HsSBDx9hHr8dJ6uDKtyYUmwgcrCBK0/s16000/11.png" /></a></div><p></p>
<p class="MsoNoSpacing"><b><span style="font-size: 14.0pt;">Output</span></b></p>
<p class="MsoNoSpacing"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIZKY1gLJCQ96SaMr2ThuxUUF1sJ_w7-99BM4i7D4y6iuOToe3Zet_yyMS04DTh-JhZhtCFkmbuzn9LT8X2NgN6iTHTTonvx0AzPoq9V-VfRGvlQjgzKQcOHslne3TA0Cz1sZLwAlIbUs/s746/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="633" data-original-width="746" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIZKY1gLJCQ96SaMr2ThuxUUF1sJ_w7-99BM4i7D4y6iuOToe3Zet_yyMS04DTh-JhZhtCFkmbuzn9LT8X2NgN6iTHTTonvx0AzPoq9V-VfRGvlQjgzKQcOHslne3TA0Cz1sZLwAlIbUs/s16000/12.png" /></a></div><p></p>
<p class="MsoNormal" style="text-align: justify;">Microsoft: What can a managed
identity be used for?</p><p class="MsoNormal" style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="400" src="https://www.youtube.com/embed/5lqayO_oeEo" width="800" youtube-src-id="5lqayO_oeEo"></iframe></div><p></p>
<p class="MsoNoSpacing">Hope it will help you to understand managed identity in Azure
and how you can use it.<o:p></o:p></p>
<span style="font-family: "Calibri",sans-serif; font-size: 11.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Keep sharing keep learning </span>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-61373244759832711112021-05-29T12:58:00.013+05:302021-05-30T16:42:43.346+05:30Migrating Window Authentication App into Azure<p><span style="text-align: justify;">As you know Windows Authentication not supported in azure. When attempting to move legacy
ASP.NET apps to Azure App Service, you might encounter a few challenges. However,
Microsoft provide Azure App Service migration assistant which help you to
migrate your on-premises application into Azure cloud. I have previously
written blog about it. You can read more about in below link.</span></p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;"><a href="https://blogs.deepakjoshi.info/2021/05/app-service-migration-assistant.html" target="_blank">AppService Migration Assistant</a><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">We will walk through updating an
ASP.NET application with Windows Integrated Authentication to use Azure Active
Directory (AAD). It will help you to move your on-premises application into Azure
PaaS (Web App). This post walks through some relatively minor tweaks that allow
you to switch your site to use AAD for authentication and, if you want, AD
group membership for authorization. These changes will enable deployment of
those sites to Azure App Services.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWqyIKvVWeP1vr_W_TNrQL8phOXZXBCgLcX42CHtNGRsmBLCXGhSvwEhEejCPkWRwQi4HQkhIwj979sQWVNDuMws-rIIqWuBFwTezHUAj9n5MoLM55gsY-7v2_a7f4mxz9RCj4Nly8wuU/s851/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="604" data-original-width="851" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWqyIKvVWeP1vr_W_TNrQL8phOXZXBCgLcX42CHtNGRsmBLCXGhSvwEhEejCPkWRwQi4HQkhIwj979sQWVNDuMws-rIIqWuBFwTezHUAj9n5MoLM55gsY-7v2_a7f4mxz9RCj4Nly8wuU/s16000/1.png" /></a></div><p class="MsoNormal" style="text-align: justify;"><br /></p>
<p class="MsoNoSpacing">To make the change we’re going to follow the below steps<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Ensure your site is setup to use SSL.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Register your application in AAD.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Get the necessary OWIN NuGet packages.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Add in some startup code to use the OWIN
authentication libraries.<o:p></o:p></p>
<p class="MsoNoSpacing"><o:p> </o:p></p>
<h1><a name="_Toc73184685">Ensure your site is setup to use SSL</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">This demo I am using
application which run with window authentication. First, we need ensure
application use SSL (https) while running. You can enable by selecting project
and set property SSL Enabled <b>true</b>. </p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFQhyphenhyphenZMdSgBrFICbI6ZSULJKPM4r049M1Mu1aLjDa2m4OOaMVtT6U-QmbUZsQAW28_hIJiJEjOnjdKf-2qEBJoE9kH1YPY6Ojl8J3IYsWcN191K-TDEjay1qwXeZH1IBgTB_5jtqzayHU/s624/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="624" data-original-width="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFQhyphenhyphenZMdSgBrFICbI6ZSULJKPM4r049M1Mu1aLjDa2m4OOaMVtT6U-QmbUZsQAW28_hIJiJEjOnjdKf-2qEBJoE9kH1YPY6Ojl8J3IYsWcN191K-TDEjay1qwXeZH1IBgTB_5jtqzayHU/s16000/2.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="text-align: justify;">When you run application, it
will run on port number 44362 as you can see in screenshot<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">URL: https://localhost: 44362/<o:p></o:p></p>
<h1><a name="_Toc73184686">Register your application in AAD</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">We need to register your
application with your Azure Active Directory (AAD). <o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Need follow steps to register App
with help of azure portal. <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink">Once your login
in then go to </span><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Azure Active Directory</span><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVm31rUzxIJx7QQm048-mgGr-Wb33V1uMLkuT3MS6_O7Im4Ra2pdXyYNwKhktCumFVygsu2AZptEwRKZ9928jjfK13w5StXQQqKlgKqE8wNWj8t8DHxRVS8aKyVTWczrWOOjND-JlgEcs/s644/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="598" data-original-width="644" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVm31rUzxIJx7QQm048-mgGr-Wb33V1uMLkuT3MS6_O7Im4Ra2pdXyYNwKhktCumFVygsu2AZptEwRKZ9928jjfK13w5StXQQqKlgKqE8wNWj8t8DHxRVS8aKyVTWczrWOOjND-JlgEcs/s16000/3.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink">Then need to click on App registration </span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-align: justify; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4UkQFjQllUjl5bz3FyvHHDlsdP9-IqPc8TwoUjOwumOLTWc8WZBg2EkdNOBZQGlFWsLuqymp_DzTi3UKllBna1SB6lCJfifNh7QFgLU4MQplEMZt1fioh1q8Rb4YW5B86ObX999wCssQ/s598/13.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="598" data-original-width="427" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4UkQFjQllUjl5bz3FyvHHDlsdP9-IqPc8TwoUjOwumOLTWc8WZBg2EkdNOBZQGlFWsLuqymp_DzTi3UKllBna1SB6lCJfifNh7QFgLU4MQplEMZt1fioh1q8Rb4YW5B86ObX999wCssQ/s16000/13.PNG" /></a></div><span class="MsoHyperlink"><br /></span><p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-align: justify; text-indent: -0.25in;"><span class="MsoHyperlink">4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span>After that click
on New registration. It will open form as below</span></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><span style="mso-spacerun: yes;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIYVq1GuWpo-CV0htmz-Qq_4aQ1yTnk0b2depuSDX6SlpVHAHaxil5123XglPzsk57UjJs8sGvfag7jU_QGMoEE6UK_d9gLPGPjDvx0xkFVELpFappw6r67uOlkNv2rqkg6Kl0k-bXN80/s709/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="605" data-original-width="709" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIYVq1GuWpo-CV0htmz-Qq_4aQ1yTnk0b2depuSDX6SlpVHAHaxil5123XglPzsk57UjJs8sGvfag7jU_QGMoEE6UK_d9gLPGPjDvx0xkFVELpFappw6r67uOlkNv2rqkg6Kl0k-bXN80/s16000/4.png" /></a></div><br /><o:p></o:p><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink">Once all information
filled as above then need to click on Register button<o:p></o:p></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink">Now our app is
registered successfully in AAD and we can use created App client id and tenant
id in our Web application.</span></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><o:p><span style="text-decoration: none;"></span></o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8euXZ4GfWELtsBb9FQ5flJ-Ao9TvVLUQDTQXr5r8mOPOydbPfeaioM8TLtyhjgCfzhKWJ_QQVkE3GmyB97B3XxxPuiydqfvRf11Lb1YmSKvuHcep2GxacjxhDrFxcZabf9c5vFyEzOZ0/s666/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="399" data-original-width="666" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8euXZ4GfWELtsBb9FQ5flJ-Ao9TvVLUQDTQXr5r8mOPOydbPfeaioM8TLtyhjgCfzhKWJ_QQVkE3GmyB97B3XxxPuiydqfvRf11Lb1YmSKvuHcep2GxacjxhDrFxcZabf9c5vFyEzOZ0/s16000/5.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><o:p><span style="text-decoration: none;"> </span></o:p></span></p>
<h1><a name="_Toc73184687">Get the necessary OWIN NuGet packages.</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">OWIN (Open Web Interface for
.NET) will significantly simplify the migration process. OWIN defines a
standard interface between .NET web servers and web applications. The goal of
the OWIN interface is to decouple server and application.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">The problem with <b>System.Web</b>
is that it is way too bloated and coupled with IIS. You are forced to run it in
IIS. The OWIN initiative is an attempt to modularize and decouple the Web Stack
by adding abstraction.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshXEfxN1zbBaIYgyCMo4YW6EFNc9RefHgfynbHpOwYdvwaQGzSW3cG65SJjB4SU3q764rPBRdlzzLhyszrwqcwAQhm0rATuZ27zv2lVd0hXgdVnU-OWy_pNy8N4XudLvC7U02Qn78tpo/s700/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="243" data-original-width="700" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshXEfxN1zbBaIYgyCMo4YW6EFNc9RefHgfynbHpOwYdvwaQGzSW3cG65SJjB4SU3q764rPBRdlzzLhyszrwqcwAQhm0rATuZ27zv2lVd0hXgdVnU-OWy_pNy8N4XudLvC7U02Qn78tpo/s16000/6.png" /></a></div>
<p class="MsoNoSpacing">OWIN is an open standard. <a href="http://owin.org/" target="_blank">http://owin.org/</a></p>
<p class="MsoNormal">Need to Install these OWIN (<b>Open Web Interface for .NET</b>)
packages <o:p></o:p></p>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Microsoft.Owin.Host.SystemWeb<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Microsoft.Owin.Security.OpenIdConnect<o:p></o:p></span></p><p class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Microsoft.Owin.Security.Cookies</span></p></blockquote><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHf059bhEJJCH0iL-H-yPnJHVCz8IVdZTO3jMIpEnbgLWFqV3S_SObnhxza5JnE82qsLaMMnOePLXc4HuTV7vuuZ2hKsFy6oiXWbWH5DyQjs1IFn79yOtbJk0KAbManNX5M3xBSe8eo8Y/s760/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="602" data-original-width="760" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHf059bhEJJCH0iL-H-yPnJHVCz8IVdZTO3jMIpEnbgLWFqV3S_SObnhxza5JnE82qsLaMMnOePLXc4HuTV7vuuZ2hKsFy6oiXWbWH5DyQjs1IFn79yOtbJk0KAbManNX5M3xBSe8eo8Y/s16000/7.png" /></a></div><p><br /></p>
<h2><a name="_Toc73184688">Microsoft.Owin.Host.SystemWeb</a><o:p></o:p></h2>
<p class="MsoNoSpacing">Middleware that enables OWIN-based applications to run on
Internet Information Services (IIS) by using the ASP.NET request pipeline<o:p></o:p></p>
<p class="MsoNoSpacing"><o:p> </o:p></p>
<h2><a name="_Toc73184689">Microsoft.Owin.Security.OpenIdConnect</a><o:p></o:p></h2>
<p class="MsoNoSpacing"><span face=""Segoe UI",sans-serif" style="background: white; color: #171717; font-size: 10.5pt;">Middleware that enables an application to use
OpenIdConnect for authentication</span><o:p></o:p></p>
<p class="MsoNoSpacing"><o:p> </o:p></p>
<h2><a name="_Toc73184690">Microsoft.Owin.Security.Cookies</a><o:p></o:p></h2>
<p class="MsoNoSpacing"><span face=""Segoe UI",sans-serif" style="background: white; color: #171717; font-size: 10.5pt;">Middleware that enables an application to
maintain a user session by using cookies</span><o:p></o:p></p>
<p class="MsoNoSpacing"><span face=""Segoe UI",sans-serif" style="background: white; color: #171717; font-size: 10.5pt;"><o:p> </o:p></span><span face=""Segoe UI", sans-serif" style="background-color: white; color: #171717; font-size: 10.5pt;"> </span></p>
<h1><a name="_Toc73184691">Add in some startup code to use the OWIN
authentication libraries</a><o:p></o:p></h1>
<p class="MsoNormal">We need to add some code to the OWIN startup process and
adjust the web.config.<o:p></o:p></p>
<p class="MsoNoSpacing">Web.config</p><p class="MsoNoSpacing"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbg0S8e7Dgtodiz3YD11y_Pc3L6fWPB3ZNLgPkMF3idN5F5eqpRYQil1IFYveHhvWlEiqUOwYTuBdX_KfVeD2K94u7X1jzBvAmiKIARNlyTqRoXcGUmU_rdiTAXDRldQ4qz9Oj9IoY6CA/s781/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="334" data-original-width="781" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbg0S8e7Dgtodiz3YD11y_Pc3L6fWPB3ZNLgPkMF3idN5F5eqpRYQil1IFYveHhvWlEiqUOwYTuBdX_KfVeD2K94u7X1jzBvAmiKIARNlyTqRoXcGUmU_rdiTAXDRldQ4qz9Oj9IoY6CA/s16000/8.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing">Once these 3 keys added in Web.config then need to create
Startup.cs file inside App_Start Folder<o:p></o:p></p>
<p class="MsoNoSpacing"><a href="https://github.com/deepakjoshiinfo/WindowsAuthToAzureAD/blob/main/DemoApp/App_Start/Startup.cs" target="_blank">Startup.cs</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmB-0rd2zmkBArvNFMV2o9sO3qidyuaDokDCxz6Wr261LCG03KowKZJAG7XbaWZTvlFbY3oEU_inAvkKO335RpFoEXpZctVG2bNYgHJx8yKjpGveqMrURenT5Op5D-XxnzC9kIR6hght0/s1131/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="584" data-original-width="1131" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmB-0rd2zmkBArvNFMV2o9sO3qidyuaDokDCxz6Wr261LCG03KowKZJAG7XbaWZTvlFbY3oEU_inAvkKO335RpFoEXpZctVG2bNYgHJx8yKjpGveqMrURenT5Op5D-XxnzC9kIR6hght0/s16000/9.png" /></a></div><p></p><br />
<p class="MsoNoSpacing">You can download code this code from GitHub<o:p></o:p></p>
<p class="MsoNoSpacing">URL: <a href="https://github.com/deepakjoshiinfo/WindowsAuthToAzureAD" target="_blank">https://github.com/deepakjoshiinfo/WindowsAuthToAzureAD</a> </p>
<p class="MsoNoSpacing">Once we made changes in Startup.cs file then need to test
the authencation working or not. I have just copied below code in About.aspx
file<o:p></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: 10pt;"><div> <o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-size: 10pt;"><span style="mso-spacerun: yes;"> </span><div>IsAuthenticated</div>
<div><%= HttpContext.Current.User.Identity.IsAuthenticated
%></div> <o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-size: 10pt;"><span style="mso-spacerun: yes;">
</span><div>AuthenticationType</div> <div><%=
HttpContext.Current.User.Identity.AuthenticationType %></div> <o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-size: 10pt;"><span style="mso-spacerun: yes;"> </span><div>Name</div>
<div><%= HttpContext.Current.User.Identity.Name %></div> <o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-size: 10pt;"><span style="mso-spacerun: yes;"> </span><div>Is in
"Group1"</div> <o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-size: 10pt;"><span style="mso-spacerun: yes;"> </span><div><%=
HttpContext.Current.User.IsInRole("Group1") %></div> <o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-size: 10pt;"><span style="mso-spacerun: yes;"> </span><div>Is in
"Group2"</div> <o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-size: 10pt;"><span style="mso-spacerun: yes;"> </span><div><%=
HttpContext.Current.User.IsInRole("Group2") %></div> <o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-size: 10pt;"><span style="mso-spacerun: yes;"> </span></div></span></p>
<p class="MsoNoSpacing">When I run the application in my local machine it redirect me to Microsoft login page for Authentication </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCy4Hi-AhYNIdMI4T5AKxFjU8_AhzRZeNJu-UlBoqEjv6I45m_b0CxkL3KhgDiUa3fkDyjX0I6XPME7t_42tuJUa3zL3QxSv741o0er-1mATQWJeBJBTlbrw6Ko4DVKqlpRQFyRTJoUpk/s461/17.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="355" data-original-width="461" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCy4Hi-AhYNIdMI4T5AKxFjU8_AhzRZeNJu-UlBoqEjv6I45m_b0CxkL3KhgDiUa3fkDyjX0I6XPME7t_42tuJUa3zL3QxSv741o0er-1mATQWJeBJBTlbrw6Ko4DVKqlpRQFyRTJoUpk/s16000/17.png" /></a></div><p class="MsoNoSpacing">Login with your domain UserId and Password then it will open our application</p><p class="MsoNoSpacing"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNloNGaodkkAVAOTIuaNOHAi6bvqBNZOxC5uWuIseeDk8BWkxA3Z2mbKCaHZwUZUsKhcUoPBj0Vv5hYPEK0MrBIlLGx1UiF2aoCEnuAAJTzrOxE-5rf3Vm8EqXcjBHUKSM76e9pQl0RoA/s1269/16.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="525" data-original-width="1269" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNloNGaodkkAVAOTIuaNOHAi6bvqBNZOxC5uWuIseeDk8BWkxA3Z2mbKCaHZwUZUsKhcUoPBj0Vv5hYPEK0MrBIlLGx1UiF2aoCEnuAAJTzrOxE-5rf3Vm8EqXcjBHUKSM76e9pQl0RoA/w640-h265/16.PNG" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing">You can see user Authenticated from azure active
directory. Now we can migrate this application in Azure Web App. If you want to
learn more about web app read my previous post<span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-indent: -0.25in;"><span style="mso-list: Ignore;"><span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]--><a href="https://blogs.deepakjoshi.info/2020/05/create-web-app.html"><span style="text-indent: -0.25in;">Azure WebApp</span>s</a></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo4; text-indent: -0.25in;"><o:p></o:p></p>
<p class="MsoNoSpacing">Helpful links for more information<o:p></o:p></p>
<p class="MsoNoSpacing">Convert ASP.NET Web Forms with Windows Authentication to
use AAD <o:p></o:p></p>
<p class="MsoNoSpacing"><a href="https://devblogs.microsoft.com/premier-developer/convert-asp-net-webforms-with-windows-authentication-to-use-aad/" target="_blank">https://devblogs.microsoft.com/premier-developer/convert-asp-net-webforms-with-windows-authentication-to-use-aad/</a><o:p></o:p></p>
<p class="MsoNoSpacing">QuickStart: Register an application with the Microsoft
identity platform<o:p></o:p></p>
<p class="MsoNoSpacing"><a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app" target="_blank">https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app</a></p><p class="MsoNoSpacing" style="text-align: justify;">Hope it will help you to migrate window authentication to azure active directory authentication.<o:p></o:p></p><p class="MsoNoSpacing" style="text-align: justify;">Keep sharing keep learning. Cheers</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com8tag:blogger.com,1999:blog-3060332739418622694.post-65006963283894782702021-05-15T14:20:00.012+05:302021-05-15T15:01:25.852+05:30App Service Migration Assistant<p><span style="text-align: justify;">When attempting to move legacy
ASP.NET apps to Azure App Service, you might encounter a few challenges which
are documented here.</span></p><p class="MsoNormal" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">The App Service Migration
Assistant is designed to simplify your journey to the cloud through a free,
simple, and fast solution to migrate ASP.Net applications from on-premises to
the cloud. You can quickly:<o:p></o:p></p>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Assess whether your app is a
good candidate for migration by running a scan of its public URL.<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Download the Migration
Assistant to begin your migration.<o:p></o:p></span></p><p class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Use the tool to run readiness
checks and general assessment of your app’s configuration settings, then
migrate your app or site to Azure App Service via the tool. <o:p></o:p></span></p></blockquote>
<h1><a name="_Toc71979130">How the tool works</a><o:p></o:p></h1>
<p class="MsoNormal" style="text-align: justify;">The Migration Assistant tool is a
local agent that performs a detailed assessment and then walks you through the migration
process. The tool performs readiness checks as well as a general assessment of
the web app’s configuration settings.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcl73NHMepJZ-DWry4oj9VUdAU32u6WmZdIdUST0gcJPMtDn1G3qtMwGa_TVnWbHCO650roN4NQBozaxAipiOtEDO5YSl0zxoRjQbvCKdu824O1f8KnkMLC7Sq0EA0DxYv4SZyCLueNes/s1200/1.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="628" data-original-width="1200" height="335" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcl73NHMepJZ-DWry4oj9VUdAU32u6WmZdIdUST0gcJPMtDn1G3qtMwGa_TVnWbHCO650roN4NQBozaxAipiOtEDO5YSl0zxoRjQbvCKdu824O1f8KnkMLC7Sq0EA0DxYv4SZyCLueNes/w640-h335/1.jpg" width="640" /></a></div><p></p>
<p class="MsoNormal" style="text-align: justify;">You can download Azure App
Service migration assistant from below URL <o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;"><a href="https://azure.microsoft.com/en-us/services/app-service/migration-assistant/" target="_blank">https://azure.microsoft.com/en-us/services/app-service/migration-assistant/</a></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirKExDtfhmVYvmzP2hSzVfz942BxmOnTTFbMB6EyCmNnDoIHfTDOOSVYIUPHr7mC40dYR7Oza-9SIodEHoVkWnezZuHeEqbvrvS9qcDe-2RKsH-D0bqJaFZgMNLZ-WcJEh4rDyHMpzdo8/s896/02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="646" data-original-width="896" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirKExDtfhmVYvmzP2hSzVfz942BxmOnTTFbMB6EyCmNnDoIHfTDOOSVYIUPHr7mC40dYR7Oza-9SIodEHoVkWnezZuHeEqbvrvS9qcDe-2RKsH-D0bqJaFZgMNLZ-WcJEh4rDyHMpzdo8/s16000/02.png" /></a></div>
<p class="MsoNormal" style="text-align: justify;">Once setup is downloaded then
need to install on Web server and run the application. It will ask to choose
the application from Web server.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcsm25UyAsgd6bpcfQJQtTmPiVgg2I5YxcRAO4A8arnoKPavSp7GK6qVtKsc2qzH2YoroLq7-EFoSz7JV8ZbGkk4-KaPs8TledtxH9yzNXPwezcJJuxFdZpCnFxcUqGKcwUqWNhVe9tjQ/s630/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="460" data-original-width="630" height="468" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcsm25UyAsgd6bpcfQJQtTmPiVgg2I5YxcRAO4A8arnoKPavSp7GK6qVtKsc2qzH2YoroLq7-EFoSz7JV8ZbGkk4-KaPs8TledtxH9yzNXPwezcJJuxFdZpCnFxcUqGKcwUqWNhVe9tjQ/w640-h468/2.png" width="640" /></a></div><p class="MsoNormal" style="text-align: justify;"><br /></p>
<p class="MsoNormal" style="text-align: justify;">Click on next button it will do
all azure migration assessment for your web application<o:p></o:p></p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmy6cCmbbIXcbEYL5SSKzQ163sfF3-ULtww-FxCydObLg9LilareZzZMQXctsN0EVNFWvcSEnFp2nWUw6fb6aD-zvqDjI8a_zS-KipjOizpZOzBDdqTa5HDtaxDGPQkM5iHUN_mTlGVTA/s799/3.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="713" data-original-width="799" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmy6cCmbbIXcbEYL5SSKzQ163sfF3-ULtww-FxCydObLg9LilareZzZMQXctsN0EVNFWvcSEnFp2nWUw6fb6aD-zvqDjI8a_zS-KipjOizpZOzBDdqTa5HDtaxDGPQkM5iHUN_mTlGVTA/s16000/3.png" /></a><br />
<p class="MsoNormal" style="text-align: justify;">Once the application has received
a successful assessment, the tool will walk you through the process of authenticating
with your Azure subscription and then prompt you to provide details on the
target account and App Service plan along with other configuration details for
the newly migrated site.</p><p class="MsoNormal" style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheqL5QUNH61qD82oprPYYQ3WRSCs39UPupJNu3y0VtptSqS1NeDjVkt8B2O1yGj2E8rmsT0lt5YAk0UlEX4EXYnMVAoWrJRBppjOoynVMkwR_b1_Wvt_XpI-lcjmo3VAGmH7kKefL6jwI/s701/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="492" data-original-width="701" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheqL5QUNH61qD82oprPYYQ3WRSCs39UPupJNu3y0VtptSqS1NeDjVkt8B2O1yGj2E8rmsT0lt5YAk0UlEX4EXYnMVAoWrJRBppjOoynVMkwR_b1_Wvt_XpI-lcjmo3VAGmH7kKefL6jwI/s16000/4.png" /></a></div><o:p><br /></o:p><p></p>
<p class="MsoNormal" style="text-align: justify;">The Migration Assistant tool will
then move your site to the target App Service plan while also configuring
Hybrid Connections, should that option be selected.</p>
<h1><a name="_Toc71979131">Database migration and Hybrid Connections</a><o:p></o:p></h1>
<p class="MsoNormal" style="text-align: justify;">Azure App Service migration
assistant is designed to migrate the web application and associated
configurations, but it does not migrate the database. There are two options for
your database:<o:p></o:p></p>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Use the SQL Migration Tool <o:p></o:p></span></p><p class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo2; text-align: justify; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Leave your database on-premises
and connect to it from the cloud using Hybrid Connections<o:p></o:p></span></p></blockquote>
<h2><a name="_Toc71979132">SQL Migration Tool</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">If you want to migrate
on-premises database on Azure, then you can migrate it with help of data
migration assistant. I have previously written details blog on it.<span style="mso-spacerun: yes;"> </span>You can read it in this link <a href="https://blogs.deepakjoshi.info/2020/12/what-is-data-migration-assistant.html" target="_blank">What is data migration assistant?</a></p>
<h2><a name="_Toc71979133">Leave your database on-premises</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">You can also leave your database
in your on-premises database as well. Azure App Service with connect with SQL
database with Hybrid Connections. Hybrid Connections allows you to securely
access application resources in other networks – in this case an on-premises
SQL database. The migration tool configures and sets up Hybrid Connections for
you, allowing you to migrate your site while keeping your database on-premises
to be migrated at your leisure.<o:p></o:p></p>
<p class="MsoNoSpacing">Hope it will help you to understand Azure App Service
migration assistant and how you can use this.<o:p></o:p></p>
<p class="MsoNoSpacing">Keep sharing keep learning</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com6tag:blogger.com,1999:blog-3060332739418622694.post-66156429240645147652021-04-06T19:57:00.005+05:302021-04-12T15:11:45.258+05:30What is Azure Content Delivery Network<p><span style="text-align: justify;">A content delivery network (CDN)
is a distributed network of servers that can efficiently deliver web content to
users. CDNs store cached content on edge servers that are close to end users to
minimize latency.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDXdDFBJFYcmgm7RqoemgjWGecFAyw9G2Vg5ECoKXF2Ta5pAEvNSlPR-2KAAD7eRqNga7grH6L8FBFgbwOGka_BlYNpvrvfT7Jd5gwEKhbewiLC9EekEE7fVaPmOPVChbWpqLwiJTu1LU/s910/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="413" data-original-width="910" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDXdDFBJFYcmgm7RqoemgjWGecFAyw9G2Vg5ECoKXF2Ta5pAEvNSlPR-2KAAD7eRqNga7grH6L8FBFgbwOGka_BlYNpvrvfT7Jd5gwEKhbewiLC9EekEE7fVaPmOPVChbWpqLwiJTu1LU/s16000/1.png" /></a></div><span style="text-align: justify;"><br /></span><p></p>
<p class="MsoNormal" style="text-align: justify;">CDNs are typically used to
deliver static content such as images, style sheets, documents, client-side
scripts, and HTML pages. The major advantages of using a CDN are lower latency
and faster delivery of content to users, regardless of their geographical
location in relation to the datacenter where the application is hosted. CDNs
can also help to reduce load on a web application, because the application does
not have to service requests for the content that is hosted in the CDN.<o:p></o:p></p>
<p class="MsoNoSpacing">Before CDN vs After CDN</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEck4woDWcjI4i-HeU2S3slow_faFxvfs4FMsBB1xadeXJjHWP4S4Bs8W5mutzfooJLwJVtSX_2u858Iodh-ySNmKeRWxwpWQWg2YmImiuRONrHR-aq6nF8IgfGdEcw869GrwhEnQj10g/s800/0.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="331" data-original-width="800" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEck4woDWcjI4i-HeU2S3slow_faFxvfs4FMsBB1xadeXJjHWP4S4Bs8W5mutzfooJLwJVtSX_2u858Iodh-ySNmKeRWxwpWQWg2YmImiuRONrHR-aq6nF8IgfGdEcw869GrwhEnQj10g/s16000/0.jpg" /></a></div><br /><p class="MsoNoSpacing"><br /></p><p class="MsoNoSpacing">We can add multiple endpoints inside one Azure content delivery
networks service. In above image I have created new <b>Static Web App in Blazor</b>
and hosted in azure storage account. If you want to learn more about this app. Please
read my previous post. <a href="https://blogs.deepakjoshi.info/2021/03/how-to-host-static-website-in-azure.html" target="_blank">Howto host static website in azure storage?</a><o:p></o:p></p>
<p class="MsoNoSpacing">In this blog I will add static web app into Azure CDN profile
endpoint.<o:p></o:p></p>
<p class="MsoNoSpacing">Static Web App URL: <a href="https://djblogs.z19.web.core.windows.net/" target="_blank">https://djblogs.z19.web.core.windows.net/</a><o:p></o:p></p>
<p class="MsoNoSpacing">Azure CDN Endpoint: <a href="https://djblogs.azureedge.net/" target="_blank">https://djblogs.azureedge.net</a><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p>
<h1><a name="_Toc68606599">How to create Azure Content Delivery Network</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">We need to follow below steps
to create <b>Azure Content Delivery Network</b> service.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Go to azure portal <a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we login in portal then need to create new CDN
profile.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFE2YYD7V2zlp02WfyQH8sEIa5knv1DYyyTATACPWysfMi87qG4HaHCqFNivgD_aypdUhl_S07EH6td_iFSDLRugNQgnIgDODP1ZYYFSp6xuzFh8b6Mrci5r2ACIUkYFi22S4-9wC3eRA/s563/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="563" data-original-width="443" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFE2YYD7V2zlp02WfyQH8sEIa5knv1DYyyTATACPWysfMi87qG4HaHCqFNivgD_aypdUhl_S07EH6td_iFSDLRugNQgnIgDODP1ZYYFSp6xuzFh8b6Mrci5r2ACIUkYFi22S4-9wC3eRA/s16000/2.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we fill all this information then click on
create button it will create CDN profile as below</p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ8XQM8HOmt7s4gmKtfHL66WInbkFNNbIiYY65ELnLB98YBDOYNplIwc9CtrLpOfCuUJVxmLgYFJ1dsRwPoY2GUfamm2dupKeiuzlPRKHHiXFBdYB1lfzL1jZfLaO8nFqWOxoOoTebdm8/s1184/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="567" data-original-width="1184" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ8XQM8HOmt7s4gmKtfHL66WInbkFNNbIiYY65ELnLB98YBDOYNplIwc9CtrLpOfCuUJVxmLgYFJ1dsRwPoY2GUfamm2dupKeiuzlPRKHHiXFBdYB1lfzL1jZfLaO8nFqWOxoOoTebdm8/w640-h306/3.png" width="640" /></a></div><p class="MsoListParagraph"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->We can add multiple endpoint in one CDN profile.
Name enter a unique name for the new CDN endpoint. This name is used to access
your cached resources at the domain <endpointname>. azureedge.net.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">URL: <a href="https://djblogs.azureedge.net/" target="_blank">https://djblogs.azureedge.net</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrrSDccEvnVMrZt5hk6coflGwYzh6TB_4fvq8zTjWP8osXq0JKXDAenSj4QtridB83yDgoTq4oY2_cihKDd5uunOVUG1LwCT6IteIL1BrY6hQnzZfKk5EPIElAkqDO_lVwiJKo6Kt6i2I/s994/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="648" data-original-width="994" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrrSDccEvnVMrZt5hk6coflGwYzh6TB_4fvq8zTjWP8osXq0JKXDAenSj4QtridB83yDgoTq4oY2_cihKDd5uunOVUG1LwCT6IteIL1BrY6hQnzZfKk5EPIElAkqDO_lVwiJKo6Kt6i2I/s16000/4.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->In above screen I am using my existing static
web app (Blazor) which hosted in storage account. </p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span style="text-indent: -0.25in;"> Static web app (Blazor)
hosted in storage account: </span><a href="https://djblogs.z19.web.core.windows.net/" style="text-indent: -0.25in;" target="_blank">https://djblogs.z19.web.core.windows.net</a></p><p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6CJVytH4agTh90cWmjqgnpIv9w8z8KtVj-RN1U6Yc8GWZWOMFvZJqkDfnskCyjdbuhfUIl4-9nmI5jLZsU4wpIzfgdz_2ZypIocP-9cZ11jDRuWoWQl3cbMatF_QGWSMrqCQ78dvQni8/s991/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="991" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6CJVytH4agTh90cWmjqgnpIv9w8z8KtVj-RN1U6Yc8GWZWOMFvZJqkDfnskCyjdbuhfUIl4-9nmI5jLZsU4wpIzfgdz_2ZypIocP-9cZ11jDRuWoWQl3cbMatF_QGWSMrqCQ78dvQni8/s16000/5.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once all the information filled as above click on
<b>Add</b>. It will create end point for CDN profile.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">URL: <a href="https://djblogs.azureedge.net/" target="_blank">https://djblogs.azureedge.net</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5l6jkxGQxA6VqZsqak_J93PhbEO_cQFPM25V_6Naq4N_Ccf4zp_3KESrtIxz0UNRRgc4HhjTuO50uGpDHTPEpbN__a0xDlDoZnskS2tRByVDOCoSuAozD926r_7yZpPFV4mXvfifUii0/s971/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="423" data-original-width="971" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5l6jkxGQxA6VqZsqak_J93PhbEO_cQFPM25V_6Naq4N_Ccf4zp_3KESrtIxz0UNRRgc4HhjTuO50uGpDHTPEpbN__a0xDlDoZnskS2tRByVDOCoSuAozD926r_7yZpPFV4mXvfifUii0/s16000/6.png" /></a></div>
<p class="MsoNoSpacing">Hope it will help you to understand Azure CDN and how you
can use them.<o:p></o:p></p>
<p class="MsoNoSpacing">Keep sharing keep learning. Cheers</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com4tag:blogger.com,1999:blog-3060332739418622694.post-82336939389972950062021-03-29T19:37:00.018+05:302021-04-12T15:10:38.837+05:30How to host static website in azure storage<p><span style="text-align: justify;">You can serve static content
(HTML, CSS, JavaScript, and image files) directly from a storage container
named </span><b style="text-align: justify;">$web</b><span style="text-align: justify;">. Hosting your content in Azure Storage enables you to use
serverless architectures that include Azure Functions and other Platform as a
service (PaaS) services. <b>Azure Storage</b> static website hosting is a great option
in cases where you don't require a web server to render content.</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4kuCImyUxzoEQ9iIRrC3SJvQmyQ_zAa-5qyUmnMxgjDndgO5Rj2wd-OthoN44YO2rbgg9NSJfp1Rbl7HLsWDZ1rgmZbF8sPc_DoUmxO6vFLuxjOM03TUZzr0_5svIbh9cJbB7dbaSqBE/s973/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="328" data-original-width="973" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4kuCImyUxzoEQ9iIRrC3SJvQmyQ_zAa-5qyUmnMxgjDndgO5Rj2wd-OthoN44YO2rbgg9NSJfp1Rbl7HLsWDZ1rgmZbF8sPc_DoUmxO6vFLuxjOM03TUZzr0_5svIbh9cJbB7dbaSqBE/s16000/1.png" /></a></div><br /><span style="text-align: justify;"><br /></span><p></p>
<h1><a name="_Toc67938535">How to host static web app in storage account</a><o:p></o:p></h1>
<p class="MsoNoSpacing">To host static web app in azure storage account, need to do<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Create Static Web App (<b>Blazor App</b>)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Host Static Web App in Storage Account(<b>djblogs</b>)</p>
<h2><a name="_Toc67938536">Create Static Web App</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">Static web apps are commonly
built using libraries and frameworks like Angular, React, Vue, or <b>Blazor</b>
where server-side rendering is not required. If you want to learn more about
static web app. Please read my previous post <a href="https://blogs.deepakjoshi.info/2020/08/azure-static-web-apps.html" target="_blank">Whatis Azure Static Web Apps?</a> In this demo I am creating <b>Blazor</b> App will
host it in storage account.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">We need to below steps to
create Blazor App.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Need
to create <b>Blazor App</b> with help of Visual Studio 2019 by choosing option <b>Blazor
Web Assembly</b> like below</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfrKtlIKi3vG7YHFnNdjiFkvxUFKxMEq_lo0g20vbWrrkzDjdQU7MnojICS96bCpSw0A9P9hu4VZl5XG7DzAP2oX_67QeYIyEIgQxaYJEpOA1QuFZ2JbRU89hExSJQ5SPQ1WpVTuqC_ao/s783/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="673" data-original-width="783" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfrKtlIKi3vG7YHFnNdjiFkvxUFKxMEq_lo0g20vbWrrkzDjdQU7MnojICS96bCpSw0A9P9hu4VZl5XG7DzAP2oX_67QeYIyEIgQxaYJEpOA1QuFZ2JbRU89hExSJQ5SPQ1WpVTuqC_ao/s16000/2.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Create project with name <b>DJBlogs.AzureCDN. </b>It will create default template project for Blazor app. <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->In
this default template demo I had written code to get client machine details with help of browser
and HTTP request. Like below<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b>IP:</b> xxx. xxx. xxx. xxx<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b>City:</b> Airoli<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b>Region:</b> State of
Mahārāshtra<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b>Country:</b> IN</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhza-e4caApNsOFirkNWp99KxqVIrxzH3KKFvanoqsI-OWeLVfHa0qMa7FIK4X0CoO8md4mJ5bDAg4sx-9DghF1Wk4VoSVoAcFb4wkYPyh7M_YEnUQ4X7Ewo13c3ttEwBcdiShftZjtAks/s1273/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="698" data-original-width="1273" height="351" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhza-e4caApNsOFirkNWp99KxqVIrxzH3KKFvanoqsI-OWeLVfHa0qMa7FIK4X0CoO8md4mJ5bDAg4sx-9DghF1Wk4VoSVoAcFb4wkYPyh7M_YEnUQ4X7Ewo13c3ttEwBcdiShftZjtAks/w640-h351/3.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->If I run the above code it will display like</p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt9MaptKglLpkXM0PMyNmaBrnTftStKlDCfWNJ-m_tie7t8fOoDlQ81c9Rq7bRvYyjuQHFL151GvzEHK7cf_1zxVsPryuSTi_6d2NwrXW2CdgxyBEESL2TZbeXE4QIa2467ZD3VJudn44/s971/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="449" data-original-width="971" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt9MaptKglLpkXM0PMyNmaBrnTftStKlDCfWNJ-m_tie7t8fOoDlQ81c9Rq7bRvYyjuQHFL151GvzEHK7cf_1zxVsPryuSTi_6d2NwrXW2CdgxyBEESL2TZbeXE4QIa2467ZD3VJudn44/s16000/4.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">Download code from GitHub: <a href="https://github.com/deepakjoshiinfo/DJBlog.AzureCDN" target="_blank">https://github.com/deepakjoshiinfo/DJBlog.AzureCDN</a></p>
<h2><a name="_Toc67938537">Host Static Web App in Storage Account</a><o:p></o:p></h2>
<p class="MsoNoSpacing" style="text-align: justify;">We need to follow below steps
to host static web app in storage account.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we login in portal then create new <b>StorageV2
(general purpose v2)</b> type storage account. Which had option to host static
web app.<span style="mso-spacerun: yes;"> </span><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->In this demo I am using already created storage
account <b>djblogs</b>. If you want to learn more about storage account(<b>djblogs</b>)
in details please read my <span style="mso-spacerun: yes;"> </span>previous blogs
on <a href="https://wsponline-my.sharepoint.com/personal/deepak_joshi_wsp_com/Documents/Personal/Azure%20Cloud/1.%09https:/blogs.deepakjoshi.info/2020/09/what-is-azure-storage-account.html" target="_blank">AzureStorage Account</a></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1PQ6BN2KQST6rQXsvC-PfnS_hqkmsO_kS819k1ilEK-0spYX09Y0sVtjGVP1Dk1urzHLFtBr5VylatUDyKoynvOU3QjP4BuqWyh7vlfOHkA8nD0VV2yja3XQikLDE6BefJJOANrCNO8Y/s1179/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="592" data-original-width="1179" height="321" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1PQ6BN2KQST6rQXsvC-PfnS_hqkmsO_kS819k1ilEK-0spYX09Y0sVtjGVP1Dk1urzHLFtBr5VylatUDyKoynvOU3QjP4BuqWyh7vlfOHkA8nD0VV2yja3XQikLDE6BefJJOANrCNO8Y/w640-h321/5.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Once
Storage account created with name <b>djblogs</b> then need to enabled static
website option. It will automatically create Primary endpoint which will be the
URL for our static web app.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">URL: <a href="https://djblogs.z19.web.core.windows.net/" target="_blank">https://djblogs.z19.web.core.windows.net</a></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWhC5eYS3XwEReUlTpRo5CpZQ8FE-YiQR60CGeRfxYUzc7T5gWJ9rLWnoXqRAlkd5wgWdfmKLV0QECE39oDYAsroFd4hbl4NLFmvRjKIFaxl4UJHeTVqlg0rUP9qY0JrJtiV3vrP_DLX0/s960/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="620" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWhC5eYS3XwEReUlTpRo5CpZQ8FE-YiQR60CGeRfxYUzc7T5gWJ9rLWnoXqRAlkd5wgWdfmKLV0QECE39oDYAsroFd4hbl4NLFmvRjKIFaxl4UJHeTVqlg0rUP9qY0JrJtiV3vrP_DLX0/s16000/6.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Now we will publish the code in development machine
folder<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b>Path:</b> C:\Temp\AzureCDN</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZqy64a96MZG4MRgOU9I3BI3OpUY3FFYz6dbzN8Y7ZTmUW6QIG1eEp9BboHbwthpw4HjV5Gk8bYo55oJ7LVeofoulCag990ugKFlaLoF13QVSXC80Ach5JUo3hqF82cRDRuG417p66cCI/s1319/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="674" data-original-width="1319" height="327" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZqy64a96MZG4MRgOU9I3BI3OpUY3FFYz6dbzN8Y7ZTmUW6QIG1eEp9BboHbwthpw4HjV5Gk8bYo55oJ7LVeofoulCag990ugKFlaLoF13QVSXC80Ach5JUo3hqF82cRDRuG417p66cCI/w640-h327/7.png" width="640" /></a></div><p></p><br />
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once our code is published in development folder
then we will copy all files and folder inside “wwwroot” folder with help for <b>Azure
Storage Explorer </b>like below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbNiH-eFQJW8ZfWNJqEMdVajjjMwaVyNcFRdOpzqnvuVFZHOgLRKnqYUa9ntoOtpj-Vu-pyvr9J4j3JNJHTs9nFcRbHO1zAXjNVH-kfgOnOyFkrZDdGU0nHnaIQ1MnokZ37fvBFe7jor0/s1149/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="403" data-original-width="1149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbNiH-eFQJW8ZfWNJqEMdVajjjMwaVyNcFRdOpzqnvuVFZHOgLRKnqYUa9ntoOtpj-Vu-pyvr9J4j3JNJHTs9nFcRbHO1zAXjNVH-kfgOnOyFkrZDdGU0nHnaIQ1MnokZ37fvBFe7jor0/s16000/8.png" /></a></div><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Once
our published code copied inside <b>$web</b> blob container folder. Our static
site URL will start working<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;">URL: <a href="https://djblogs.z19.web.core.windows.net/" target="_blank">https://djblogs.z19.web.core.windows.net</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8WimyXlTdb2IhTy4fwKfd6xBsI7W9dAvV1bPpxiOUm-wv-0eEpzEYzpzC83C3hR4tZlNk1WLz2n8tMofe-s80Y0hY5B7qaP1Dj9uFm7HTdu1Rbu5XjByvOX2Gpu8PPnmxye11UaQGdCc/s991/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="991" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8WimyXlTdb2IhTy4fwKfd6xBsI7W9dAvV1bPpxiOUm-wv-0eEpzEYzpzC83C3hR4tZlNk1WLz2n8tMofe-s80Y0hY5B7qaP1Dj9uFm7HTdu1Rbu5XjByvOX2Gpu8PPnmxye11UaQGdCc/s16000/9.png" /></a></div><p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Hope it will help you to host
static web app in storage account which is cheap service provided by azure.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Keep sharing keep learning. <span style="mso-spacerun: yes;"> </span>Cheers</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com2tag:blogger.com,1999:blog-3060332739418622694.post-21269624566645247242021-03-13T20:01:00.016+05:302021-06-12T11:21:54.484+05:30What is Azure Key Vault <p>Azure Key Vault is a cloud service for securely storing and
accessing secrets. A secret is anything that you want to tightly control access
to, such as API keys, passwords(secrets) and certificates.</p><p class="MsoNoSpacing">Azure key vault service helps to centralization and protection of<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Encryption keys<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Application secrets<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Certificates<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Secrets backed by HSM (Hardware Security Modules)</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGKfDm2slu9whbIkLN_ujBk0sarEmIPpZ1QgERBEPTeGiaZtLDis_aLcdQDh4TV8Wq0p2QQ-35Gc6fPBWkOYPYnMY2Cwx5ZCyex_OQkTo4IHZkc5xAcy3FwUwfqc174Ay8zRzH8Uftpvs/s1149/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="393" data-original-width="1149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGKfDm2slu9whbIkLN_ujBk0sarEmIPpZ1QgERBEPTeGiaZtLDis_aLcdQDh4TV8Wq0p2QQ-35Gc6fPBWkOYPYnMY2Cwx5ZCyex_OQkTo4IHZkc5xAcy3FwUwfqc174Ay8zRzH8Uftpvs/s16000/1.png" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>
<p align="center" class="MsoNormal" style="text-align: center;">Copied image from Adam
Marczak Website: <a href="https://marczak.io/" target="_blank">https://marczak.io/</a></p>
<h1><a name="_Toc66557468">How to create azure key vault</a> <o:p></o:p></h1>
<p class="MsoNoSpacing">We need follow below steps to create <b>Key Vault </b>in
azure. <span style="mso-spacerun: yes;"> </span><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Go to azure portal <a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Click on add button and Create <b>Azure Key Vault</b>
with <b>djsecrets</b> name inside <b>DJBlogs </b>resource group.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidskKX-t41bGpVuF8z00qS26ZuzEFcbrpal0CheYwFCW8ZkXXgOYnJRgmTnP2Nx1aYBioeTOencJHcJcAiKKSD-rLv2Uam-2mrxUs9pAtgCC503qzpJcHQUoXDYLu3eGeEMNR-L54UWCU/s734/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="671" data-original-width="734" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidskKX-t41bGpVuF8z00qS26ZuzEFcbrpal0CheYwFCW8ZkXXgOYnJRgmTnP2Nx1aYBioeTOencJHcJcAiKKSD-rLv2Uam-2mrxUs9pAtgCC503qzpJcHQUoXDYLu3eGeEMNR-L54UWCU/s16000/2.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once basic information filled for key vault then
we can set Access Policy to access the Key Vault. This demo I am leaving it as
default </p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiExdWVCJdCdYlKyNT85CvBOQMRw-q2hyphenhyphendbtp3SQl-9uNulEAEfQHwnMZ32GGxsOks9nJBZn5fCbmWVuLpCU-taSjmyfdy9NTiX7Fz77-vjxpbflqAch8_B7bYDTGHTKntKuibAvEcgM4I/s1292/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="681" data-original-width="1292" height="337" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiExdWVCJdCdYlKyNT85CvBOQMRw-q2hyphenhyphendbtp3SQl-9uNulEAEfQHwnMZ32GGxsOks9nJBZn5fCbmWVuLpCU-taSjmyfdy9NTiX7Fz77-vjxpbflqAch8_B7bYDTGHTKntKuibAvEcgM4I/w640-h337/3.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Then click on <b>Networking</b> button for
network setting. It gives you to choose and allow network based on your requirement.
I am leaving this as default.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNEtIbiYlfSAO9oM9FBQljl8sT9jDe_EyGcdpD5JyC24fRUrMNc4pXWsG6pK_35QV4rECZnPlFpF9oP0jSYJKh4-kxOhVkCRBMw7VPd1sOHybTjDNPB_fU9r3cOS62xWImbT-dgWz-oDE/s578/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="426" data-original-width="578" height="472" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNEtIbiYlfSAO9oM9FBQljl8sT9jDe_EyGcdpD5JyC24fRUrMNc4pXWsG6pK_35QV4rECZnPlFpF9oP0jSYJKh4-kxOhVkCRBMw7VPd1sOHybTjDNPB_fU9r3cOS62xWImbT-dgWz-oDE/w640-h472/4.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Click on Tags and set then same as we do for all
azure resources. Tags options come every time you create any new resource in
azure. I am leaving tag as blank for now.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><i>You apply tags to your Azure
resources, resource groups, and subscriptions to logically organize them into a
taxonomy.</i></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once all setting is configurated for key vault
then it will validate all information and create button will be enabled in
screen as below. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKKsqpDzAufKOeCmZETC8BNR3tDGprigjQs3BHWYgAAC5g90baS8Fe3mWdmB4be3nm0NWeGK1SEfoO3E3PZylYMPcThyphenhyphennqc3_xz9TpQ5ue7y_4fN4DrFK0Qyf1RRTE-ANif3ZV811qePA/s668/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="668" data-original-width="599" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKKsqpDzAufKOeCmZETC8BNR3tDGprigjQs3BHWYgAAC5g90baS8Fe3mWdmB4be3nm0NWeGK1SEfoO3E3PZylYMPcThyphenhyphennqc3_xz9TpQ5ue7y_4fN4DrFK0Qyf1RRTE-ANif3ZV811qePA/s16000/5.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->When we click in create button it will create Azure
Key Vault for us.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiykjHitCBhZrowj5uLKuj8eI62rPjkmF8QEyipqNK-uGjRL59drEaZq0DoBU-fYsk4FQ4JNF37DQXMpvh5rJeI8B0IXOpGbycibqAYMVm1qKIs9imUmn8Rs7aJh8kU0W6ThvbCDPQAMWY/s1182/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="535" data-original-width="1182" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiykjHitCBhZrowj5uLKuj8eI62rPjkmF8QEyipqNK-uGjRL59drEaZq0DoBU-fYsk4FQ4JNF37DQXMpvh5rJeI8B0IXOpGbycibqAYMVm1qKIs9imUmn8Rs7aJh8kU0W6ThvbCDPQAMWY/w640-h290/6.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Now our Azure Key vault ready for use.</p>
<h1><a name="_Toc66557469">Use azure key vault for connection string</a> <o:p></o:p></h1>
<p class="MsoNormal">We will add our connection string as <b>Secrets</b> in key
vault. Our secret name will be <b>SchoolDB</b>. To add secret, need to follow below
steps.<o:p></o:p></p>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpFirst" style="text-align: left; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Click on key vault setting section
<b>Secrets </b>link</span></p><p class="MsoListParagraphCxSpMiddle" style="text-align: left;"><span lang="EN-IN"><o:p> </o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="text-align: left;"><span lang="EN-IN"><o:p></o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAoJl7VKTyzCRdhdUogglIfqopnNA8Tc_WP8QLzp0ewBvtxvWVsmMNuQkM6E_WoiEf5cUV49BcVmj8wxg7Qw1rezAIiyDKQghxrri5gfjfdXcDyLuxfh23EarDr1oDezQyWByDG9pGvIU/s894/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="534" data-original-width="894" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAoJl7VKTyzCRdhdUogglIfqopnNA8Tc_WP8QLzp0ewBvtxvWVsmMNuQkM6E_WoiEf5cUV49BcVmj8wxg7Qw1rezAIiyDKQghxrri5gfjfdXcDyLuxfh23EarDr1oDezQyWByDG9pGvIU/s16000/7.png" /></a></div><p></p><p class="MsoListParagraphCxSpMiddle" style="text-align: left;"><span lang="EN-IN"><o:p><br /></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="text-align: left; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Click on <b>Generate/Import </b>link
in top and add our secret <b>SchoolDB </b>as connection string value for Web
app<b>.</b></span></p><p class="MsoListParagraphCxSpMiddle" style="text-align: left;"><span lang="EN-IN"><o:p></o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicUCJj58eCXnjokEcYhzVJalMjdc9VlPnPna1P14gwjP4rQ3HDsrxuc9tbPH6cf96cTY2u9ydCKbCCICkimY59rk3883RbNywpAHO8dS__skfGYrYSEAzie-3PCksS8lQaiVOj9Vh2dCs/s751/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="505" data-original-width="751" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicUCJj58eCXnjokEcYhzVJalMjdc9VlPnPna1P14gwjP4rQ3HDsrxuc9tbPH6cf96cTY2u9ydCKbCCICkimY59rk3883RbNywpAHO8dS__skfGYrYSEAzie-3PCksS8lQaiVOj9Vh2dCs/s16000/8.png" /></a></div><p></p><p class="MsoListParagraphCxSpMiddle" style="text-align: left;"><span lang="EN-IN"><o:p><br /></o:p></span></p><p class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span lang="EN-IN">3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">Click on create button then we
will use this in our .net core MVC application.<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="text-indent: -0.25in;">
</p><p class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span lang="EN-IN">4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-IN">If we want to change the secret
value in future azure key vault create new version for every change.</span></p></blockquote><p> </p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC1PwmuxlG17j_vk3VYtUBfEGEB5cdgdwQ_vKBa2cRig4yAd69t1l3O9si6yoBcRtkBnzLvCjmy_-bOXEazmfWPWYAUfg7sAnUhPytFJ_DP4DSTZC9iYyeCynBEnplG7JoFlS5v5a7nfg/s1111/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="356" data-original-width="1111" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC1PwmuxlG17j_vk3VYtUBfEGEB5cdgdwQ_vKBa2cRig4yAd69t1l3O9si6yoBcRtkBnzLvCjmy_-bOXEazmfWPWYAUfg7sAnUhPytFJ_DP4DSTZC9iYyeCynBEnplG7JoFlS5v5a7nfg/w640-h206/12.png" width="640" /></a></div><br /> </div><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><div class="separator" style="clear: both; text-align: left; text-indent: -24px;">5. Once we created secret then need to give permissions to user or app who will use this secret. I will use this secret in VS 2019 then need to give the user access from Access policies like below</div></blockquote><p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgO2QXTLvhuKWBPKnp_JhJITPnjjqxSdbA0OUSIgsBT661cVNsF8eopGsHxUnnnp-TrW-w7U6l0NPoluDIhyphenhyphenjjJqCD2VNjxqJK1TjN9PfQOL6A56DvZADgfc63DTAKNca-MDvQZf1zFdM/s1296/mnaged.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="621" data-original-width="1296" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgO2QXTLvhuKWBPKnp_JhJITPnjjqxSdbA0OUSIgsBT661cVNsF8eopGsHxUnnnp-TrW-w7U6l0NPoluDIhyphenhyphenjjJqCD2VNjxqJK1TjN9PfQOL6A56DvZADgfc63DTAKNca-MDvQZf1zFdM/w640-h306/mnaged.PNG" width="640" /></a></div><br /><p></p><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><div class="separator" style="clear: both; text-align: left; text-indent: -24px;"> if you want to learn more about Access policies. please read <a href="https://blogs.deepakjoshi.info/2021/06/managed-identity.html" target="_blank">Managed Identity</a> blog </div></blockquote><p></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span lang="EN-IN"><o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="text-align: left; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">I have create new application <b>DJBlogs.Azure.KeyVault
</b>.net core application to consume the secret key as connection string.<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="text-align: left;"><span lang="EN-IN">Download code from GitHub: <a href="https://github.com/deepakjoshiinfo/DJBlogs.Azure.KeyVault" target="_blank">https://github.com/deepakjoshiinfo/DJBlogs.Azure.KeyVault</a></span></p><p class="MsoListParagraphCxSpMiddle" style="text-align: left;"><span lang="EN-IN">Start-up CS Page: <a href="https://github.com/deepakjoshiinfo/DJBlogs.Azure.KeyVault/blob/master/DJBlogs.Azure.KeyVault/Startup.cs" target="_blank">Startup.cs</a></span></p><p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><o:p></o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV5zPkAQH6lO0QohTWuHbjpU_6wrx6zt7oIpT66qEqiNL346WFB9btBihuByULeYSg7vn0i4U0x_ya9nKLiZZavjGG7tU9EC45tngwIET8kjvZHP9uPlmq2O_Wsbf74lsT2t7ZDqhhcUA/s1206/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="524" data-original-width="1206" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV5zPkAQH6lO0QohTWuHbjpU_6wrx6zt7oIpT66qEqiNL346WFB9btBihuByULeYSg7vn0i4U0x_ya9nKLiZZavjGG7tU9EC45tngwIET8kjvZHP9uPlmq2O_Wsbf74lsT2t7ZDqhhcUA/w640-h278/9.png" width="640" /></a></div></blockquote><p> </p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span lang="EN-IN">7.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span>If we run the .net core MVC application it will
pull data from database which mentioned in key vault secret. </span></p></blockquote><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4K1RVI6RwduC3d3N5wFpQddCEvmyjtUQc8RTTq1Fzq3PDLOvfh2-YbFi3potqV0M1tWRvFOcDBPO9ubXRq8UkJFPCrYuF9TlabJbUr3jF8a4VQvBMr5Z6ns7OdM_WKIThH1We2x9Ndzs/s1093/13.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="703" data-original-width="1093" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4K1RVI6RwduC3d3N5wFpQddCEvmyjtUQc8RTTq1Fzq3PDLOvfh2-YbFi3potqV0M1tWRvFOcDBPO9ubXRq8UkJFPCrYuF9TlabJbUr3jF8a4VQvBMr5Z6ns7OdM_WKIThH1We2x9Ndzs/s16000/13.png" /></a></div>
<p class="MsoNoSpacing">Hope it will help you to understand little bit about <b>Azure
Key Vault</b> and how you can use them.<o:p></o:p></p>
<p class="MsoNoSpacing">Keep sharing keep learning. Cheers</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-36826325383314858332020-12-26T13:32:00.006+05:302021-04-12T15:14:30.265+05:30What is data migration assistant?<p class="MsoNoSpacing" style="text-align: justify;">The Data Migration Assistant
is migration tool developed by Microsoft. It is used for moving data from one
storage system to another. The Data Migration Assistant (DMA) helps you upgrade
to a modern data platform by detecting compatibility issues that can impact
database functionality in your new version of SQL Server or Azure SQL Database.
DMA recommends performance and reliability improvements for your target
environment and allows you to move your schema, data, and uncontained objects
from your source server to your target server.<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoN901vr50GFpE0-3ysKo858svJvCQApAiYkFWwsAMlefzsOG7n-jyI4mnoyQeqGmbGmCuH2BO_VdtipJQROdIB6fHG7VlYSTNjF7TpjAWZ-nwHpf7yet_llnWj8PqKNpSlWphVL1pOTE/s874/1.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="540" data-original-width="874" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoN901vr50GFpE0-3ysKo858svJvCQApAiYkFWwsAMlefzsOG7n-jyI4mnoyQeqGmbGmCuH2BO_VdtipJQROdIB6fHG7VlYSTNjF7TpjAWZ-nwHpf7yet_llnWj8PqKNpSlWphVL1pOTE/s16000/1.jpg" /></a></div><p></p>
<p class="MsoNoSpacing">You can download the latest version of Data Migration Assistant
from this link: <span class="MsoHyperlink"><a href="https://www.microsoft.com/en-us/download/details.aspx?id=53595" target="_blank">Download</a></span><o:p></o:p></p>
<p class="MsoNoSpacing">Once you download it from above link please install it in
your local machine. <o:p></o:p></p>
<h1><a name="_Toc59802563">Data Migration Assistant Capabilities</a><o:p></o:p></h1>
<p class="MsoNoSpacing">Data Migration Assistant provide two type capabilities <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><b style="mso-bidi-font-weight: normal;">Assessment</b>:
On-premises SQL database assessment<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><b style="mso-bidi-font-weight: normal;">Migration</b>:
Migrate On-premises SQL database into Azure SQL database</p>
<h2><a name="_Toc59802564">Assessment</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">If you're upgrading your
on-premises SQL Server instance to a modern on-premises SQL Server instance or
to SQL Server hosted on an Azure VM, set the source and target server type to
SQL Server. If you're migrating to Azure SQL Database set the target
server type to Azure SQL Database.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZmkt0qVs7cdgvbxs8TQf2NvvWkS1FtH8uPihqBnhEUFilOe5_GacIDPLYbNdg8e-i6qyIYOM-Qlu19i64uZhkbj7-vgxVxZbP-9wMRAz1AAAllf_pEJ2ENA9T0DwZVTr5cJxCNntEcnE/s601/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="419" data-original-width="601" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZmkt0qVs7cdgvbxs8TQf2NvvWkS1FtH8uPihqBnhEUFilOe5_GacIDPLYbNdg8e-i6qyIYOM-Qlu19i64uZhkbj7-vgxVxZbP-9wMRAz1AAAllf_pEJ2ENA9T0DwZVTr5cJxCNntEcnE/s16000/2.png" /></a></div><br /><p class="MsoNormal" style="text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="text-align: justify;">Need follow these steps to do <b style="mso-bidi-font-weight: normal;">Assessment</b> in your MS SQL with help of Data
Migration Assistant.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Open <b style="mso-bidi-font-weight: normal;">Data
Migration Assistant</b> tool in your local machine<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once tool is
opened I will create new project name <b style="mso-bidi-font-weight: normal;">FunctionApp</b>
</span></span>for<b style="mso-bidi-font-weight: normal;"> Assessment</b><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"> for local machine database which I will migrate on Azure
SQL</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnhyphenhyphenEZzyXRneZr2eyChKkMlEKtRjj-7DOn9tfMQm4iRF9-MLBSN0CDd049moBBKE408gxBiZUuf8WVYG1wb6qo3XomyB6hFocsW8HY8cbC-lFbt0a7HI5BfPzfHdl1DESlGU-bAE0ENZ0/s1001/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="587" data-original-width="1001" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnhyphenhyphenEZzyXRneZr2eyChKkMlEKtRjj-7DOn9tfMQm4iRF9-MLBSN0CDd049moBBKE408gxBiZUuf8WVYG1wb6qo3XomyB6hFocsW8HY8cbC-lFbt0a7HI5BfPzfHdl1DESlGU-bAE0ENZ0/s16000/3.png" /></a></div><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Filled form
as above then click on <b style="mso-bidi-font-weight: normal;">Create</b> then
it will ask to choose the options for SQL database assessment.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l2 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Check Database Compatibility <o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l2 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Check Feature Parity</span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p> </o:p></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2afPcK_10sO47aog28rLwLHCZ0s2dzWDsEH0SVz7U8b3BDudRVz2Jq0rMsyKLhm2TXSBEbvQF2OvaOMCT1evx88cPLaRWpkDWomP44JrXadZ2csrcC6_y-Pe9HvAw2qHjDRkspAvfjes/s1005/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="595" data-original-width="1005" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2afPcK_10sO47aog28rLwLHCZ0s2dzWDsEH0SVz7U8b3BDudRVz2Jq0rMsyKLhm2TXSBEbvQF2OvaOMCT1evx88cPLaRWpkDWomP44JrXadZ2csrcC6_y-Pe9HvAw2qHjDRkspAvfjes/s16000/4.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once database
assessment options selected like database compatibility then it will ask for on-premises
database source. I am using my local machine database.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcmS4EaTUgPLIF_O7AzKl-QjQwFS0JnsxXLLmSjTqQvOtpXESeXPTc4AE75F3bF-nkT7JNBFNf_AYV8GCWmbZcXJJaNTHBk-GBwOqJTQXixtFh2GeTyndUYxhNNszHZ7FrD-IswGys1kE/s1006/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="592" data-original-width="1006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcmS4EaTUgPLIF_O7AzKl-QjQwFS0JnsxXLLmSjTqQvOtpXESeXPTc4AE75F3bF-nkT7JNBFNf_AYV8GCWmbZcXJJaNTHBk-GBwOqJTQXixtFh2GeTyndUYxhNNszHZ7FrD-IswGys1kE/s16000/5.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">As above data
source details entered just clicked on <b style="mso-bidi-font-weight: normal;">Connect.
</b>It will ask for database name which you want Assess.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYZHOXtAbOXt9A_n44KdcrR1sL6G3PxwaUhJVYAdRajaHGAeWS-Z9NS1uRUdh-NZNSHcNbEYYNVUP6tyGqQ7uWVecuglPaITHEbA4p0I9JodPEE-_8AdidmnxPbGhJ4SPZ2BorsRYAsEg/s1003/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="588" data-original-width="1003" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYZHOXtAbOXt9A_n44KdcrR1sL6G3PxwaUhJVYAdRajaHGAeWS-Z9NS1uRUdh-NZNSHcNbEYYNVUP6tyGqQ7uWVecuglPaITHEbA4p0I9JodPEE-_8AdidmnxPbGhJ4SPZ2BorsRYAsEg/s16000/6.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once I have
selected database then need to click on <b style="mso-bidi-font-weight: normal;">Add</b>.
These details will be added for <b style="mso-bidi-font-weight: normal;">Assessment</b>
and we can <b style="mso-bidi-font-weight: normal;">Start Assessment</b> of selected database.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV7phkeB-X6Z11T193O7un9GZ9MnCssLMiWXErK1_zA-HirGrGSXPpWqG1a2XbTSW_ME8PMutT3EfbZtfwXA4n7OX4NUhz3VJQ8BQLM6bLu2mtWLHEmNubdiviVRwVRtq0LIitUItT-Tk/s1002/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="320" data-original-width="1002" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV7phkeB-X6Z11T193O7un9GZ9MnCssLMiWXErK1_zA-HirGrGSXPpWqG1a2XbTSW_ME8PMutT3EfbZtfwXA4n7OX4NUhz3VJQ8BQLM6bLu2mtWLHEmNubdiviVRwVRtq0LIitUItT-Tk/s16000/7.png" /></a></div><br /><span color="windowtext" style="text-decoration: none; text-underline: none;"><br /></span><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p> </o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">When I click
on start assessment button it checks both <b style="mso-bidi-font-weight: normal;">Database
Compatibility</b> and <b style="mso-bidi-font-weight: normal;">Feature Parity </b>as
below</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi10uh60LT16-WpCtHNZlgPy3zFDpSTdBOqm0KL9vq5_Fo7o-9iynbxtivq4ID9X-tDqnL8NQMpAQrlVszqHac8VwdJWOb-NDXqma3Stkc0E5UQW36iUt9jTJDq7aP_Tj3RbtQrI1rW81g/s1007/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="446" data-original-width="1007" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi10uh60LT16-WpCtHNZlgPy3zFDpSTdBOqm0KL9vq5_Fo7o-9iynbxtivq4ID9X-tDqnL8NQMpAQrlVszqHac8VwdJWOb-NDXqma3Stkc0E5UQW36iUt9jTJDq7aP_Tj3RbtQrI1rW81g/s16000/8.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="text-align: justify;"><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">As above We
can see, have not found any compatibility issue in our local SQL database and We
are good to migrate it on Azure SQL. If you want migrate data directly in
azure, you can do it by just clicking on <b style="mso-bidi-font-weight: normal;">Upload
to Azure Migrate </b>button. <span style="mso-spacerun: yes;"> </span>In below I
will show how migrate local database (on-premises) into azure<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p> </o:p></span></span></p>
<h2><a name="_Toc59802565">Migration</a><o:p></o:p></h2>
<p class="MsoNoSpacing" style="text-align: justify;">The Data Migration Assistant
provides seamless assessments of SQL Server on-premises and upgrades to later
versions of SQL Server or migrations to SQL Server on Azure VMs or Azure SQL
Database. Here are step-by-step instructions for migrating SQL Server
on-premises (Local database) to Azure SQL Database by using the Data Migration
Assistant.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkebxjFJuTd9LYINVK0FBcY7B2SDhczwo0QpqeMmKBVjvoVVi18um1M2MFifloiWKvs-l2nlwXkIS6nyGllvMhyphenhyphenC-iI4O-d_zYCD5fIwI987sF6E480aREVus7MszbfIoe6janM4AabFY/s948/9.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="263" data-original-width="948" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkebxjFJuTd9LYINVK0FBcY7B2SDhczwo0QpqeMmKBVjvoVVi18um1M2MFifloiWKvs-l2nlwXkIS6nyGllvMhyphenhyphenC-iI4O-d_zYCD5fIwI987sF6E480aREVus7MszbfIoe6janM4AabFY/s16000/9.jpg" /></a></div><p class="MsoNoSpacing" style="text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="text-align: justify;">Need follow these steps to do <b style="mso-bidi-font-weight: normal;">Migration</b> in your MS SQL with help of Data
Migration Assistant.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Open <b style="mso-bidi-font-weight: normal;">Data
Migration Assistant</b> tool in your local machine<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once tool is
opened I will create new project name <b style="mso-bidi-font-weight: normal;">LocalToAzure</b>
</span></span>for<b style="mso-bidi-font-weight: normal;"> Migration</b><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"> for local machine database which I will migrate on Azure
SQL</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwkZ5cu8p6fBMaMte7IvMejhlLxK_4r6P8iTeOucnZoJR0rvbrNaieYOspqILsmaYGzO30S6uLemA0m2e5zij2xkgXRhnElyItDza1o6fDwLV_VdcTOYZIQNuru0JFLutQhZ3gu9VuQ1M/s629/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="588" data-original-width="629" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwkZ5cu8p6fBMaMte7IvMejhlLxK_4r6P8iTeOucnZoJR0rvbrNaieYOspqILsmaYGzO30S6uLemA0m2e5zij2xkgXRhnElyItDza1o6fDwLV_VdcTOYZIQNuru0JFLutQhZ3gu9VuQ1M/s16000/10.png" /></a></div><span color="windowtext" style="text-decoration: none; text-underline: none;"><br /></span><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once filled all information as above then click
on <b style="mso-bidi-font-weight: normal;">Create</b> button. It will follow 6
steps for schema and data migrations.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Select
Data source (Local database FunctionApp)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Select
Target source (Target database Azure database)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">c.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Select
database tables (Objects)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">d.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Generate
script for selected objects<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">e.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Deploy
schema in target server<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">f.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Migrate data into select objects<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">Select source database which we
want to migrate in azure</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVVDkzpd4UbjX2Fk8QUPLBeJVwtontWNXdA4Bj5dty2OjNoAcGMgBlaAJ4BRnLatW_1Frkuo3BctOG__2YI3p-QhXcgN9UTXk9uisha9TowsSbxb-ikrBW07h5cGtl0AC9FeET3DMadFo/s1008/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="591" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVVDkzpd4UbjX2Fk8QUPLBeJVwtontWNXdA4Bj5dty2OjNoAcGMgBlaAJ4BRnLatW_1Frkuo3BctOG__2YI3p-QhXcgN9UTXk9uisha9TowsSbxb-ikrBW07h5cGtl0AC9FeET3DMadFo/s16000/11.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Need to set target source for schema and data migration. We have created this database in last blog. If you want know more about it please read my previous post <a href="https://blogs.deepakjoshi.info/2020/12/how-to-create-azure-sql-database.html" target="_blank">How to create Azure SQL database</a> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAWM1QO2XPHH9wbqk8Q5yvdLnvw_p5WdNfWj682_BivtejW8uvttBxVs-jShP6dPdDeA_PaJ5agFBDZES5LTJ27tTqWUGNL5dgBBNyWmo0a5XX_PNimgls9TZOmBKhDSnBKffeg40z3bk/s1002/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="586" data-original-width="1002" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAWM1QO2XPHH9wbqk8Q5yvdLnvw_p5WdNfWj682_BivtejW8uvttBxVs-jShP6dPdDeA_PaJ5agFBDZES5LTJ27tTqWUGNL5dgBBNyWmo0a5XX_PNimgls9TZOmBKhDSnBKffeg40z3bk/s16000/12.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Select all the objects which you want to migrate
in Azure</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOeo0KjsZU3y5VLyHaXDgdKEksuUwehVGoYwBMy34CJk4gEGi3PjREawgWLrc_q0ohkeJ3EDb_srF_fBBUC-RCi83VAmizq-b3yec6rJmIvfOXH080TLWVmIoknS3XxxJoA521PWN378w/s1008/13.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="595" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOeo0KjsZU3y5VLyHaXDgdKEksuUwehVGoYwBMy34CJk4gEGi3PjREawgWLrc_q0ohkeJ3EDb_srF_fBBUC-RCi83VAmizq-b3yec6rJmIvfOXH080TLWVmIoknS3XxxJoA521PWN378w/s16000/13.png" /></a></div><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once tables are selected then need to click on <b style="mso-bidi-font-weight: normal;">Generate SQL Script</b> button and it will
generate SQL script.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibtEhn0U3g_CCTgvLsmP98Fv07nNGWNKRe69-ILLusPUGyHFigtmPFTnNZVHDr_2xJtFznzVRadyKYAd_RjMXvraZfAKDqU2qtIZsDTC1U4p-nL04DD5Uz5bqZReYoOLBjTpHSaTD4rMI/s1004/14.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="592" data-original-width="1004" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibtEhn0U3g_CCTgvLsmP98Fv07nNGWNKRe69-ILLusPUGyHFigtmPFTnNZVHDr_2xJtFznzVRadyKYAd_RjMXvraZfAKDqU2qtIZsDTC1U4p-nL04DD5Uz5bqZReYoOLBjTpHSaTD4rMI/s16000/14.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once script is generated you need to click on
Deploy schema. It will deploy schema on Azure database.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxywzuigkUJyDor42kYB1DrKhZ_UWc0uiFOtV8ray8dXUVAJlFT8n6hEBfdTZF___8DTWOOOI1PRpho8wrriz7xERHl07xbOQ2k92yw3YbqinydZUnQBUT3-FEGZih43zGK-Hvfw-mfzQ/s1004/15.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="593" data-original-width="1004" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxywzuigkUJyDor42kYB1DrKhZ_UWc0uiFOtV8ray8dXUVAJlFT8n6hEBfdTZF___8DTWOOOI1PRpho8wrriz7xERHl07xbOQ2k92yw3YbqinydZUnQBUT3-FEGZih43zGK-Hvfw-mfzQ/s16000/15.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once schema is deployed on Azure you need to
click on Migrate data to migrate data into Azure database. You can see, we have only Products table with one record. Once migration is done it will copy both table schema and records in Azure SQL. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_CRzmCrKJ9SlTH9vsj8hygWoffCSwd6ONRr-jUPhOfV9C4jqfmpYr15V6qh0fTieqigxTGKmncB04CAQU6-l-g-S5M0CIISxWCiU4xOdE_t1j03gY7Bw-bDX_-AxVT-3igoKx-GN-f3Q/s1004/16.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="590" data-original-width="1004" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_CRzmCrKJ9SlTH9vsj8hygWoffCSwd6ONRr-jUPhOfV9C4jqfmpYr15V6qh0fTieqigxTGKmncB04CAQU6-l-g-S5M0CIISxWCiU4xOdE_t1j03gY7Bw-bDX_-AxVT-3igoKx-GN-f3Q/s16000/16.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once all set then click on <b style="mso-bidi-font-weight: normal;">Start data migration</b> it will deploy and migrate data in azure
database as below.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrSZxO2ToVBfbbirnfoeTeLH-8tisY-rEEX94GPFk3UBj17sF1HTT1AGhYg-bnGIRjOC_7eB1USX9V0F_LCdZQfi0O_h7SitcRwb0M8JRiHhF2HUa0U51f4LBRq_PRk-nSoGfXlVU8A1M/s1009/17.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="592" data-original-width="1009" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrSZxO2ToVBfbbirnfoeTeLH-8tisY-rEEX94GPFk3UBj17sF1HTT1AGhYg-bnGIRjOC_7eB1USX9V0F_LCdZQfi0O_h7SitcRwb0M8JRiHhF2HUa0U51f4LBRq_PRk-nSoGfXlVU8A1M/s16000/17.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">10.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->You can connect with Azure database help of SSMS
and can see migrated schema and data as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOix1ueFToNKbE0xmcDE0CHv94UxBOrc46BEdAKIF8TJOjv5mHkYIxBdVpCUIgd4oylbZpjWrBbltxTQi0gGmKWDuRKMyKxY7eRikfyko_WidwR6DKW9-ejo2gPm9_fc_c4sb-Hj44a1w/s674/18.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="531" data-original-width="674" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOix1ueFToNKbE0xmcDE0CHv94UxBOrc46BEdAKIF8TJOjv5mHkYIxBdVpCUIgd4oylbZpjWrBbltxTQi0gGmKWDuRKMyKxY7eRikfyko_WidwR6DKW9-ejo2gPm9_fc_c4sb-Hj44a1w/s16000/18.png" /></a></div>
<p class="MsoNoSpacing" style="text-align: justify;">Hope it will help you to understand,
what is Data Migration Assistant and how we will use it for schema and data
migration.<o:p></o:p></p>
<p class="MsoNoSpacing">Keep sharing keep learning. Cheers<o:p></o:p></p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com11tag:blogger.com,1999:blog-3060332739418622694.post-11646974189857826882020-12-21T10:22:00.011+05:302020-12-23T14:13:54.217+05:30How to create Azure SQL database<p> <span style="text-align: justify;">Azure SQL is built upon the
familiar SQL Server engine, so you can migrate applications with ease and
continue to use the tools, languages, and resources you're familiar with. Your
skills and experience transfer to the cloud, so you can do even more with what
you already have. If you want to learn, how Azure SQL server work and its
architecture. Please read my previous blog </span><span class="MsoHyperlink" style="text-align: justify;"><a href="https://blogs.deepakjoshi.info/2020/05/azure-sql-database.html" target="_blank">How AzureSQL works? </a></span><span style="text-align: justify;"> </span></p><p class="MsoNormal" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">Azure SQL Database is a
relational database-as-a-service (DBaaS) hosted in Azure that falls into the
industry category of Platform-as-a-Service (PaaS). There are two type of Azure
SQL databases which we can use in our application.<o:p></o:p></p>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><b><span lang="EN-IN">Azure SQL Database</span></b><span lang="EN-IN">: Support modern cloud
applications on an intelligent, managed database service, that includes
serverless compute. It gives us two type of pricing model <b>DTU</b> and <b>vCore</b>. With the
<b>DTU </b>model you pay one fixed price for your compute (or IO/memory), as well as
your data storage and back up retention. With the <b>vCore</b> model you have separate
charges for your compute (what type of node or compute power you're using) and
a separate charge for your storage.</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpFirst" style="text-align: justify;"><b><span lang="EN-IN">DTU: </span></b><span lang="EN-IN">Fixed price for your compute and storage (or IO/Memory)<b><o:p></o:p></b></span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><b style="text-align: justify;"><span lang="EN-IN">vCore: </span></b><span lang="EN-IN" style="text-align: justify;">Compute charges + Your storage charges</span> </p></blockquote></blockquote>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><span lang="EN-IN"> Azure SQL Database offers the following
deployment options<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->a.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Single Database:</b> Used in modern
application (SaaS, Microservice)<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->b.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Elastic Pool:</b> Group of single databases</p><p class="MsoListParagraph" style="mso-list: l1 level1 lfo2; text-align: justify; text-indent: -0.25in;">
</p><p class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><b><span lang="EN-IN">Azure SQL Managed Instance:</span></b><span lang="EN-IN"> Modernize
your existing SQL Server applications at scale with an intelligent fully
managed instance as a service, with almost 100% feature parity with the SQL
Server database engine. Best for most migrations to the cloud. It supports SQL
Agent, database email and not supported SSRS<o:p></o:p></span></p></blockquote><p class="MsoListParagraph" style="mso-list: l1 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l1 level2 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l1 level2 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--></p>
<p class="MsoListParagraph" style="mso-list: l1 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--></p><p class="MsoListParagraph" style="mso-list: l1 level1 lfo2; text-align: justify; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYImtyEvtWqGkGUEL8z8LCasEf_sGbejASRs29byVugN63kRpkOzWKeHK6qPzwEHGsKcSiDBylskVFxU9xs6T6d-c4BWD3r1JNLkzRTu9hpmztrIWMvAsFNg0Rnx02IIHlTY1m0C8Ks-8/s1280/1.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYImtyEvtWqGkGUEL8z8LCasEf_sGbejASRs29byVugN63kRpkOzWKeHK6qPzwEHGsKcSiDBylskVFxU9xs6T6d-c4BWD3r1JNLkzRTu9hpmztrIWMvAsFNg0Rnx02IIHlTY1m0C8Ks-8/w640-h360/1.jpg" width="640" /></a></div><p></p>
<p class="MsoNormal">You can see in below diagram, each service offering can be
characterized by the level of administration you have over the infrastructure,
and by the degree of cost efficiency.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQS9nHpWxFyUgCwKay57tVkboZXMUY_sjIKah0PoT3prvPKPPICt82QvgBSjO5eyXqBauHyzgukUIQ2vAjSQbB6kW-RWKeMT_9GMCWf49XebRX6-0JGV9MkGa1K7uS0QcYoSl2z_m5Zv4/s582/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="387" data-original-width="582" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQS9nHpWxFyUgCwKay57tVkboZXMUY_sjIKah0PoT3prvPKPPICt82QvgBSjO5eyXqBauHyzgukUIQ2vAjSQbB6kW-RWKeMT_9GMCWf49XebRX6-0JGV9MkGa1K7uS0QcYoSl2z_m5Zv4/s16000/2.png" /></a></div><br /><p class="MsoNormal"><br /></p>
<h1><a name="_Toc59437831">Create Azure SQL</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">Need follow steps to create Azure
SQL with help of azure portal. <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/">https://portal.azure.com</a></span><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once we login
in portal then need to choose Azure SQL which type of deployment you want based
on your requirement. I am going to create <b style="mso-bidi-font-weight: normal;">Single
Database</b>.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span color="windowtext"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWOvLRekrEJxhPIkI3iV4aziIxLJrjrordamk4rj7NrAEWDHIebiw_nR7d8XHrTy-p4fI5ubMrjoaAElNnCTp-OXQYUcjNdby-ockvTWgksa1_jK3HaNz_NKZlevLl1DZNVKvAP10CQQc/s1148/3.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="477" data-original-width="1148" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWOvLRekrEJxhPIkI3iV4aziIxLJrjrordamk4rj7NrAEWDHIebiw_nR7d8XHrTy-p4fI5ubMrjoaAElNnCTp-OXQYUcjNdby-ockvTWgksa1_jK3HaNz_NKZlevLl1DZNVKvAP10CQQc/w640-h266/3.PNG" width="640" /></a></div><br /> <p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once database
is selected then we need to click on <b style="mso-bidi-font-weight: normal;">Create</b>
button. It will open the form which need to fill based on your requirement. In
this case I am choosing <b style="mso-bidi-font-weight: normal;">Basic </b>computation
configuration for this Azure SQL.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPxjHIbqtCkKCwiN0rG2xzaN_5dCybz5O6PFjy497JfoAY-Z3T9llBdl_Dq4uTTMUezb8D8b9SD08cCJoX4ThM3rJZmU5NskwfpYNczEctE-QVkKd2fGoYV7yx9iDmV6qBHQpex5IQv30/s709/4.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="669" data-original-width="709" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPxjHIbqtCkKCwiN0rG2xzaN_5dCybz5O6PFjy497JfoAY-Z3T9llBdl_Dq4uTTMUezb8D8b9SD08cCJoX4ThM3rJZmU5NskwfpYNczEctE-QVkKd2fGoYV7yx9iDmV6qBHQpex5IQv30/s16000/4.PNG" /></a></div><span color="windowtext" style="text-decoration: none; text-underline: none;"><br /></span><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once it will be
created it will look like as below</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWkyGFGsnE6Oa_b7MBD_xx3cZPp7rXcXiXyBsDS0T6UKQiu6-QtnLP9tzHoRsxdT-nJBqqczXAAs1L9BZDZ_iziD-Y7JRSbFUUBaBrVETN6jG255urXRcdECim8OCRZnbfVEqNuHYcrgE/s699/05.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="428" data-original-width="699" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWkyGFGsnE6Oa_b7MBD_xx3cZPp7rXcXiXyBsDS0T6UKQiu6-QtnLP9tzHoRsxdT-nJBqqczXAAs1L9BZDZ_iziD-Y7JRSbFUUBaBrVETN6jG255urXRcdECim8OCRZnbfVEqNuHYcrgE/s16000/05.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once all the information filled then need to click on <b style="mso-bidi-font-weight: normal;">Networking</b> button. Here we can set <b style="mso-bidi-font-weight: normal;">firewall</b> <b style="mso-bidi-font-weight: normal;">rules</b> and <b style="mso-bidi-font-weight: normal;">private endpoints</b>
for this database. We are not setting anything just leaving as default.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIqJ1jsNCZtJ-W4uT6HUDIsO_and9lGwltUalHnjHcU-unr11TVAgU_DgKzsLebB2DOiUnNwhrfbpNT7XmTodPTfExQN8hg4fXBLdKHsec0bIgWWxDB6AN42fANR_UAQwtTPCbMbB23Hk/s677/5.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="677" data-original-width="672" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIqJ1jsNCZtJ-W4uT6HUDIsO_and9lGwltUalHnjHcU-unr11TVAgU_DgKzsLebB2DOiUnNwhrfbpNT7XmTodPTfExQN8hg4fXBLdKHsec0bIgWWxDB6AN42fANR_UAQwtTPCbMbB23Hk/s16000/5.PNG" /></a></div><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Just click on
<b style="mso-bidi-font-weight: normal;">Additional Settings </b>button it will
give us 2 options for SQL database.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink"><b style="mso-bidi-font-weight: normal;"><span color="windowtext" style="text-decoration: none; text-underline: none;">Database
Source:</span></b></span><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"> User can restore database backup and
add sample data in database.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink"><b style="mso-bidi-font-weight: normal;"><span color="windowtext" style="text-decoration: none; text-underline: none;">Database
collation:</span></b></span><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"> Collation specifies how data is
sorted and compared in a database.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">I am taking
all default options</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdJDd2vlnPJ7zu00NOEtlFrEa94O_km1BhuICBPGc4zWkzNXKIV-iyVRt8-qVvEKCjodZtTyktKtGrw6CKCkBB7HqRz3U1EqnfXZMBzzADDHsRQVsM5eMGkGHjHCdvaBiRBlgqzkErTlI/s683/6.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="683" data-original-width="660" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdJDd2vlnPJ7zu00NOEtlFrEa94O_km1BhuICBPGc4zWkzNXKIV-iyVRt8-qVvEKCjodZtTyktKtGrw6CKCkBB7HqRz3U1EqnfXZMBzzADDHsRQVsM5eMGkGHjHCdvaBiRBlgqzkErTlI/s16000/6.PNG" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once you make the changes based on your requirement click
on <b style="mso-bidi-font-weight: normal;">Tags</b> button to add any tag for
billing purpose or resource identification in Azure. You can add like this DEV,
UAT or LIVE environment tag for Azure resources. I am not adding any tag here.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs1_4LwPUpgl1XhbWfyUoZhXJg5EHxbMC88ShyphenhyphenarzP58kBpMdMRwxO6eoKOV1rViOSrVKd4hc1hc5XRW2CyFlXDNOUYBCen6HFAqx6Le1YGuhdllv9ao90A2WPYr6gfIThDVZ1jhP6sIA/s676/7.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="676" data-original-width="644" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs1_4LwPUpgl1XhbWfyUoZhXJg5EHxbMC88ShyphenhyphenarzP58kBpMdMRwxO6eoKOV1rViOSrVKd4hc1hc5XRW2CyFlXDNOUYBCen6HFAqx6Le1YGuhdllv9ao90A2WPYr6gfIThDVZ1jhP6sIA/s16000/7.PNG" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Click on <b style="mso-bidi-font-weight: normal;">Review+ Create</b> button. It will check and
validate all the entry you have entered for this database. If everything looks
good <b style="mso-bidi-font-weight: normal;">Create</b> button will enabled,
then you just click on <b style="mso-bidi-font-weight: normal;">Create</b> button
it will create Azure database for you.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMKWGWjKb5rt1U5C_C0hw_BCgmBtk5l4XcfOmp-jzRFGCUIdC91tN9PEUgVav043rIqXWGEByCaYvx0ZdLeys7dZGed02e_jGrzN40Fp5huT3drM1CTOVS7Shuw0kvpWAmOa1uhdCi7LA/s680/8.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="680" data-original-width="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMKWGWjKb5rt1U5C_C0hw_BCgmBtk5l4XcfOmp-jzRFGCUIdC91tN9PEUgVav043rIqXWGEByCaYvx0ZdLeys7dZGed02e_jGrzN40Fp5huT3drM1CTOVS7Shuw0kvpWAmOa1uhdCi7LA/s16000/8.PNG" /></a></div><br /><span color="windowtext" style="text-decoration: none; text-underline: none;"><br /></span><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once database
created. We can connect it from SSMS and it will display like as below in azure</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbfz9bxJ3_SIXe12CWTSDvKvb835BnSPUegZ6wKNKaUBRB_Wuf3NSPTxXgons6S_MTfhVuoww8BoOmUueI7jv5WPcBQunlJeGOOdAv3h_lft0xeBYfQHkaR0I7VPOqBfC4H76gC6_9c2c/s1183/9.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="457" data-original-width="1183" height="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbfz9bxJ3_SIXe12CWTSDvKvb835BnSPUegZ6wKNKaUBRB_Wuf3NSPTxXgons6S_MTfhVuoww8BoOmUueI7jv5WPcBQunlJeGOOdAv3h_lft0xeBYfQHkaR0I7VPOqBfC4H76gC6_9c2c/w640-h247/9.PNG" width="640" /></a></div><br /><p></p>
<h1><a name="_Toc59437832">Connect Azure database from SQL Server Management
Studio (SSMS)</a><o:p></o:p></h1>
<p class="MsoNormal" style="text-align: justify;">We can connect Azure database
from SSMS. First, we need to add our local machine public IP address (Machine IP
address where SSMS installed) in SQL database firewall in Azure portal<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHSsgVoKVaL1j2HFawdD10n2CgzkBaZ36yuYf3h2ewGniXaUAdXyN0n1gtWU-llZpTZL02n5uuVxXrHTj-c6VnxdZHg3MDs9sdrypNdtkgPiMGVthkicT1y2LHMti8lW0YsAZX7_PNFLs/s754/010.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="579" data-original-width="754" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHSsgVoKVaL1j2HFawdD10n2CgzkBaZ36yuYf3h2ewGniXaUAdXyN0n1gtWU-llZpTZL02n5uuVxXrHTj-c6VnxdZHg3MDs9sdrypNdtkgPiMGVthkicT1y2LHMti8lW0YsAZX7_PNFLs/s16000/010.PNG" /></a></div><br /><p class="MsoNormal" style="text-align: justify;"><br /></p><p class="MsoNormal" style="text-align: justify;">Now need to open SSMS application
click on <b>Connect</b> label below <b>Object Explorer</b><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3a4wX9pPnZRxZLb4DONNgQ8tCNQdLRz_kUxuGso2OHBrhMEX4YD7i1Sz6MAqkdPYs66EJjzy5hD9iJzza-Lu5IBb8LvKIh72DxGCSUARlYnZTKpK-HrWnqkeTOKpp88p5-Om86OJ92Fw/s558/10.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="493" data-original-width="558" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3a4wX9pPnZRxZLb4DONNgQ8tCNQdLRz_kUxuGso2OHBrhMEX4YD7i1Sz6MAqkdPYs66EJjzy5hD9iJzza-Lu5IBb8LvKIh72DxGCSUARlYnZTKpK-HrWnqkeTOKpp88p5-Om86OJ92Fw/s16000/10.PNG" /></a></div><p class="MsoNormal" style="text-align: justify;"><br /></p>
<p class="MsoNormal" style="text-align: justify;">You need to put your Azure SQL
server name, login details and click on <b>Connect</b>
button and It will connect with Azure database<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDoqRRHIM5zpWf2d5zSxjEVrhKQ5EtfXWW_ZHDiS5VJtVqeqyjRnUKYzQBiDNABYxTYZm8gD9-6B1eoh4DgV788BS-QbsqY2e24GGfbx1ic3yAPqIN0tAwlT-0YpVcATDl6bQdG6WhfbQ/s562/11.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="562" data-original-width="507" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDoqRRHIM5zpWf2d5zSxjEVrhKQ5EtfXWW_ZHDiS5VJtVqeqyjRnUKYzQBiDNABYxTYZm8gD9-6B1eoh4DgV788BS-QbsqY2e24GGfbx1ic3yAPqIN0tAwlT-0YpVcATDl6bQdG6WhfbQ/s16000/11.PNG" /></a></div><p class="MsoNormal" style="text-align: justify;"><br /></p>
<p class="MsoNormal" style="text-align: justify;">Hope it will help you to create SQL
database in Azure. Next blog I will show you how to do assessment of your existing
database and will migrate that database in Azure. <span style="mso-spacerun: yes;"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">Keep learning, keep sharing.
Cheers</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com3tag:blogger.com,1999:blog-3060332739418622694.post-8069680460503298332020-11-16T11:18:00.007+05:302020-11-16T11:20:34.839+05:30What is Infrastructure as code<p><span style="text-align: justify;">Infrastructure as code (IaC)
is the process of managing and provisioning computer data centers through files
(ARM template, Terraform), rather than physical hardware configuration or
interactive configuration tools. The IT infrastructure managed by this process
comprises both physical equipment, such as bare-metal servers, as well as
virtual machines, and associated configuration resources. The definitions can
we be stored in version control system (Azure DevOps, GitHub) for Audit
purpose.</span></p>
<p class="MsoNoSpacing"><b style="mso-bidi-font-weight: normal;"><br /></b></p><p class="MsoNoSpacing"><b style="mso-bidi-font-weight: normal;">Infrastructure as
code is the approach to defining computing and network infrastructure through
source code that can then be treated just like any software system.<o:p></o:p></b></p>
<p class="MsoNoSpacing"><b style="mso-bidi-font-weight: normal;">-Martin Fowler</b></p><p class="MsoNoSpacing"><b style="mso-bidi-font-weight: normal;"><br /></b></p>
<p class="MsoNoSpacing" style="text-align: justify;">IaC is a key DevOps practice. Infrastructure
as Code evolved to solve the problem of environment drift in the release
pipeline. Modern cloud-native applications embrace the widely accepted practice
of Infrastructure as Code. With IaC, you automate platform provisioning. You
essentially apply software engineering practices such as testing and versioning
to your DevOps practices. Your infrastructure and deployments are automated,
consistent, and repeatable. Just as continuous delivery automated the
traditional model of manual deployments, Infrastructure as Code (IaC) is
evolving how application environments are managed.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Tools like Azure Resource
Manager (ARM), Terraform, and the Azure Command Line Interface (CLI) enable you
to declaratively script the cloud infrastructure you require.<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYSDcQFzeW-dBqjYi2o_EtOad_Pyil7lANNQfNcnOPF2_Gxs5wB2S7Y8gMzF8rQv6OvdQ5jMcuEbuHTsxBpcV7_L8Og4b_9LnjEyfBXZZ5P8UrBvKXE4X3SvXanxEAPTzdDdpXCF_w0E/s1153/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="621" data-original-width="1153" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYSDcQFzeW-dBqjYi2o_EtOad_Pyil7lANNQfNcnOPF2_Gxs5wB2S7Y8gMzF8rQv6OvdQ5jMcuEbuHTsxBpcV7_L8Og4b_9LnjEyfBXZZ5P8UrBvKXE4X3SvXanxEAPTzdDdpXCF_w0E/w640-h345/1.png" width="640" /></a></div><br /><p class="MsoNoSpacing" style="text-align: justify;"></p><h1><a name="_Toc56417514">Create App Service app using an ARM template</a><o:p></o:p></h1>
<p class="MsoNormal" style="text-align: justify;">The template used in this quick
start is from Azure QuickStart Templates. It deploys an App Service plan and an
App Service app on Windows. It's compatible with .NET Core, .NET Framework,
PHP, Node.js, and Static HTML apps. This is ARM template URL developed by
Microsoft <o:p></o:p></p>
<p class="MsoNormal">ARM template: <a href="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-app-service-docs-windows/azuredeploy.json">https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-app-service-docs-windows/azuredeploy.json</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU_M-06zU7R5hW3MU6Nl850g3BZiN-InLgeYjhJgVkhdHczd1PfQ7g21zkRm4RX9JPHcTBc68N9OlSyg01WgMx4cMBwa8bHWem3jAxnrjDdNvaZ3h6hwIlYimHJu8QjX01K8LjvVRbctQ/s913/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="673" data-original-width="913" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU_M-06zU7R5hW3MU6Nl850g3BZiN-InLgeYjhJgVkhdHczd1PfQ7g21zkRm4RX9JPHcTBc68N9OlSyg01WgMx4cMBwa8bHWem3jAxnrjDdNvaZ3h6hwIlYimHJu8QjX01K8LjvVRbctQ/s16000/2.png" /></a></div><br /><p class="MsoNormal"><br /></p>
<p class="MsoNoSpacing" style="text-align: justify;">The above ARM templated created
and maintained by Microsoft team. These templates stored-in GitHub.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">We can use these templates and
directly deploy these with help of Azure Portal or Power Shell command.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Need to follow below steps deploy
ARM template created by Microsoft.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <a href="https://azure.microsoft.com/en-us/resources/templates/101-app-service-docs-windows">https://azure.microsoft.com/en-us/resources/templates/101-app-service-docs-windows</a><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once you open above URL need to click on <b style="mso-bidi-font-weight: normal;">Deploy to Azure</b>. It will ask you to enter
you azure portal credentials.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggnNKkAVqhKGQo8GOrOIAVdG3jOBf_NZrKjEJZSVYfn3aq8EbTXv9NdkSr8hAesd2y2HNhG2HwS7Bkn4lnMSZrvxFKbUf9ZeJCyXxRSN9YRIlPACwCHr3HcW09lTCJIBzlwxFQEfShI5Y/s775/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="395" data-original-width="775" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggnNKkAVqhKGQo8GOrOIAVdG3jOBf_NZrKjEJZSVYfn3aq8EbTXv9NdkSr8hAesd2y2HNhG2HwS7Bkn4lnMSZrvxFKbUf9ZeJCyXxRSN9YRIlPACwCHr3HcW09lTCJIBzlwxFQEfShI5Y/s16000/3.png" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Form will be filled with all information which mentioned
in ARM template like below.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span style="mso-spacerun: yes;"> </span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbD68TKMXzem16gssi8oAMPhb4BgI0_0N7qZ1rDTPIm41yyqZpIZYsgKts757ElNT9ftEkH6OXX6c2sv4NFUPcDdlDwHgxKnFMZzpfuvZlvz3TJG_1ojCQl3jVd4UDM9-h7K-Ffn3ovO0/s1212/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="716" data-original-width="1212" height="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbD68TKMXzem16gssi8oAMPhb4BgI0_0N7qZ1rDTPIm41yyqZpIZYsgKts757ElNT9ftEkH6OXX6c2sv4NFUPcDdlDwHgxKnFMZzpfuvZlvz3TJG_1ojCQl3jVd4UDM9-h7K-Ffn3ovO0/w640-h378/4.png" width="640" /></a></div><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->In above example I am using HTML hello world sample
app (Created by Microsoft) which will be deployed automatically on newly
created web app with help of ARM template.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">GitHub URL: <a href="https://github.com/Azure-Samples/html-docs-hello-world">https://github.com/Azure-Samples/html-docs-hello-world</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Once
all information filled need to click on <b style="mso-bidi-font-weight: normal;">Review
+ create</b>. It will create web app with deployed code from GitHub repository
as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzHSh_yUHIJOKw_6zwGH7lXj95fOF5NZH4U8kFPI-_Th4_Y2tdvo-5mbsbZHdqzGqjNCCOO5q83bAEaQSw4gWJVwtLsP60eJo6xDBtnQknDCCat0313v9ia3SDxEIjXkLyKvzZKLNAH_o/s1299/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="499" data-original-width="1299" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzHSh_yUHIJOKw_6zwGH7lXj95fOF5NZH4U8kFPI-_Th4_Y2tdvo-5mbsbZHdqzGqjNCCOO5q83bAEaQSw4gWJVwtLsP60eJo6xDBtnQknDCCat0313v9ia3SDxEIjXkLyKvzZKLNAH_o/w640-h246/5.png" width="640" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Deployed app URL as below<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">URL: <a href="https://webapp-akfbpxosxv7rg.azurewebsites.net/">https://webapp-akfbpxosxv7rg.azurewebsites.net/</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">GitHub Source Code URL: <a href="https://github.com/Azure-Samples/html-docs-hello-world">https://github.com/Azure-Samples/html-docs-hello-world</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioJQEFpeXVkPrEJZY6h5ZdLurasjybB-z13k_ewy2ha2Fue7tdnnr6ZifOgcL3f0PE76xkTK2ZnOvXr38Dq5D3SEhlp6fkKqJ4STMhiq6zCpI-FihaVU3zvWcZGAF6TP7oahJgFKhyphenhyphene5w/s1201/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="1201" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioJQEFpeXVkPrEJZY6h5ZdLurasjybB-z13k_ewy2ha2Fue7tdnnr6ZifOgcL3f0PE76xkTK2ZnOvXr38Dq5D3SEhlp6fkKqJ4STMhiq6zCpI-FihaVU3zvWcZGAF6TP7oahJgFKhyphenhyphene5w/w640-h240/6.png" width="640" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing">Hope it will help you to understand Infrastructure as
code (IaC) and how you can use them.<o:p></o:p></p>
<p class="MsoNoSpacing">Keep sharing keep learning. Cheers </p><p></p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com2tag:blogger.com,1999:blog-3060332739418622694.post-20269215732547256212020-10-28T22:39:00.006+05:302020-10-30T15:22:27.863+05:30ARM Templates vs Terraform in Azure<p>Two of the most popular infrastructure as code (IaC) tools to use with Azure are the native Azure Resource Manager (ARM) templates and HashiCorp Terraform. Azure users should compare ARM templates vs. the Terraform approach to decide which product is the better fit for their environment.</p><p>ARM templates are all created in one JSON file. By contrast, Terraform evaluates every resource in the directory with a .tf extension -- and will do so for every command that runs the resource, which enables IT admins to break up resources into separate files to ease parsing.</p><p>ARM templates and Terraform are both Infrastructure as Code tools for deploying cloud resources. A very high level summary of the differences is below</p><p><span style="font-size: large;">ARM Templates</span></p><p>•<span style="white-space: pre;"> </span>Azure specific</p><p>•<span style="white-space: pre;"> </span>Get the latest Azure resources as they are released</p><p>•<span style="white-space: pre;"> </span>Does not maintain a state file</p><p>•<span style="white-space: pre;"> </span>Does not have a Destroy/Cleanup command</p><p>• Written in JSON</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkTO3IlBLaGqwzsaSLR-D6J5CvvBfDlr0-oEqRhyAqlVhH8tLHKwe1VOo_oyVyrINSeZhBTGm8lBLWHeFLtszEytu9-ugYK7uAfom_i1nzUQ3k8oeIR-_GvkQ86XtAkLYqWbQTtmxefN8/s1024/Terraform_Arm6-1024x990.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="990" data-original-width="1024" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkTO3IlBLaGqwzsaSLR-D6J5CvvBfDlr0-oEqRhyAqlVhH8tLHKwe1VOo_oyVyrINSeZhBTGm8lBLWHeFLtszEytu9-ugYK7uAfom_i1nzUQ3k8oeIR-_GvkQ86XtAkLYqWbQTtmxefN8/s16000/Terraform_Arm6-1024x990.png" /></a></div><p><span style="font-size: large;">Terraform</span></p><p>•<span style="white-space: pre;"> </span>Supports multiple cloud providers and on-prem resources</p><p>•<span style="white-space: pre;"> </span>Can lag behind when new Azure resources are released</p><p>•<span style="white-space: pre;"> </span>Relies on a state file that must be maintained</p><p>•<span style="white-space: pre;"> </span>Able to cleanup/destroy resources</p><p>• Written in HCL, a custom DSL from Hashicorp</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzFfnoYV8swmifIEB2h_VX8D98125a3KQwW5IY94exYNvCO-HSGyS_UQ6wFeqY4fyW9uQyy_Z4EgOAts6RdzC4u3-BwgXYpZIn9US5Xgx17jNV0vC9ucR8UvjA6yp5Qg3XwQJjpy_ap3w/s1430/Terraform_Arm5-1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="662" data-original-width="1430" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzFfnoYV8swmifIEB2h_VX8D98125a3KQwW5IY94exYNvCO-HSGyS_UQ6wFeqY4fyW9uQyy_Z4EgOAts6RdzC4u3-BwgXYpZIn9US5Xgx17jNV0vC9ucR8UvjA6yp5Qg3XwQJjpy_ap3w/w640-h296/Terraform_Arm5-1.png" width="640" /></a></div><p>Both tools can be used to create resources in Azure, they both have positives and negatives compared to each other.</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-45031387827585255012020-10-24T11:57:00.002+05:302020-10-24T11:58:58.990+05:30Azure Cognitive Search<p><span style="text-align: justify;">Azure Search is a managed service
running in the public cloud. A development team can create a new instance of
the service, then start using it right away. The team doesn’t need to install
or manage its own search technology. Azure Search is intended to provide
developers with complex search capabilities for mobile and web development
while hiding infrastructure requirements and search algorithm complexities.
Azure Search is a recent addition to Microsoft's Infrastructure as a Service
(IaaS) approach.</span></p><p class="MsoNormal" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">Azure Search is an API based
service that provides REST APIs via protocols such as OData or integrated
libraries such as the .NET SDK. Primarily the service consists of the creation
of data indexes and search requests within the index.<o:p></o:p></p>
<h1><a name="_Toc54341086">How to use Azure search</a><o:p></o:p></h1>
<p class="MsoNormal" style="text-align: justify;">We will create a demo application
in which will use azure search and explain how it works. In demo application we
are using some of azure services<o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 41.2pt; mso-add-space: auto; mso-list: l5 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Blob Storage <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.2pt; mso-add-space: auto; mso-list: l5 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Azure Search<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 41.2pt; mso-add-space: auto; mso-list: l5 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Azure Maps<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpLast" style="margin-left: 41.2pt; mso-add-space: auto; mso-list: l5 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Web App<o:p></o:p></span></p>
<p class="MsoNormal" style="text-align: justify;">Demo application architecture will
look like as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6ymxQcQ8pDn0NximyUrGcWppQoAUabZ6Iq5kJc5wUU4pBQAhnS_f6fbYvrjucTtcCBlyQWVP46TgCA_wEmehLeKbe_s7z-lhGgr79OFQA0KY-OdZ7PyYQdMvfLabB4liPg8blggN4cbM/s872/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="803" data-original-width="872" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6ymxQcQ8pDn0NximyUrGcWppQoAUabZ6Iq5kJc5wUU4pBQAhnS_f6fbYvrjucTtcCBlyQWVP46TgCA_wEmehLeKbe_s7z-lhGgr79OFQA0KY-OdZ7PyYQdMvfLabB4liPg8blggN4cbM/s16000/1.png" /></a></div><p class="MsoNormal" style="text-align: justify;"><br /></p>
<h2><a name="_Toc54341087">Blob Storage</a> <o:p></o:p></h2>
<p class="MsoNoSpacing" style="text-align: justify;">We will use already created
storage account <b style="mso-bidi-font-weight: normal;">djblogsstorageaccount</b>
to save JSON file in blob. If you want to read more about storage account, you
can read my previous blog <span class="MsoHyperlink"><a href="https://howitworkinazure.blogspot.com/2020/09/what-is-azure-storage-account.html">What
is Azure Storage Account?</a></span><o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Need follow steps to create container
inside already created storage account.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a></span><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once we login
in portal select the <b style="mso-bidi-font-weight: normal;">djblogsstorageaccount</b>
storage account.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Add new <b style="mso-bidi-font-weight: normal;">hotelsjson</b> container inside blob
containers to save JSON files inside it.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtZ35Ni4Ew1qU5QlwSS8sN0uV-_ZcFp_HAP-yfI1jDuUuFRdU00OrU8JHnlVvg3OcopbqLQPXBYEr5MwRhSPkIWClmE4KiovIbf-XP6XIA29DeCgPVVAwXy7edBnSDSEt-n_BGSCO7v8c/s930/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="603" data-original-width="930" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtZ35Ni4Ew1qU5QlwSS8sN0uV-_ZcFp_HAP-yfI1jDuUuFRdU00OrU8JHnlVvg3OcopbqLQPXBYEr5MwRhSPkIWClmE4KiovIbf-XP6XIA29DeCgPVVAwXy7edBnSDSEt-n_BGSCO7v8c/s16000/2.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once <b style="mso-bidi-font-weight: normal;">hotelsjson </b>container
is added. Now we will upload JSON file which have all the hotel information.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9kxJA2su2aOeyDp8JKYjGruu-zgOHfWWjzaMUkw2kyNv-GHM5PdAiy1R6vRGRt-nAdJET6JlRA0V-Q70HgbNMjv46BjX6KNdI51Lkg72civEcNYuqe1hfW0h8enuXxVQebcZNxpzIxeA/s807/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="800" data-original-width="807" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9kxJA2su2aOeyDp8JKYjGruu-zgOHfWWjzaMUkw2kyNv-GHM5PdAiy1R6vRGRt-nAdJET6JlRA0V-Q70HgbNMjv46BjX6KNdI51Lkg72civEcNYuqe1hfW0h8enuXxVQebcZNxpzIxeA/s16000/3.png" /></a></div><span color="windowtext" style="text-decoration: none; text-underline: none;"><br /></span><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Now hotels
data uploaded in blob container and azure search will use it.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><br /></p>
<h2><a name="_Toc54341088">Azure Search</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">If you want to use azure search
service then first you need to create a new instance service, then start using
it right away.<o:p></o:p></p>
<h3><a name="_Toc54341089">How it works</a><o:p></o:p></h3>
<p class="MsoNormal" style="text-align: justify;">When you create a Cognitive
Search service, you get a search engine that performs indexing and query
execution, persistent storage of indexes that you create and manage, and a
query language for composing simple to complex queries. Optionally, a search
service integrates with other Azure services in the form of indexers that
automate data ingestion/retrieval from Azure data sources, and skillsets that
incorporate consumable AI from Cognitive Services, such as image and text
analysis, or custom AI that you create in Azure Machine Learning or wrap inside
Azure Functions.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH3MBMmxmYbAxKPRryyk1J_QtDudzPv3piLD5aTC3tro9FyLi3EO4peXxNKuwfSih1zEOgSoYwnOutk848iLng21cc0PKHf3GhGX3s6oL5WLsAknr_zTp1BANm6yMkD961kSkW2ces5PE/s1591/04.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="379" data-original-width="1591" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH3MBMmxmYbAxKPRryyk1J_QtDudzPv3piLD5aTC3tro9FyLi3EO4peXxNKuwfSih1zEOgSoYwnOutk848iLng21cc0PKHf3GhGX3s6oL5WLsAknr_zTp1BANm6yMkD961kSkW2ces5PE/w640-h152/04.png" width="640" /></a></div>
<p class="MsoNormal">Architecturally, a search service sits in between the
external data stores that contain your un-indexed data, and a client app that
sends query requests to a search index and handles the response. An index
schema determines the structure of searchable content.<o:p></o:p></p>
<p class="MsoNormal">The two primary workloads of a search service are indexing
and querying.<o:p></o:p></p>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpFirst" style="mso-list: l3 level1 lfo6; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Indexing brings text into to
your search service and makes it searchable. Internally, inbound text is
processed into tokens and stored in inverted indexes for fast scans. During
indexing, you have the option of adding cognitive skills, either predefined
ones from Microsoft or custom skills that you create. The subsequent analysis
and transformations can result in new information and structures that did not
previously exist, providing high utility for many search and knowledge mining
scenarios.<o:p></o:p></span></p><p class="MsoListParagraphCxSpLast" style="mso-list: l3 level1 lfo6; text-indent: -0.25in;"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once an index is populated with
searchable data, your client app sends query requests to a search service and
handles responses. All query execution is over a search index that you create,
own, and store in your service. In your client app, the search experience is
defined using APIs from Azure Cognitive Search, and can include relevance
tuning, autocomplete, synonym matching, fuzzy matching, pattern matching,
filter, and sort.<o:p></o:p></span></p></blockquote><p class="MsoListParagraphCxSpFirst" style="mso-list: l3 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]--></p>
<p class="MsoListParagraphCxSpLast" style="mso-list: l3 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]--></p>
<h3><a name="_Toc54341090">How to create Azure search service</a><o:p></o:p></h3>
<p class="MsoNormal" style="text-align: justify;">Need follow steps to create azure
search service.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a></span><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we login in portal then need to create <b style="mso-bidi-font-weight: normal;">Azure Cognitive Search</b>.</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-indent: -0.25in;"><span color="windowtext"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdjcFgDMo217BOMUxrfbjuINnU9Y1YXgENL1CP5TzvjY_6zpOIvIeqEDPJMCgaq39Bf2xDLsSDUsk5DIw7MhFd2PAg_vEmaFIlXSaE-mVkTEauNopOinbYbOcK1C08jUkj7hu-WuyO4oo/s548/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="539" data-original-width="548" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdjcFgDMo217BOMUxrfbjuINnU9Y1YXgENL1CP5TzvjY_6zpOIvIeqEDPJMCgaq39Bf2xDLsSDUsk5DIw7MhFd2PAg_vEmaFIlXSaE-mVkTEauNopOinbYbOcK1C08jUkj7hu-WuyO4oo/s16000/4.png" /></a></div><br /> <p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once we click
on create button it will open form like below</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfCfPXANuWlSHkaYbc5GURLC1ZPAv9Bg4Ya5igU_IjzUvQpwqq1VzoScG4LkcGljg_9KK1IwapGG8FKEbjg8WvRObc-wq3ekCASqeZzXSTbOSi4DowfW53B4lER15ro-0JEVZjdd5dC5s/s747/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="576" data-original-width="747" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfCfPXANuWlSHkaYbc5GURLC1ZPAv9Bg4Ya5igU_IjzUvQpwqq1VzoScG4LkcGljg_9KK1IwapGG8FKEbjg8WvRObc-wq3ekCASqeZzXSTbOSi4DowfW53B4lER15ro-0JEVZjdd5dC5s/s16000/5.png" /></a></div><br /><span color="windowtext" style="text-decoration: none; text-underline: none;"><br /></span><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">As above I am
choosing free pricing tier for demo. Once we fill all the information click on
Review + Create button it will create azure search for us. It will look like
below</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-indent: -0.25in;"><span class="MsoHyperlink"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-M3EC2hIgcLo3kuVhyphenhyphenBWQAFmbjxfgDmaxdBNoGuMDtS5T2yxPycsnnD_iJB0Jzs9EQxsaT0SlthX8Lz8UA9ZB7X0RBrufXbyyNxezjVhDoq-mU9RDrL7ehzAmgpI-a-IjyO9ZiBSGoys/s1075/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="523" data-original-width="1075" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-M3EC2hIgcLo3kuVhyphenhyphenBWQAFmbjxfgDmaxdBNoGuMDtS5T2yxPycsnnD_iJB0Jzs9EQxsaT0SlthX8Lz8UA9ZB7X0RBrufXbyyNxezjVhDoq-mU9RDrL7ehzAmgpI-a-IjyO9ZiBSGoys/s16000/6.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Azure search service created. We can consume it with help
of service URL and Keys as below.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">URL: </span></span><span class="MsoHyperlink"><span face=""Segoe UI",sans-serif" style="background: white;"><a href="https://djblogssearch.search.windows.net/" target="_blank">https://djblogssearch.search.windows.net</a></span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjugM0_D1yE9oosheDwHh3PfadpVfGfG0xG1UoZ7PF_g6sV1JcR4GH3XTy3-ZvOtbaE97_Ol0lDS0ypwX2Eja9MYwc5Z4cLZiz1poSHONHpaaTRk94w9AIJJLAH_sfkDRXyLRTiwWyZRc8/s619/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="501" data-original-width="619" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjugM0_D1yE9oosheDwHh3PfadpVfGfG0xG1UoZ7PF_g6sV1JcR4GH3XTy3-ZvOtbaE97_Ol0lDS0ypwX2Eja9MYwc5Z4cLZiz1poSHONHpaaTRk94w9AIJJLAH_sfkDRXyLRTiwWyZRc8/s16000/7.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once service instance is created then need to import data
into service instance. Azure provide multiple data provider to import data into
azure search as below. We will use azure storage where our hotels JSON stored.</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-align: justify; text-indent: -0.25in;"><span color="windowtext"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1C6ZI0-gZZejRC7iINwOtP3ckP-53oV2A-YKSVaLytQRKjrn_4fAJ9h0Vrralwy-ee8K7Zat6zmhx4yfCt6k0TSd-311aGRyWxVPTOQbrK7iTsUXjPXKWHXZh_K5gaz4-3ULHz7njEZg/s824/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="549" data-original-width="824" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1C6ZI0-gZZejRC7iINwOtP3ckP-53oV2A-YKSVaLytQRKjrn_4fAJ9h0Vrralwy-ee8K7Zat6zmhx4yfCt6k0TSd-311aGRyWxVPTOQbrK7iTsUXjPXKWHXZh_K5gaz4-3ULHz7njEZg/s16000/8.png" /></a></div><br /> <span color="windowtext"> </span><span color="windowtext"> </span><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]--><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;">Once we click
on Azure Blob Storage. It will ask to select storage account as below</span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-indent: -0.25in;"><span color="windowtext"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNLAOsawUwNBZv21pyQBw1P6UsH1dy1vUcv87-pABQQxxS1HzPbyqaNAD2a0AlAqJ9qUfQkqeqErH2ZhDf4xFUFVAmSCyYynjicaVAR0T8zy9N-IC2wGOlBfIJ-9XQzYU-wQs8WEBsZtI/s735/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="735" data-original-width="675" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNLAOsawUwNBZv21pyQBw1P6UsH1dy1vUcv87-pABQQxxS1HzPbyqaNAD2a0AlAqJ9qUfQkqeqErH2ZhDf4xFUFVAmSCyYynjicaVAR0T8zy9N-IC2wGOlBfIJ-9XQzYU-wQs8WEBsZtI/w588-h640/9.png" width="588" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";"> </span></span></span>To
get started, an application must first create one or more indexes into data.
Each index contains information that a search request can access, and it’s the
fundamental data store of Azure Search. Once an index exists, the application
can begin issuing searches against it and displaying the results. Finally, the
application must periodically update the index as the data it searches on
changes.<o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst" style="text-align: justify;"><span lang="EN-IN"> Getting
an index ready to use requires two things: <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; mso-add-space: auto; mso-list: l4 level2 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Defining the index’s schema,
including specifying the fields it contains and setting various attributes for
each field. <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; mso-add-space: auto; mso-list: l4 level2 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Populating the index by
supplying its initial set of data. Most often, this data will come from the
application’s operational database, but this isn’t required. An index can also
hold data from other sources.</span></p>
<p class="MsoListParagraphCxSpLast" style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl-DzyMdZlGxSRmmLAIcwQw6Xh7SWm4Pc3tWMAQ1ohgSJQ5g-zBUQVtTWcKjyvdWGCXqzRDH2izbO_spkh8ljsYAy5wMLDxgRmJXtYmSPDArQQXDoLuiff7Kqy0lNy75WV5EbXhTimFPM/s931/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="927" data-original-width="931" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl-DzyMdZlGxSRmmLAIcwQw6Xh7SWm4Pc3tWMAQ1ohgSJQ5g-zBUQVtTWcKjyvdWGCXqzRDH2izbO_spkh8ljsYAy5wMLDxgRmJXtYmSPDArQQXDoLuiff7Kqy0lNy75WV5EbXhTimFPM/s16000/10.png" /></a></div><span lang="EN-IN"><br /></span><p></p><p class="MsoListParagraphCxSpLast" style="text-align: justify;"><span lang="EN-IN">Field
attributes determine how a field is used, such as whether it is used in full
text search, faceted navigation, sort operations, and so forth.String fields
are often marked as "Searchable" and "Retrievable". Fields
used to narrow search results include "Sortable", "Filterable",
and "Facetable".<o:p></o:p></span></p>
<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 30.35pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184; width: 592px;">
<tbody><tr style="height: 15pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td nowrap="" style="background: rgb(191, 191, 191); border: 1pt solid windowtext; height: 15pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 61.8pt;" valign="top" width="82">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><b><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Attribute<o:p></o:p></span></b></p>
</td>
<td style="background: rgb(191, 191, 191); border-left: none; border: 1pt solid windowtext; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 382.2pt;" valign="top" width="510">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><b><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Description<o:p></o:p></span></b></p>
</td>
</tr>
<tr style="height: 45pt; mso-yfti-irow: 1;">
<td nowrap="" style="border-top: none; border: 1pt solid windowtext; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 61.8pt;" valign="top" width="82">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Searchable<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 382.2pt;" valign="top" width="510">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;"><a href="https://docs.microsoft.com/en-us/azure/search/search-lucene-query-architecture"><span style="color: black; text-decoration: none; text-underline: none;">Full-text
searchable, subject to lexical analysis such as word-breaking during indexing.
If you set a searchable field to a value like "sunny day",
internally it will be split into the individual tokens "sunny" and
"day". For details, see How full text search works.</span></a><o:p></o:p></span></p>
</td>
</tr>
<tr style="height: 60pt; mso-yfti-irow: 2;">
<td nowrap="" style="border-top: none; border: 1pt solid windowtext; height: 60pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 61.8pt;" valign="top" width="82">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Filterable<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; height: 60pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 382.2pt;" valign="top" width="510">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Referenced in $filter queries. Filterable fields of type
Edm.String or Collection(Edm.String) do not undergo word-breaking, so
comparisons are for exact matches only. For example, if you set such a field
f to "sunny day", $filter=f eq 'sunny' will find no matches, but
$filter=f eq 'sunny day' will.<o:p></o:p></span></p>
</td>
</tr>
<tr style="height: 30pt; mso-yfti-irow: 3;">
<td nowrap="" style="border-top: none; border: 1pt solid windowtext; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 61.8pt;" valign="top" width="82">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Sortable<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 382.2pt;" valign="top" width="510">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">By default the system sorts results by score, but you can
configure sort based on fields in the documents. Fields of type </span><span style="color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman";">Collection(Edm.String)</span><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">
cannot be "sortable".<o:p></o:p></span></p>
</td>
</tr>
<tr style="height: 75pt; mso-yfti-irow: 4;">
<td nowrap="" style="border-top: none; border: 1pt solid windowtext; height: 75pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 61.8pt;" valign="top" width="82">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Facetable<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; height: 75pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 382.2pt;" valign="top" width="510">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;"><a href="https://docs.microsoft.com/en-us/rest/api/searchservice/create-index"><span style="color: black; text-decoration: none; text-underline: none;">Typically used
in a presentation of search results that includes a hit count by category
(for example, hotels in a specific city). This option cannot be used with
fields of type Edm.GeographyPoint. Fields of type Edm.String that are
filterable, "sortable", or "facetable" can be at most 32
kilobytes in length. For details, see Create Index (REST API).</span></a><o:p></o:p></span></p>
</td>
</tr>
<tr style="height: 30pt; mso-yfti-irow: 5;">
<td nowrap="" style="border-top: none; border: 1pt solid windowtext; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 61.8pt;" valign="top" width="82">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Key<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 382.2pt;" valign="top" width="510">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Unique identifier for documents within the index. Exactly one
field must be chosen as the key field and it must be of type </span><span style="color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman";">Edm.String</span><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">.<o:p></o:p></span></p>
</td>
</tr>
<tr style="height: 60pt; mso-yfti-irow: 6; mso-yfti-lastrow: yes;">
<td nowrap="" style="border-top: none; border: 1pt solid windowtext; height: 60pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 61.8pt;" valign="top" width="82">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Retrievable<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; height: 60pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 382.2pt;" valign="top" width="510">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri;">Determines whether the field can be returned in a search result.
This is useful when you want to use a field (such as profit margin) as a
filter, sorting, or scoring mechanism, but do not want the field to be
visible to the end user. This attribute must be true for key fields.<o:p></o:p></span></p>
</td>
</tr>
</tbody></table>
<p class="MsoListParagraphCxSpFirst" style="text-align: justify;"><span lang="EN-IN"><br />It
will look like as below</span></p><p class="MsoListParagraphCxSpFirst" style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT7UD-C07tD2yYTd5CykcRUfw3sQsJc9fUH3TP-m30dUtIVadFw-gQuWeMSgIEy-zN1n2-VPnzeIurXUX3ycAJEPCgcWCgLiHZly_gt6KE5q5oA8f1mPdxaDYu3qkkpqY02A-EZA8J4O8/s1051/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="352" data-original-width="1051" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT7UD-C07tD2yYTd5CykcRUfw3sQsJc9fUH3TP-m30dUtIVadFw-gQuWeMSgIEy-zN1n2-VPnzeIurXUX3ycAJEPCgcWCgLiHZly_gt6KE5q5oA8f1mPdxaDYu3qkkpqY02A-EZA8J4O8/s16000/11.png" /></a></div><br /><p></p>
<p class="MsoListParagraphCxSpMiddle" style="mso-list: l4 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Now indexes created in data. We
can test within azure portal with help of Search explorer. It looks like as
below.</span></p><p class="MsoListParagraphCxSpMiddle" style="mso-list: l4 level1 lfo3; text-align: justify; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyBTi0tCY8Q2bFEzYF6dhOp8lRIORN1E0lkZble6tHhlX4uuf_pFWUXfW3uW6B27gEyTnNBFbytZloWBxcBV4-cNKX7UsVPU2np_Arlg_Kg1m-JF5yzUBxLahXmLskQi-l3-yfIsk9Y_U/s1038/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="815" data-original-width="1038" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyBTi0tCY8Q2bFEzYF6dhOp8lRIORN1E0lkZble6tHhlX4uuf_pFWUXfW3uW6B27gEyTnNBFbytZloWBxcBV4-cNKX7UsVPU2np_Arlg_Kg1m-JF5yzUBxLahXmLskQi-l3-yfIsk9Y_U/s16000/12.png" /></a></div><br /> <p></p>
<p class="MsoListParagraphCxSpMiddle" style="mso-list: l4 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">10.<span style="font: 7pt "Times New Roman";"> </span></span></span><span lang="EN-IN">Once an index has been created
and populated with data, users can begin issuing searches. Below figure shows
how the search process looks in our own web app.</span></p><p class="MsoListParagraphCxSpMiddle" style="mso-list: l4 level1 lfo3; text-align: justify; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPMDc6Wt7G8PDr3BDCmx4XMreQN4J4g3pDFunWyQ58nmxFNekgKvyehs-hP5AhWEeVbL1iLAQy71qYfVpPxxdBTAwytItU3KFkQI7gMB3PZDPVUR2bFExOyh23TivAU7_pNdP2o_7a6NQ/s1327/13.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="770" data-original-width="1327" height="371" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPMDc6Wt7G8PDr3BDCmx4XMreQN4J4g3pDFunWyQ58nmxFNekgKvyehs-hP5AhWEeVbL1iLAQy71qYfVpPxxdBTAwytItU3KFkQI7gMB3PZDPVUR2bFExOyh23TivAU7_pNdP2o_7a6NQ/w640-h371/13.png" width="640" /></a></div><p></p>
<h2><a name="_Toc54341091"><br /></a></h2><h2><a name="_Toc54341091">Azure Maps</a><o:p></o:p></h2>
<p class="MsoNoSpacing" style="text-align: justify;">Azure Maps is a collection of
geospatial services and SDKs that use fresh mapping data to provide geographic
context to web and mobile applications. <o:p></o:p></p>
<p class="MsoNoSpacing">Azure Maps provides<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo5; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->REST APIs to render vector and raster maps in
multiple styles and satellite imagery.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo5; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Creator services to create and render maps based
on private indoor map data.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo5; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Search services to locate addresses, places, and
points of interest around the world.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo5; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Various routing options; such as point-to-point,
multipoint, multipoint optimization, isochrone, electric vehicle, commercial
vehicle, traffic influenced, and matrix routing.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo5; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Traffic flow view and incidents view, for
applications that require real-time traffic information.<o:p></o:p></p>
<p class="MsoNoSpacing"><o:p> </o:p></p>
<p class="MsoNoSpacing">In this demo we will use Azure map to show the location
of hotel into map. To use maps than need to create Azure Map service with help
of azure portal.<o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">Need follow steps to create Azure
Maps.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a></span><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p> </o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Create Azure Maps</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTxZUYBMu4Q1J6C499JYMhil37d5V_oVN4rDn6m3inFNdBS9wO4D-9kgevnDjsE1NIMsTsTOYdibT488uRdC4kVnZJ4sEUyWoKdTUXLs84lPogVTKKW3MVNzZFPCwQn1zPxbkI7NayDhE/s436/14.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="436" data-original-width="415" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTxZUYBMu4Q1J6C499JYMhil37d5V_oVN4rDn6m3inFNdBS9wO4D-9kgevnDjsE1NIMsTsTOYdibT488uRdC4kVnZJ4sEUyWoKdTUXLs84lPogVTKKW3MVNzZFPCwQn1zPxbkI7NayDhE/s16000/14.png" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Click on create button it will open form that
need to be fill</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiScEKohzl1L31hW0vM4axjFD3GD8Z-2hS9kLIBBJ8Zl2WXe1-noawsl58WXACzfO6DKgK63FlcMOZ7cOgE6WYBlB_xbZhCFrwlcCmF80H2_8HZ-stoIooEB6KUeIN3Jg1dtGrx4p0YVeU/s780/15.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="694" data-original-width="780" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiScEKohzl1L31hW0vM4axjFD3GD8Z-2hS9kLIBBJ8Zl2WXe1-noawsl58WXACzfO6DKgK63FlcMOZ7cOgE6WYBlB_xbZhCFrwlcCmF80H2_8HZ-stoIooEB6KUeIN3Jg1dtGrx4p0YVeU/s16000/15.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we click on create button. it creates azure
map service for us. We consume this service with help of client key and other
keys. To show hotel in map, I have used primary key as below screen.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaKZWY0iNaweQe6X6v2K15Qm-z9qNOrjcmAtsGlE-KM7fCSYgbQvSOFx2W4reXD-RutXcDnpaPkrq62v07aa4mxoO3-Ts0amTXccO0fu_QTLdsxodDTMnjSEtFUtTObUikrk8Ndm-1vFg/s720/16.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaKZWY0iNaweQe6X6v2K15Qm-z9qNOrjcmAtsGlE-KM7fCSYgbQvSOFx2W4reXD-RutXcDnpaPkrq62v07aa4mxoO3-Ts0amTXccO0fu_QTLdsxodDTMnjSEtFUtTObUikrk8Ndm-1vFg/s16000/16.png" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><br /></p>
<h2><a name="_Toc54341092">Web App</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">Now our azure search service and
azure map ready to consume. We need to create WebApp to consume azure search
service. If you want to learn more about WebApp. Please read my previous post <span class="MsoHyperlink"><a href="https://howitworkinazure.blogspot.com/2020/05/create-web-app.html">Create
Web App</a></span><o:p></o:p></p>
<p class="MsoNormal" style="text-align: justify;">Need follow steps to create Web
App.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a></span><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p></o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p> </o:p></span></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Created <b style="mso-bidi-font-weight: normal;">djblogshotels</b>
webapp</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJP9xgBJvtuH1ilvHarN1fMt3RZEcKl4kMOkLZWCNuuWUlPDZlk5vgMS4lDki7SrLXNsImnGWT4D_Na5DOVggqUqXSzovOJQ4kQsNiXKm5quaOs2G7XFRNuS2F1dhPqGYNHy2PRhdTFfg/s1229/17.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="651" data-original-width="1229" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJP9xgBJvtuH1ilvHarN1fMt3RZEcKl4kMOkLZWCNuuWUlPDZlk5vgMS4lDki7SrLXNsImnGWT4D_Na5DOVggqUqXSzovOJQ4kQsNiXKm5quaOs2G7XFRNuS2F1dhPqGYNHy2PRhdTFfg/w640-h340/17.png" width="640" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Download web app publisher and publish .net core
MVC application from visual studio</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoMmrT7y8nEtqy1iMwDRpGVniAr723DNHY8VxxdXxAZBMqwQ9sc-byyRRQ2PP9PmLVC5yGhEzN9BRzvteGyJAcyDsAL4M5z6pVe-O-9nnOb9JChgZxWNgSkeda8pUaf8wJ5G_1p9rEInw/s1185/18.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="588" data-original-width="1185" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoMmrT7y8nEtqy1iMwDRpGVniAr723DNHY8VxxdXxAZBMqwQ9sc-byyRRQ2PP9PmLVC5yGhEzN9BRzvteGyJAcyDsAL4M5z6pVe-O-9nnOb9JChgZxWNgSkeda8pUaf8wJ5G_1p9rEInw/w640-h318/18.png" width="640" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->You can download <b style="mso-bidi-font-weight: normal;">DJBlogs.Azure.Search</b> from my GitHub repository.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">URL: <span class="MsoHyperlink"><a href="https://github.com/deepakjoshiinfo/DJBlogs.Azure.SearchMap" target="_blank">https://github.com/deepakjoshiinfo/DJBlogs.Azure.SearchMap</a></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once code is published it will look like as
below<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">URL: <span class="MsoHyperlink"><a href="https://djblogshotels.azurewebsites.net/" target="_blank">https://djblogshotels.azurewebsites.net/</a></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcc_FToy5VjvGtYlxV5nhPcHKgESLKJ4QYz1RnB21TycOA3O5pUfHi0MdPP7MoUz4RoN2xFKAQ_pE-x166Tyx6VfXPcbIYa8NPD9wWHhxlEWPP2PAvfTi3oS6Wb_DM8AjC6kKXsPMH-dk/s1139/19.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="813" data-original-width="1139" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcc_FToy5VjvGtYlxV5nhPcHKgESLKJ4QYz1RnB21TycOA3O5pUfHi0MdPP7MoUz4RoN2xFKAQ_pE-x166Tyx6VfXPcbIYa8NPD9wWHhxlEWPP2PAvfTi3oS6Wb_DM8AjC6kKXsPMH-dk/s16000/19.png" /></a></div>
<p class="MsoNoSpacing">Hope it will help you to understand azure search and map service.<o:p></o:p></p>
<p class="MsoNoSpacing">Keep sharing keep learning. Cheers<o:p></o:p></p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-17552762521376988662020-10-11T14:01:00.007+05:302020-10-22T12:07:30.739+05:30Azure Cognitive Service<p><span style="text-align: justify;">Cognitive Services are a set of
machine learning algorithms that Microsoft has developed to solve problems in
the field of Artificial Intelligence (AI). We can use these services to add AI capabilities
in our application easily to provide more value to our customer without need of
any data scientist. Cognitive Services brings AI within reach of every
developer—without requiring machine-learning expertise. All it takes is an API
call to embed the ability to see, hear, speak, search, understand and
accelerate decision-making into your apps.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDX2xTDIifWElBfwRDeBzaXlGp0yG1WMsIKrJu2EDf4bYbCOyxioz7O8SQGk_3bh1idPYmvNVa0a4BPWBzhKg8L8O-fRGeRtc_VSH9BJOdgwlHRZep9UrvnjkpXB5Lfy_p__Qa4G6KxOk/s850/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="405" data-original-width="850" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDX2xTDIifWElBfwRDeBzaXlGp0yG1WMsIKrJu2EDf4bYbCOyxioz7O8SQGk_3bh1idPYmvNVa0a4BPWBzhKg8L8O-fRGeRtc_VSH9BJOdgwlHRZep9UrvnjkpXB5Lfy_p__Qa4G6KxOk/s16000/1.png" /></a></div><span style="text-align: justify;"><br /></span><p></p>
<p class="MsoNoSpacing">The Cognitive Services APIs are grouped into five
categories.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo5; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><b>Vision</b>:
This is a Microsoft Cognitive Service to build custom image classifiers. Custom
Vision makes it easier and faster to build, deploy and improve image classifiers
with artificial intelligence and machine learning. This service features facial
analysis, handwriting recognition, optical character recognition (OCR) from
images and real-time video analyses.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo5; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><b>Speech</b>:
Through Azure’s speech cognitive services API, you can integrate speech
processing capabilities into any app or service. So, regardless of speech
style, geography or technical term, the application allows users to recognize
everything that’s spoken and transcribe the text accordingly.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo5; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><b>Language</b>:
Language and context-based meaning are two of the most important features that
define communication. Through the cognitive services language API, you can
develop apps that understand a wide variety of text.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo5; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><b>Knowledge</b>:
Azure’s cognitive services offer some of the most comprehensive and accurate
database creation and search tools available. The knowledge API can leverage or
create resources to be integrated into apps and services with several other
capabilities. For instance, a Q&A service can be used to scan vast amounts
of content and text and quickly extract the most relevant information. So, no
matter the question, you’re bound to find the answers you’re seeking.<o:p></o:p></p>
<p class="MsoNoSpacing">In this blog I will explain what <b style="mso-bidi-font-weight: normal;">Vision Cognitive Services</b> and how we can use this in our
application. I will also create demo application.</p>
<h1><a name="_Toc53314952">What is Computer Vision?</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">Computer vision is part of <b style="mso-bidi-font-weight: normal;">Vision Cognitive Services</b>. Azure's Computer
Vision service gives you access to advanced algorithms that process images and
return information based on the visual features you're interested in. For
example, Computer Vision can determine whether an image contains adult content,
find specific brands or objects, or find human faces.</p>
<p class="MsoNoSpacing" style="text-align: justify;">We will create one demo
application to understand it very well. I am using 3 azure services for this
demo. <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Computer
Vision Cognitive Services (<b style="mso-bidi-font-weight: normal;">djblogscomputervision</b>)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Storage
account (<b style="mso-bidi-font-weight: normal;">djblogsstorageaccount</b>)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Web
App (<b style="mso-bidi-font-weight: normal;">djblogsvisionapp</b>)</p>
<p class="MsoNoSpacing" style="text-align: justify;">This is the demo app diagram
which we will build step by step and will save code in my GitHub repository</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoTo3JnPa5FXVM9W-C3Ty_MizNV3ebi8tKGqqq2MHAV-kE9Se0nEb4XSHmKf6mIKbcNoR38eH6lQfNWMG3jDPKcGyCyzBXWNIJr17n5FEyvEmtrvLMS3pneOHhm-4Euz59mES8PVvGvaw/s852/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="610" data-original-width="852" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoTo3JnPa5FXVM9W-C3Ty_MizNV3ebi8tKGqqq2MHAV-kE9Se0nEb4XSHmKf6mIKbcNoR38eH6lQfNWMG3jDPKcGyCyzBXWNIJr17n5FEyvEmtrvLMS3pneOHhm-4Euz59mES8PVvGvaw/s16000/2.png" /></a></div><br /><p class="MsoNoSpacing" style="text-align: justify;"><br /></p>
<h2><a name="_Toc53314953">Computer Vision Cognitive Services</a><o:p></o:p></h2>
<p class="MsoNormal">First, we will create computer vision cognitive service
which help us to analyze the image and will give all image information as
response. Then we will show that response data in our web app.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">We need to follow below steps
to create computer vision cognitive service.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a></span><span class="MsoHyperlink"><span color="windowtext" style="text-decoration: none; text-underline: none;"><o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we login in portal then need to create Computer
Vision.</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkk5JNeagGvJ0yUHXRPDdAO6C0B-4u9e0tzqp4tHpVdirVBLalWW0tCi_tVZJM0HZcgPUoPwnKFlheei4EiwTHGSEWKBdXRN1QazWq2sDAZVF98CI3dDRs0uw_TEt08Zo8gKIiBIRIQRg/s454/3.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="198" data-original-width="454" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkk5JNeagGvJ0yUHXRPDdAO6C0B-4u9e0tzqp4tHpVdirVBLalWW0tCi_tVZJM0HZcgPUoPwnKFlheei4EiwTHGSEWKBdXRN1QazWq2sDAZVF98CI3dDRs0uw_TEt08Zo8gKIiBIRIQRg/s16000/3.png" /></a></p><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Click on create button it will open create <b style="mso-bidi-font-weight: normal;">Computer Vision</b> form. I have filled
form as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDS8ozTZaMFazmswishdA6uXnQI8drVhOrN22KAor_NKxzLq4gHVla14Z768M68sMWGtFkJFncRYAIUea7jetm86oYoC7ULXxD2-Wxuh9K8pGSXwGhQTPRbDKDPjiqpe1LsinAMUSprTE/s725/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="678" data-original-width="725" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDS8ozTZaMFazmswishdA6uXnQI8drVhOrN22KAor_NKxzLq4gHVla14Z768M68sMWGtFkJFncRYAIUea7jetm86oYoC7ULXxD2-Wxuh9K8pGSXwGhQTPRbDKDPjiqpe1LsinAMUSprTE/s16000/4.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->I have selected free pricing tier for this demo
project. In free tier we can do only 20 API calls per minute. You can choose pricing
tier based on your requirement but for demo project you can select free tier.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Filled form as above then just click on <b style="mso-bidi-font-weight: normal;">Create.</b> It will create <b style="mso-bidi-font-weight: normal;">Computer Vision </b>endpoint and Keys which
help us to consume the <b style="mso-bidi-font-weight: normal;">Computer Vision </b>API<b style="mso-bidi-font-weight: normal;">.</b></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt0omG8u2dWkCWClqA4u66e6eC_sgZrQmFpcN-hlksLHR3mJvaGNqbJ76scXbQdOZE8Z5GcRzerpzxOMg3ZIkaJMm0Cry5d622PQOGcJ2McpkuwCEkyIgrey-XupgM_7knViqgpG1ELDY/s909/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="534" data-original-width="909" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt0omG8u2dWkCWClqA4u66e6eC_sgZrQmFpcN-hlksLHR3mJvaGNqbJ76scXbQdOZE8Z5GcRzerpzxOMg3ZIkaJMm0Cry5d622PQOGcJ2McpkuwCEkyIgrey-XupgM_7knViqgpG1ELDY/s16000/5.png" /></a></div><b style="mso-bidi-font-weight: normal;"><br /></b><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->You can see in above screen got both API
endpoint and keys. We will use then to call <b style="mso-bidi-font-weight: normal;">Computer Vision </b>API<b style="mso-bidi-font-weight: normal;"> </b>from
WebApp to analyze the image.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b style="mso-bidi-font-weight: normal;">API Endpoint</b>: <span style="mso-spacerun: yes;"> </span><a href="https://djblogscomputervision.cognitiveservices.azure.com/" target="_blank">https://djblogscomputervision.cognitiveservices.azure.com</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b style="mso-bidi-font-weight: normal;">2 Keys</b>: Confidential information<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Now our <b style="mso-bidi-font-weight: normal;">Computer Vision </b>API ready to consume. We will consume it from
<b>WebApp</b>.</p>
<h2><a name="_Toc53314954">Storage account</a><o:p></o:p></h2>
<p class="MsoNoSpacing" style="text-align: justify;">We will use Storage account as
database to save uploaded images from our WebApp. I am using storage account <b style="mso-bidi-font-weight: normal;">djblogsstorageaccount</b> to save images.
If you want to learn more about please take a look into this <a href="https://howitworkinazure.blogspot.com/2020/09/what-is-azure-storage-account.html" target="_blank">Whatis Azure Storage Account</a>.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">I am using already created
storage account <b style="mso-bidi-font-weight: normal;">djblogsstorageaccount</b>
to save images in blob. Need follow steps to create block inside storage account.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we login in portal you need to select the <b style="mso-bidi-font-weight: normal;">djblogsstorageaccount </b>storage account.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIX8VBW_mxe-AlhrToDDQboYXZZ0gnNb0-hajxbI9cmhVCpQ9EJX2XPyHHCABv2O6mOgwl15a7crrNmKlHGdGLrdDzkRDmzds1mFu1naDbJ4y0zamM8DZoE1bW0_gTudlYCPzMHW8QDO0/s1038/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="1038" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIX8VBW_mxe-AlhrToDDQboYXZZ0gnNb0-hajxbI9cmhVCpQ9EJX2XPyHHCABv2O6mOgwl15a7crrNmKlHGdGLrdDzkRDmzds1mFu1naDbJ4y0zamM8DZoE1bW0_gTudlYCPzMHW8QDO0/s16000/6.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Now we add new <b style="mso-bidi-font-weight: normal;">images</b> container inside blob containers to save images inside it.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJyt1nJO_v1wFv7ow_wP8MKX63q8CkEEiL7Bk0cPuRZJbWpZr_7Ev0S5RbGGBx-xjxiCIa0vjyk_RtHt1htG7xAPsih4GDAAa6PZ1X0qTcGCFZv4pLhNwJRYEJ51z2sfJxopV8x8iWQ_w/s792/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="554" data-original-width="792" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJyt1nJO_v1wFv7ow_wP8MKX63q8CkEEiL7Bk0cPuRZJbWpZr_7Ev0S5RbGGBx-xjxiCIa0vjyk_RtHt1htG7xAPsih4GDAAa6PZ1X0qTcGCFZv4pLhNwJRYEJ51z2sfJxopV8x8iWQ_w/s16000/7.png" /></a></div>
<p class="MsoNoSpacing" style="text-align: justify;"><o:p> Now our <b>Blob </b>storage container ready for use.</o:p></p>
<h2><a name="_Toc53314955">Web App</a><o:p></o:p></h2>
<p class="MsoNoSpacing" style="text-align: justify;">As you know, we will create
<b>WebApp </b>that will consume <b style="mso-bidi-font-weight: normal;">Computer Vision
</b>API. I had explained it in previous blog. How we can create <b>WebApp</b>. If you
want to learn it in detail, please take a look into <a href="https://howitworkinazure.blogspot.com/2020/05/create-web-app.html" target="_blank">CreateWeb App</a>.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Creating WebApp for upload
image and display image information. Follow below steps to create it. <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span class="MsoHyperlink"><span color="windowtext" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-decoration: none; text-underline: none;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span></span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we login in portal then need to create <b>WebApp</b>.
It will open below form as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEfP23WbG3Xe1O09INZ-YD3H-d3NqTtnyye12lmm9LiCd_XxeASNv8ysE6-4gS7uvEVmbgbddS4fW0EyuAhNHz-51DxOHDMPz6bCogcxI1j61pFnA4Qtu7ezFT_FOKKyODibOWdB5C8FM/s680/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="680" data-original-width="659" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEfP23WbG3Xe1O09INZ-YD3H-d3NqTtnyye12lmm9LiCd_XxeASNv8ysE6-4gS7uvEVmbgbddS4fW0EyuAhNHz-51DxOHDMPz6bCogcxI1j61pFnA4Qtu7ezFT_FOKKyODibOWdB5C8FM/s16000/8.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we click on <b style="mso-bidi-font-weight: normal;">Create</b>, it will create <b>WebApp</b>. Then we will download <b>WebApp </b>publisher
from azure portal and publish directly from visual studio.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrJCm9DqDf8gguaWHVIfKNaLcbC0iywDo1CE864EWMg3xd2pi2Rhi46zBbcnN31R-CqWeye4Wg43w4Mk8ceFtpdtzu4HcM73ark8NNtRNa6V82L8cEL5od0OsGoowW7R94cRzV23d6ZYo/s1245/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="497" data-original-width="1245" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrJCm9DqDf8gguaWHVIfKNaLcbC0iywDo1CE864EWMg3xd2pi2Rhi46zBbcnN31R-CqWeye4Wg43w4Mk8ceFtpdtzu4HcM73ark8NNtRNa6V82L8cEL5od0OsGoowW7R94cRzV23d6ZYo/w640-h256/9.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo3; text-align: justify; text-indent: -0.25in;"><span style="text-align: left; text-indent: 0px;">WebApp URL: </span><a href="https://djblogsvisionapp.azurewebsites.net/" style="text-align: left; text-indent: 0px;">https://djblogsvisionapp.azurewebsites.net</a></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->We
will create .net core MVC application which will use both <b style="mso-bidi-font-weight: normal;">Storage Account</b> and <b style="mso-bidi-font-weight: normal;">Computer
Vision. </b>We will store this information in<b style="mso-bidi-font-weight: normal;"> WebApp </b>configuration <b style="mso-bidi-font-weight: normal;">Application
settings</b> section. It will look like as below in azure portal.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX6A-Bl1BsuNSq7YbZM7gz9GDkauHigKUAJu8vKh4P_7AuOchyilO8Eka3F48ery_tLfO_YrqEiBDnZH7sbEzq-EYzEvbrdWvDxCQ4jg7W4uc3Sc0WeVjDBTI55YN0dBWU8c_yAy19RwA/s801/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="548" data-original-width="801" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX6A-Bl1BsuNSq7YbZM7gz9GDkauHigKUAJu8vKh4P_7AuOchyilO8Eka3F48ery_tLfO_YrqEiBDnZH7sbEzq-EYzEvbrdWvDxCQ4jg7W4uc3Sc0WeVjDBTI55YN0dBWU8c_yAy19RwA/s16000/10.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->These <b style="mso-bidi-font-weight: normal;">Application
settings</b> consumed as <b style="mso-bidi-font-weight: normal;">Environment
Variable</b> in our C# code.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6W0LmK7MxeDSW4C5lBvReSRWaUnc1oixR8XXk0s_3fk_yEUw3F22QPdfCWGbi1GL22V39dOSoackumvu8G8AXYCBXmkR8RK8APwGtOfy5nO9DhOW8llJeSOEojYXngM56pdA46qUd3ec/s981/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="226" data-original-width="981" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6W0LmK7MxeDSW4C5lBvReSRWaUnc1oixR8XXk0s_3fk_yEUw3F22QPdfCWGbi1GL22V39dOSoackumvu8G8AXYCBXmkR8RK8APwGtOfy5nO9DhOW8llJeSOEojYXngM56pdA46qUd3ec/s16000/11.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->In our code, I have created 3 projects inside
one solution<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l3 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->DJBlogs.ComputerVision
(C# class library for Computer Vision API)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l3 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->ComputerVision
(Console Application to test class library)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l3 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">c.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->WebApp
(MVC .NET core application) <span style="mso-spacerun: yes;"> </span><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">I have used <b>Microsoft.Azure.CognitiveServices.Vision.ComputerVision</b> NuGet package to call vision API.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjilQmQ7EnvXyfCqvCTreaenKGF8hwG_3jiBYcW5xTEimOnYG-gY7IKvOeKTwHSkf5Z57_vWbpTJZsVZO8olIb6L-UzCb0IJTnkwJ4B4km-pSgUyBriOjnyBhN6n9SuN_uo-bAtJaTAEl0/s354/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="354" data-original-width="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjilQmQ7EnvXyfCqvCTreaenKGF8hwG_3jiBYcW5xTEimOnYG-gY7IKvOeKTwHSkf5Z57_vWbpTJZsVZO8olIb6L-UzCb0IJTnkwJ4B4km-pSgUyBriOjnyBhN6n9SuN_uo-bAtJaTAEl0/s16000/12.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">GitHub Code: <a href="https://github.com/deepakjoshiinfo/DJBlogs.ComputerVision.App" target="_blank">https://github.com/deepakjoshiinfo/DJBlogs.ComputerVision.App</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">You can download code from <b>GitHub</b>.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once all set we will publish our code in Azure <b>WebApp
</b>with help of publisher profile as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtPjDsHJZeW7fOY-HrWHzLvyk1n8gO-JL-RLvrCWEoViutI5KmXhn-4wQXO0JJ8XB0zS6cJ_nlmWdgXBTv1TpQl1Fj8empjYpUaHhgMEwFxLOIUkbJ9pjfsgvOhkqkgs01Uw1U-y54vBw/s1053/13.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="462" data-original-width="1053" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtPjDsHJZeW7fOY-HrWHzLvyk1n8gO-JL-RLvrCWEoViutI5KmXhn-4wQXO0JJ8XB0zS6cJ_nlmWdgXBTv1TpQl1Fj8empjYpUaHhgMEwFxLOIUkbJ9pjfsgvOhkqkgs01Uw1U-y54vBw/s16000/13.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">Application URL: <a href="https://djblogsvisionapp.azurewebsites.net/" target="_blank">https://djblogsvisionapp.azurewebsites.net/</a></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once application deployed on azure you will see
all the images stored in <b style="mso-bidi-font-weight: normal;">Blob Storage</b>
account</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmnzJDZWfQrRMF7btpIYiUdAA_iAwXPnJ88TNVVzXKfW7HHuYX27CjcEoEAnEEzcXRx2ytyT9mYfGcBJO54Ferp_mefYUtXajnp1qmczVf2K5CXCH3E84ds80ekhdYeR_vogtvQXvrDDQ/s630/14.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="382" data-original-width="630" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmnzJDZWfQrRMF7btpIYiUdAA_iAwXPnJ88TNVVzXKfW7HHuYX27CjcEoEAnEEzcXRx2ytyT9mYfGcBJO54Ferp_mefYUtXajnp1qmczVf2K5CXCH3E84ds80ekhdYeR_vogtvQXvrDDQ/s16000/14.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->If
you want to upload new image you need to click on Upload link. You need to choose
the image from your local machine</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpH04SrjELLFQjb2AIo6domVJkBSw935K23xZJkTpAfj2JRbd3-A0L5SUEEZpNc39-dgltIdSwgih8GU5MluiW55SQtXm_eD-Ydiw_z3nRyb1P1RwkE5TDJ1XFcqMaDZNQ1_EnaYJuFjQ/s649/15.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="649" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpH04SrjELLFQjb2AIo6domVJkBSw935K23xZJkTpAfj2JRbd3-A0L5SUEEZpNc39-dgltIdSwgih8GU5MluiW55SQtXm_eD-Ydiw_z3nRyb1P1RwkE5TDJ1XFcqMaDZNQ1_EnaYJuFjQ/s16000/15.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once you click on upload button it will uploaded
in blob storage. If you want to see image all information you need to click on image.</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRypcaBPvMlXnhKp8tcOgvw0gXBFMyIe8SeWnO5EYaQNncsM0iCKYBwXJZtGYuKMgcnc3b5JRhIy200BfUokjsdTyjhkO92nK69QfS1q5C1n_gPaw9fz7H0ltANWPVX-g0HSLN1JN71Xc/s604/16.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="358" data-original-width="604" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRypcaBPvMlXnhKp8tcOgvw0gXBFMyIe8SeWnO5EYaQNncsM0iCKYBwXJZtGYuKMgcnc3b5JRhIy200BfUokjsdTyjhkO92nK69QfS1q5C1n_gPaw9fz7H0ltANWPVX-g0HSLN1JN71Xc/s16000/16.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";"> </span></span></span>When we click on man image it will show all information as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU2zkJDMGApqWb9aADOpJgjR2E7qQ7n9ljBrnrSvFHcCmLW8f0F7BU6HxO_TjmhgCYuvFCkbhPhmsv4sOLb63RGwmlUWSPOmEb6guUgeiEOwZaO86tfN2_FNkTMuk99KDP4Q1AXpotKNI/s1139/17.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="619" data-original-width="1139" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU2zkJDMGApqWb9aADOpJgjR2E7qQ7n9ljBrnrSvFHcCmLW8f0F7BU6HxO_TjmhgCYuvFCkbhPhmsv4sOLb63RGwmlUWSPOmEb6guUgeiEOwZaO86tfN2_FNkTMuk99KDP4Q1AXpotKNI/s16000/17.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">You can try it by uploading
your images which you want to analyze.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">URL: <a href="https://djblogsvisionapp.azurewebsites.net/" target="_blank">https://djblogsvisionapp.azurewebsites.net/</a></p>
<p class="MsoNoSpacing" style="text-align: justify;">Hope you have got little idea
about Azure Cognitive Services. This demo application helps you to understand
computer vision services developed by Microsoft for image analysis. <span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></p>
<p class="MsoNoSpacing" style="text-align: justify;">Keep learning, keep sharing. Cheers</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com1tag:blogger.com,1999:blog-3060332739418622694.post-91260355044865077362020-09-27T13:22:00.021+05:302020-09-30T17:26:52.099+05:30What is azure web job?<p><span style="text-align: justify;">WebJob is a feature of </span><b style="text-align: justify;">Azure App Service</b><span style="text-align: justify;"> that enables you to
run a program or script in the same instance as a web app, API app, or mobile
app. There is no additional cost to use WebJob. WebJob is part of web app both
will use same computing resources to execute.</span></p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;"><b style="mso-bidi-font-weight: normal;">App Service</b> is the managed computing platform that Azure Web Apps
runs on! So Azure Web App is one type of “App” that runs on App Service. For
example, there are Web Apps, Web API, Logic Apps, Web Job, Mobile Apps and
Azure Function Apps etc.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqpLZM0aQA8tM5NTALAO9VD284HHewbskYBEjfomPbEJw82c_M6K9Aqf2z6YDOpGvLfOH_llbHfjrVHbrNmog34b0ZWOwTUCwchqGqOfn1bEn2XBlcaxCIDTyrKW2d_hc-mgc1QwkpszU/s557/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="289" data-original-width="557" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqpLZM0aQA8tM5NTALAO9VD284HHewbskYBEjfomPbEJw82c_M6K9Aqf2z6YDOpGvLfOH_llbHfjrVHbrNmog34b0ZWOwTUCwchqGqOfn1bEn2XBlcaxCIDTyrKW2d_hc-mgc1QwkpszU/s16000/1.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="text-align: justify;">These “Apps” all have one
thing in common i.e. they all do some kind of “compute work” without the
developer worrying or managing infrastructure.</p>
<h1><a name="_Toc52101123">Why need WebJobs?</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">The purpose of the web job is
to simplify the code and to perform the background jobs like window scheduler
task, time taking process with help of queue (Storage Account), common tasks, such as image processing, file
maintenance, and sending mails. The web job SDK has a great in-built feature
for working with Azure storage and Service bus.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">In below example in our To-do
App (Web App) we need to update the to-do task status if due date passed. In
this case our WebJob will run in background and it will check if Today date
greater than due date it will update the record status as “Pending” in to-do
database. Our WebJob will do all the time taking task in background and it will
get task information from Queue in Storage Account (djblogsstorageaccount). We
will create “tasks” queue in “djblogsstorageaccount” storage account.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnE3JE5nl-cdXRQ-5QEKdD_f-TFTUnRjBJAiOcLPN59AH6zB9uTaKF3_xDnF044tGEiZB4OYmUUBsWdKT5sdrogSRRXHi4XTWLxA6zU_M2AifFMIEsGR3XiYEOluzKzpplrz_WZmb2eaI/s510/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="387" data-original-width="510" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnE3JE5nl-cdXRQ-5QEKdD_f-TFTUnRjBJAiOcLPN59AH6zB9uTaKF3_xDnF044tGEiZB4OYmUUBsWdKT5sdrogSRRXHi4XTWLxA6zU_M2AifFMIEsGR3XiYEOluzKzpplrz_WZmb2eaI/s16000/2.png" /></a></div>
<h1><a name="_Toc52101124">How to create WebJobs?</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">First we will create <b>WebApp </b>then add <b>WebJob </b>into it. As I told before <b>WebJob </b>is part of <b>WebApp</b>. First we need to create <b>WebApp </b>and after that same publisher profile we will use to deploy "WebJob". We need to follow below steps to publish <b>WebJob </b>with help of <b>WebApp </b>publisher profile.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/">https://portal.azure.com</a></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we login in portal then need to create new
web app for to-do application.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiGDCJvCCLPEllAeHrgGa_bcVVPko9_VOrMQaL_b3H4NFy78fkSHmej9eDeq1kxpQOPfFxRKFUtnk8DN3056aDJqYb8P2NHFIhWOl559oLzeG38cucDbCuFNdiNPGUnbv6WHhneH-Y_gU/s676/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="676" data-original-width="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiGDCJvCCLPEllAeHrgGa_bcVVPko9_VOrMQaL_b3H4NFy78fkSHmej9eDeq1kxpQOPfFxRKFUtnk8DN3056aDJqYb8P2NHFIhWOl559oLzeG38cucDbCuFNdiNPGUnbv6WHhneH-Y_gU/s16000/3.png" /></a></div>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN">After filling all this
information our web app ready for publish. Our To-do web app url will be</span></p><p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN">URL: <span class="MsoHyperlink"><a href="https://djblogstodo.azurewebsites.net/" target="_blank">https://djblogstodo.azurewebsites.net/</a></span></span></p></blockquote>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">For more information how to
create web app in azure. Please read my previous blog <a href="https://blogs.deepakjoshi.info/2020/05/create-web-app.html" target="_blank">Create WebApp</a></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once webapp created in azure now I will publish our
“To-Do” application from my visual studio with help of webapp publisher as
below<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicFHrnvWbvJtSM7tpDcjuPiTsM95-SzF67xZ0xLG_51PY8DqU_aLgsf7_inipKKy3QNF018KxNfJP_sL2D48hn2kGWg8myR6X8EwbcjaS4nWoDC2ehgVUolythyphenhyphenG2bSjfhEcP7wApK-eA/s1092/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="593" data-original-width="1092" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicFHrnvWbvJtSM7tpDcjuPiTsM95-SzF67xZ0xLG_51PY8DqU_aLgsf7_inipKKy3QNF018KxNfJP_sL2D48hn2kGWg8myR6X8EwbcjaS4nWoDC2ehgVUolythyphenhyphenG2bSjfhEcP7wApK-eA/w640-h348/4.png" width="640" /></a></div><br /><p></p>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoListParagraphCxSpFirst"><span lang="EN-IN"> This application URL will
be<span style="mso-spacerun: yes;"> </span><span class="MsoHyperlink"><a href="https://djblogstodo.azurewebsites.net/" target="_blank">https://djblogstodo.azurewebsites.net/</a><o:p></o:p></span></span></p><p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"> GitHub Code Repository: <a href="https://github.com/deepakjoshi-info/Azure-DJBlogToDo" target="_blank">https://github.com/deepakjoshi-info/Azure-DJBlogToDo</a></span></p></blockquote>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">This is the screenshot of the
application</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iASR1dDhlRelYb_ZE7Gek0qO4_L8wQ5CQRNqkKbUtgoSel3IkgjjcSBwMDbb_nSAlWBRU_lJ3ttSRkeNulUsnmKo0S0VMMnX2WLzNNlHYYJy57p6KlMGF_p4Frd-KHpa51Z89ZeuO-Q/s919/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="353" data-original-width="919" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iASR1dDhlRelYb_ZE7Gek0qO4_L8wQ5CQRNqkKbUtgoSel3IkgjjcSBwMDbb_nSAlWBRU_lJ3ttSRkeNulUsnmKo0S0VMMnX2WLzNNlHYYJy57p6KlMGF_p4Frd-KHpa51Z89ZeuO-Q/s16000/5.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"></span></span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]--><span lang="EN-IN">Now our webapp created, we can directly add <b>WebJob </b>from azure portal
and select our <b>WebJob </b>program file like below screenshot</span><o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr2F75KMoM8ZuuNdCkqFlKAuiwq6-6BPis_RboeFsMj-xRm8g3MSGDho5JyBYdAstb_0aQhvArIb7Y5XDUcq2xlPbBnYi0K3fort49O0LtH5_KQRrj5NhT4VjMnDMrWqd-xlYw2cU6vHA/s1066/23.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="580" data-original-width="1066" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr2F75KMoM8ZuuNdCkqFlKAuiwq6-6BPis_RboeFsMj-xRm8g3MSGDho5JyBYdAstb_0aQhvArIb7Y5XDUcq2xlPbBnYi0K3fort49O0LtH5_KQRrj5NhT4VjMnDMrWqd-xlYw2cU6vHA/w640-h348/23.PNG" width="640" /></a></div><br /><p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";"> </span><span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> We can also directly publish </span><span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; line-height: normal;"><b>WebJob </b></span><span style="font-family: "Times New Roman"; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">from </span></span></span>visual
studio 2019 with help of <b>WebApp </b>publisher. Open visual studio 2019 and create “WebJob” project</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHE5WZfpOPwZrIXvs-KGzrV6QQgNF5HvPHILnAlegtcpoJERn80UM8OlQimCzUGUhRbpCpXMC6OSzhuOrdPvwgJRw20nloTEU9cTALeCXGiaN0fd1H2dCZbx0L_2r0jtYd_knP0l1YEcQ/s1288/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="329" data-original-width="1288" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHE5WZfpOPwZrIXvs-KGzrV6QQgNF5HvPHILnAlegtcpoJERn80UM8OlQimCzUGUhRbpCpXMC6OSzhuOrdPvwgJRw20nloTEU9cTALeCXGiaN0fd1H2dCZbx0L_2r0jtYd_knP0l1YEcQ/w640-h163/6.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Click on next button and given the project name
to <b>WebJobs</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjjoyqapWOvXO9cj3MkMU6QYEYzjOdngKx8bv50X07LMCRxyvn8PNNqwaTtokZLeu_-XTVZobNCe5xA8HhRtF6i444dWH3KGRyQ35epLnhxiLh_HXlqzK-JVcqRawOqFfV_FmDEySGFhw/s828/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="559" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjjoyqapWOvXO9cj3MkMU6QYEYzjOdngKx8bv50X07LMCRxyvn8PNNqwaTtokZLeu_-XTVZobNCe5xA8HhRtF6i444dWH3KGRyQ35epLnhxiLh_HXlqzK-JVcqRawOqFfV_FmDEySGFhw/s16000/7.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><b>WebJob
</b>will start from “Main” method. Where we will create “JobHost” instance and call
the method “ProcessContinuouslyMethod”.</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"> <b>GitHub</b>: <a href="https://github.com/deepakjoshi-info/Azure-WebJobs/blob/master/WebJobs/Program.cs" target="_blank">https://github.com/deepakjoshi-info/Azure-WebJobs/blob/master/WebJobs/Program.cs</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRBt1v1jHNOzusQPLFmCAn-8Gj8SK_3HIjhyOXZIToYVOX6OAx0yhKrJJeDoXQSWbtqvFJ6bDA2hyphenhyphengNmwSIABPRMVRYioAEOfSwbPXWlJIQANYSUYDuwKJN_pMIo3P3V9pyvfFoLmX3VY/s828/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="408" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRBt1v1jHNOzusQPLFmCAn-8Gj8SK_3HIjhyOXZIToYVOX6OAx0yhKrJJeDoXQSWbtqvFJ6bDA2hyphenhyphengNmwSIABPRMVRYioAEOfSwbPXWlJIQANYSUYDuwKJN_pMIo3P3V9pyvfFoLmX3VY/s16000/8.png" /></a></div><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->We will create one method inside <b style="mso-bidi-font-weight: normal;">WebJobs</b> project for update the task
status. If task is active for past date it will just update it as “Pending” in
SQL database.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b style="mso-bidi-font-weight: normal;">ProcessContinuouslyMethod</b>: Other WebJob method will continually run
daily. You can change it based on your requirement. We need to call this method
directly from “JobHost”.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-indent: 0.5in;">host. CallAsync(typeof (Functions).GetMethod("ProcessContinuouslyMethod"));<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-indent: 0.5in;"><b style="text-align: justify; text-indent: -24px;">GitHub</b><span style="text-align: justify; text-indent: -24px;">: </span><a href="https://github.com/deepakjoshi-info/Azure-WebJobs/blob/master/WebJobs/Functions.cs" style="text-align: justify; text-indent: -24px;" target="_blank">https://github.com/deepakjoshi-info/Azure-WebJobs/blob/master/WebJobs/Functions.cs</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRnCPtLLR_4gcVCyHTWV4SmvGB0pkLbeRxINebJS9sIDEop6HHx-vd7esnSsxYvQsGja15wLjOInbA9uA6pT2vr0P3im-twCBfk3eqB6sj2zZYc71VTo5UhUjDEo9v80BOqXcqLUD0xJc/s1008/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1008" data-original-width="770" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRnCPtLLR_4gcVCyHTWV4SmvGB0pkLbeRxINebJS9sIDEop6HHx-vd7esnSsxYvQsGja15wLjOInbA9uA6pT2vr0P3im-twCBfk3eqB6sj2zZYc71VTo5UhUjDEo9v80BOqXcqLUD0xJc/s16000/9.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->It is very hard to diagnose <b>WebJobs </b>and Asynchronous
jobs because very nature of execution. To diagnose the execution of Jobs we
need to enable logging. WebJob needs two Azure storage account connection
strings to be configured<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><b style="mso-bidi-font-weight: normal;">AzureWebJobsDashboard: </b>This storage
account is primarily used by Azure WebJob SDK to store logs from the WebJobs
Dashboard. This connection string is optional and is required only if you are
planning to use the dashboard for monitoring WebJobs.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; text-align: justify;">The WebJob
runtime creates two containers under this storage account with the names
‘azure-webjobs-dashboard’ and ‘azure-jobs-host-archive’. The
azure-webJobs-dashboard container is used by the WebJob dashboard to store host
and execution endpoint (function) details. Azure-jobs-host-archive is used as
an archive for execution logs.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; text-align: justify;"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><b style="mso-bidi-font-weight: normal;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";">
</span></span></span></b><!--[endif]--><b style="mso-bidi-font-weight: normal;">AzureWebJobsStorage:
</b>AzureWebJobsStorage should point to a storage account which will be
primarily used for logging. WebJob runtime creates two containers in this
storage account with the names ‘azure-jobs-host-output’ and
‘azure-webjobs-host’. If you point AzureWebJobsDashboard and
AzureWebJobsStorage at two different storage accounts, you will notice that
these two containers are duplicated in both the storage accounts.<b style="mso-bidi-font-weight: normal;"><o:p></o:p></b></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;">We can use only
one storage account for both the purpose. We are added our storage account into
app.config file. <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p>You can see these storage account with help of Microsoft Azure Storage. It will look like as below</o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIRmFvlY4Bk_XEYpvVReCEKKqcPRUM_c_WJ9sOOddcwNZDOE_NYPjT_HAgBnO-0iS6qf1LoaVf88a3Tl7QTDGnF22feM0zbigRL9l_B9eJuW9gpxvth9sZldr35qgWC5vs_9NJB6x2iUY/s742/24.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="370" data-original-width="742" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIRmFvlY4Bk_XEYpvVReCEKKqcPRUM_c_WJ9sOOddcwNZDOE_NYPjT_HAgBnO-0iS6qf1LoaVf88a3Tl7QTDGnF22feM0zbigRL9l_B9eJuW9gpxvth9sZldr35qgWC5vs_9NJB6x2iUY/s16000/24.PNG" /></a></div><o:p><br /></o:p><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">10.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->We need to add three connection strings in “app.config”.
Two for storage account and one for SQL database as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTQklGKw2zR-NmE5kh2QrwAk5redVn1kPSzVJEZxQUIUVw8y2WQRxtSk0q-8Ngu1BIWwsOY6K-2C4rwahityrtNjantbkgEgy8K-kuGAku0tZ9jWQDh7CP7LQafX1cnuMTsXwFLwSEPKQ/s794/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="143" data-original-width="794" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTQklGKw2zR-NmE5kh2QrwAk5redVn1kPSzVJEZxQUIUVw8y2WQRxtSk0q-8Ngu1BIWwsOY6K-2C4rwahityrtNjantbkgEgy8K-kuGAku0tZ9jWQDh7CP7LQafX1cnuMTsXwFLwSEPKQ/s16000/10.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">11.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->We will use same publisher profile for “WebJob”
which we have used to publish “djblogstodo” web app as below.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKqo9OO1s-FIkjQ-mDgG9Ae_u-Tq6inrGCPhrNMhdXdVuQfgNT4Vw3vOmVzMGV7a9msTOJai4JtyYVhSjVLkDm-05RHNZ395fRUv97YDJvQom6bIjOwaFik8ZUGXeJWW9P1rN8xnAkN6g/s1104/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="565" data-original-width="1104" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKqo9OO1s-FIkjQ-mDgG9Ae_u-Tq6inrGCPhrNMhdXdVuQfgNT4Vw3vOmVzMGV7a9msTOJai4JtyYVhSjVLkDm-05RHNZ395fRUv97YDJvQom6bIjOwaFik8ZUGXeJWW9P1rN8xnAkN6g/s16000/11.png" /></a></div><br /><p></p>
<blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p class="MsoListParagraph" style="text-align: left;"><span lang="EN-IN">GitHub Code Repository: <a href="https://github.com/deepakjoshi-info/Azure-WebJobs" target="_blank">https://github.com/deepakjoshi-info/Azure-WebJobs</a></span></p></blockquote>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">12.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once web job published in azure. You can see the <b>WebJobs </b>under web app in azure portal as below<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3GoxNlpEoyiHBUckVWuhTn9pWAwsJhs1MmyF0ot4IAjdRX8m1QCnojvoHlWXBfNjr3gQAMFadYkpx6MnVMvp7XfMaKjeCwBAyEli1P6W66bSZF3H8UdAedAfGBL7Jjs_X9Be_nffPuME/s988/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="458" data-original-width="988" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3GoxNlpEoyiHBUckVWuhTn9pWAwsJhs1MmyF0ot4IAjdRX8m1QCnojvoHlWXBfNjr3gQAMFadYkpx6MnVMvp7XfMaKjeCwBAyEli1P6W66bSZF3H8UdAedAfGBL7Jjs_X9Be_nffPuME/w640-h297/12.png" width="640" /></a></div><div><br /></div> <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; text-indent: -24px;"><span style="mso-list: Ignore;">13.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]--><span style="text-indent: -24px;">We can see the <b>WebJob </b>Logs in azure portal. It will look like as below</span><div><span style="text-indent: -24px;"> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0_wQ6iv2Iq9EPzt-oAK_NCEQD1Ds5_N2IbVb5LXIPJC_ITZ-OlG_gY6bUp6NLMgskF3UNF-R3U6mCFPCB0AuvTc9GSvdabd0zTIuAf2w09zLoIVY1GUOIMYICKUfgPC4KFZAR3ZL7dxY/s1134/25.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="456" data-original-width="1134" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0_wQ6iv2Iq9EPzt-oAK_NCEQD1Ds5_N2IbVb5LXIPJC_ITZ-OlG_gY6bUp6NLMgskF3UNF-R3U6mCFPCB0AuvTc9GSvdabd0zTIuAf2w09zLoIVY1GUOIMYICKUfgPC4KFZAR3ZL7dxY/s16000/25.PNG" /></a></div></span><br /><p></p>
<p class="MsoNormal">You can test the application by creating new task and set the date or just update the pending status task. if date passed it will make that task as pending. Currently I have set time interval for task scheduler is 1 sec. It will update every 1 second. </p><p class="MsoNormal">URL: <a href="https://djblogstodo.azurewebsites.net/" target="_blank">https://djblogstodo.azurewebsites.net/</a></p><p class="MsoNormal">Hope it will help you to create Web Job in azure. Please
let me know, if you any suggestions and feedback.<o:p></o:p></p>
<p class="MsoNormal">Keep sharing keep learning. Cheers <span style="mso-spacerun: yes;"> </span><o:p></o:p></p></div>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com1tag:blogger.com,1999:blog-3060332739418622694.post-87675908459613607292020-09-19T21:33:00.011+05:302020-11-16T08:18:56.479+05:30Save Serverless APIs data in table storage<p><span style="text-align: justify;">As you know in </span><span class="MsoHyperlink" style="text-align: justify;"><a href="https://howitworkinazure.blogspot.com/2020/08/serverless-apis-with-azure-function_30.html" target="_blank">ServerlessAPIs with Azure Function</a></span><span style="text-align: justify;"> post, We had stored azure function API data
in-memory (RAM) and if application restart we will lose all our data. That’s
why in this article we will save our "ProductsFuncApp” data in </span><b style="text-align: justify;">Azure Table Storage (NoSQL database)</b><span style="text-align: justify;">. This
is a part of azure Storage Account. If you want to know more about storage
account. Please read my last post </span><span class="MsoHyperlink" style="text-align: justify;"><a href="https://blogs.deepakjoshi.info/2020/09/what-is-azure-storage-account.html" target="_blank">What is Azure Storage Account?</a></span></p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">When we are using serverless
api (Microservice) then we need to choose serverless database. Table Storage
has the advantage of being extremely cheap, with a "consumption-based
pricing" model. It's very cost effective and performs well if you have no
need for advanced queries.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Another benefit of Table
Storage is that if you're using Azure Functions, you've already got a Storage
Account (<b style="mso-bidi-font-weight: normal;">djblogsstorageaccount</b>) that
the Azure Functions runtime is making use of, so it's nice and convenient to
use that for your tables, especially in the prototyping phase.<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjATB_0ElkpfFH0lzP_RtWi7GjqAaUUqp17FN9JAtKBoHkemog8o_2EUpZu1SuQcKKP43daqncR1s0korCbSmSEcd4AEICiAmgvF-vN79q0CL_eo2CN-3cc3jsJi61_ePn-dXXhNSyHJw/s1300/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="795" data-original-width="1300" height="391" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjATB_0ElkpfFH0lzP_RtWi7GjqAaUUqp17FN9JAtKBoHkemog8o_2EUpZu1SuQcKKP43daqncR1s0korCbSmSEcd4AEICiAmgvF-vN79q0CL_eo2CN-3cc3jsJi61_ePn-dXXhNSyHJw/w640-h391/1.png" width="640" /></a></div><p class="MsoNoSpacing" style="text-align: justify;"><br /></p>
<h1><a name="_Toc51441868">How to save serverless API data into table storage?</a><o:p></o:p></h1>
<p class="MsoNoSpacing">You need to follow below steps to add table storage as
database for your azure function. <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Need to install 2 NuGet packages for Table storage.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Microsoft.Azure.Cosmos.Table<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Assembly
Microsoft.Azure.WebJobs.Extensions</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji_IcqJq4GYt5iVdblaas_zHx1U8hpkpI9jvhBT-9KecC-rqOmf3T927piDVyF1M1Nx7BiJxi0jObuK0553Yd3wTFocn1JjV4R73n38HZHN99zc1drsYVTkDGG8SoJCPjbm2tjGzOhWCU/s851/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="349" data-original-width="851" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji_IcqJq4GYt5iVdblaas_zHx1U8hpkpI9jvhBT-9KecC-rqOmf3T927piDVyF1M1Nx7BiJxi0jObuK0553Yd3wTFocn1JjV4R73n38HZHN99zc1drsYVTkDGG8SoJCPjbm2tjGzOhWCU/s16000/2.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->I have added model folder in “ProductsFuncApp”
code. Create 3 class files inside it<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><a href="https://github.com/deepakjoshi-info/ProductsFuncApp/blob/master/ProductsFuncApp/Model/ProductModel.cs" target="_blank">ProductEntity</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><a href="https://github.com/deepakjoshi-info/ProductsFuncApp/blob/master/ProductsFuncApp/Model/ProductEntity.cs" target="_blank">ProductModel</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">c.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><a href="https://github.com/deepakjoshi-info/ProductsFuncApp/blob/master/ProductsFuncApp/Model/Mappings.cs" target="_blank">Mappings</a></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl1Ew5OZ2ySBg0Oa79mf9T5lcUFtRZ3mDMk_w0ub0tNTPAWNCN6uJcn_NvhBznU9LOxWSTbiKvGN_l61PRAVlmqEyfuVtYfbc5bbH8yTxKT_KR95hEjld2XCMSNTgg1a49oebtFtSI2hw/s331/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="331" data-original-width="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl1Ew5OZ2ySBg0Oa79mf9T5lcUFtRZ3mDMk_w0ub0tNTPAWNCN6uJcn_NvhBznU9LOxWSTbiKvGN_l61PRAVlmqEyfuVtYfbc5bbH8yTxKT_KR95hEjld2XCMSNTgg1a49oebtFtSI2hw/s16000/3.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->“ProductEntity”
is entity file. It is mapped with Table storage account. We need to inherit our
ProductEntity class from TableEntity so that we have a “RowKey” and
“PartitionKey” property (which Table storage requires as it uses them as a
combined key and has an “ETag” which is needed when we update rows)</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCIcDI2P2W4pmbhezRoZkW_1_x33n-lt8g22SUuYwZ9CgCSLqnn8-18ZhKW7gWFR9IAuOWDLl2KsWzzK-w6iZKHxU0mqLCEKcjw0_WamIf3Ec6lOYn1vl7wkxgs8jk2m6sWI5DtA1mJsE/s385/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="357" data-original-width="385" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCIcDI2P2W4pmbhezRoZkW_1_x33n-lt8g22SUuYwZ9CgCSLqnn8-18ZhKW7gWFR9IAuOWDLl2KsWzzK-w6iZKHxU0mqLCEKcjw0_WamIf3Ec6lOYn1vl7wkxgs8jk2m6sWI5DtA1mJsE/s16000/4.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->“ProductModel” is model class which I have used like
data transfer object (DTO) class. It will help me to transfer my “ProductEntity”
class into “ProductModel” for end user. <span style="mso-spacerun: yes;"> </span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOuW7wVcqO7N5OMfgQXMMRmFNq8oeFwzF9K9ky7LdePWrx60tCcmkouG0UAp82D-iZ9QVx2hpEuUta9l8lsTee_eAU_c_iTBW96nACLyl-qRunAiEzGqF9HUQiUMgv6Hy4M7vIx-pfuU8/s529/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="328" data-original-width="529" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOuW7wVcqO7N5OMfgQXMMRmFNq8oeFwzF9K9ky7LdePWrx60tCcmkouG0UAp82D-iZ9QVx2hpEuUta9l8lsTee_eAU_c_iTBW96nACLyl-qRunAiEzGqF9HUQiUMgv6Hy4M7vIx-pfuU8/s16000/5.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->“Mappings”
class will help us to convert our entity “ProductEntity” into model class “ProductModel”.
It will be one place for mapping. Which is helpful to minimize our mapping code
repetitions in many places.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1W9WQroxseeKpkZKdFbNyIkubJIoBWjI3YHIY532rVx_EawGTUEVvfTLiJ6SkPafFADzunV8ydpCatxW-xr_U4Vv6rMuEmFRSIrk1VIIcxA5CbROGu1HmLqVuos0dw3SHUe4BONv9MjI/s595/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="542" data-original-width="595" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1W9WQroxseeKpkZKdFbNyIkubJIoBWjI3YHIY532rVx_EawGTUEVvfTLiJ6SkPafFADzunV8ydpCatxW-xr_U4Vv6rMuEmFRSIrk1VIIcxA5CbROGu1HmLqVuos0dw3SHUe4BONv9MjI/s16000/6.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once these 3 classes. We need to add our table storage
account details in “local.settings.json”. You need to login in azure portal and
copy “Connection string” from there.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7nbSdHv4eJRFZGbDNtRPeUz1PV7e_HGhA5u0ptHwZ6W2UpX-OKeiBW9lYVcrt8-WDNskJptReH9ZlcLQMAmg9LcL5kBk-m9U7JySmBgN1MgiAD4kWKNABd2jFK1ElzUGnlLuiasU1tc0/s948/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="414" data-original-width="948" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7nbSdHv4eJRFZGbDNtRPeUz1PV7e_HGhA5u0ptHwZ6W2UpX-OKeiBW9lYVcrt8-WDNskJptReH9ZlcLQMAmg9LcL5kBk-m9U7JySmBgN1MgiAD4kWKNABd2jFK1ElzUGnlLuiasU1tc0/s16000/7.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Just copy “Connection string” in your azure function
setting file “local.settings.json”.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvwv64hcJOV-hNNQPt8ZklKI0PjjlTq7hWuN5Ei3l21ill_9ZrO_MJKiIrf2lEtm0cXidp95g2E5IwVmeymkSy0j2rWDpUuKE83MuOgZ6fvowOeooIq5oBilmbZzmNKfPjD5dUr7KJiY/s1003/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="169" data-original-width="1003" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvwv64hcJOV-hNNQPt8ZklKI0PjjlTq7hWuN5Ei3l21ill_9ZrO_MJKiIrf2lEtm0cXidp95g2E5IwVmeymkSy0j2rWDpUuKE83MuOgZ6fvowOeooIq5oBilmbZzmNKfPjD5dUr7KJiY/s16000/8.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Now we will use all these items in our “ProductsFuncApp”
azure function "<a href="https://github.com/deepakjoshi-info/ProductsFuncApp/blob/master/ProductsFuncApp/Product.cs" target="_blank">Product</a>" class file. It will look like this.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC7GI8Sj-pfjjmCTTqNbYgahrxfhU2r8k4mE8jFWBv44VKvz_ymQkpUm5x4TYcM5Ja7n29EoMIpb_tvoVA8Sn1Rqtoka27agkb1nrQ_AGl2TVBPiSOHGKkd7YyrgPOq_TYDK6vNtbbc-w/s1470/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1470" data-original-width="753" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC7GI8Sj-pfjjmCTTqNbYgahrxfhU2r8k4mE8jFWBv44VKvz_ymQkpUm5x4TYcM5Ja7n29EoMIpb_tvoVA8Sn1Rqtoka27agkb1nrQ_AGl2TVBPiSOHGKkd7YyrgPOq_TYDK6vNtbbc-w/s16000/9.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->You can download "ProductsFuncApp” code from
my GitHub account.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b style="mso-bidi-font-weight: normal;">GitHub</b>: <a href="https://github.com/deepakjoshi-info/ProductsFuncApp" target="_blank">deepakjoshi-info/ProductsFuncApp</a></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">10.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once we update your code as above just publish code
in our existing created azure function.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUbmmBlitfRdiYv7jipAwHSNvr8AboqU5t5Q5vhQrZ1czV03rRU56B1f4k8d6nidlnWSoHg4kDUTWS30qPNrPqIznLk2leatPYyz10ARaOWLjXfy6p641fYK0SaaNXpfyKki_F8NrL_Ws/s1058/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="495" data-original-width="1058" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUbmmBlitfRdiYv7jipAwHSNvr8AboqU5t5Q5vhQrZ1czV03rRU56B1f4k8d6nidlnWSoHg4kDUTWS30qPNrPqIznLk2leatPYyz10ARaOWLjXfy6p641fYK0SaaNXpfyKki_F8NrL_Ws/s16000/10.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">11.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Now
code published successfully in our azure function, also we had added API
Management (<a href="https://blogs.deepakjoshi.info/2020/09/what-is-azure-api-management.html" target="_blank">Whatis Azure API management</a>) on this azure functions so you can test it from
there as well. <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Azure
function URL: <a href="https://productsfuncapp.azurewebsites.net/" target="_blank">https://productsfuncapp.azurewebsites.net/</a>
<span style="mso-spacerun: yes;"> </span><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in;">You can test it with postman
and Fiddler<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->API
Management URL: <a href="https://productfuncappapi.developer.azure-api.net/" target="_blank">https://productfuncappapi.developer.azure-api.net/</a>
<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">I have made “AddProduct” request
with help of API Management as below<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b style="mso-bidi-font-weight: normal;">Request</b></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig47IC0gzkywAdCkvJik8CLkpOVLNu0s2Qy1o34s5wmU4pbV_DDDKwLfWgbKrY8Jkxni1X96I2e-9_aeN0Founmq7PM0K05lvoUjEZ9GEA3ykhnWrvnd9OaXuhLaU_qtKts9uKFDLD_k0/s1285/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="584" data-original-width="1285" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig47IC0gzkywAdCkvJik8CLkpOVLNu0s2Qy1o34s5wmU4pbV_DDDKwLfWgbKrY8Jkxni1X96I2e-9_aeN0Founmq7PM0K05lvoUjEZ9GEA3ykhnWrvnd9OaXuhLaU_qtKts9uKFDLD_k0/w640-h291/11.png" width="640" /></a></div><br /><b style="mso-bidi-font-weight: normal;"><br /></b><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><b style="mso-bidi-font-weight: normal;">Response</b></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWw1cq1Kq_ACHWKVyaL_XJKPRYMAZZ06awpfgGoYreB9iQsY52Jm5iCp_l1N6TGjDLd7DtA9yZmMOLGEE4cKhVrQGjMqWlzgq7S8HZQGrLbEx5FvUpJJ_PJl_kZN_GgDy-1pqGvhZmMwc/s1184/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="516" data-original-width="1184" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWw1cq1Kq_ACHWKVyaL_XJKPRYMAZZ06awpfgGoYreB9iQsY52Jm5iCp_l1N6TGjDLd7DtA9yZmMOLGEE4cKhVrQGjMqWlzgq7S8HZQGrLbEx5FvUpJJ_PJl_kZN_GgDy-1pqGvhZmMwc/w640-h279/12.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">12.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Once data saved in Table storage you can “Get
Product” with API.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->Azure
function: <a href="https://productsfuncapp.azurewebsites.net/api/Product" target="_blank">https://productsfuncapp.azurewebsites.net/api/Product</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->API
Management: <a href="https://productfuncappapi.azure-api.net/ProductsFuncApp/Product" target="_blank">https://productfuncappapi.azure-api.net/ProductsFuncApp/Product</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh156blClI2ACLHHlfGTdMEBRvmjzq7n4NObKMwH1onVNiIsbwJzgPIWInpyefulur92bP3PUziQlfjnwjDdd2bsO_AjOa3vpBi1DPXNAqzPJuprlfKzDuSMR-8flGB-stB-Tyit4pm080/s929/13.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="96" data-original-width="929" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh156blClI2ACLHHlfGTdMEBRvmjzq7n4NObKMwH1onVNiIsbwJzgPIWInpyefulur92bP3PUziQlfjnwjDdd2bsO_AjOa3vpBi1DPXNAqzPJuprlfKzDuSMR-8flGB-stB-Tyit4pm080/s16000/13.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">13.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]-->If
you want to see the data in table storage account. You need to install “Azure
Storage Explorer” in your machine. <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">Azure Storage Explorer: <a href="https://azure.microsoft.com/en-in/features/storage-explorer" target="_blank">https://azure.microsoft.com/en-in/features/storage-explorer</a></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirvWq7c6lgYGopsgfYOz5XSH9C6QqvJ2vLFTELlT1za_ra8wr9inVVVeI__v7HB6-FCtfKVZ3aPq0TYRFm-acJeYvxYqhyphenhyphenz3EHM6hk3fToFyX6CHbc6_cUaxuQtJS6m7zD4bYJpkEXnYc/s684/14.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="478" data-original-width="684" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirvWq7c6lgYGopsgfYOz5XSH9C6QqvJ2vLFTELlT1za_ra8wr9inVVVeI__v7HB6-FCtfKVZ3aPq0TYRFm-acJeYvxYqhyphenhyphenz3EHM6hk3fToFyX6CHbc6_cUaxuQtJS6m7zD4bYJpkEXnYc/s16000/14.png" /></a></div><br /> <p></p>
<p class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">14.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Once you Install “Azure Storage
Explorer” on your machine. You need to login with your azure credentials and
need to select your azure subscription.<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Select azure subscription<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Select azure storage account “djblogsstorageaccount”<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">c.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">Then select “Tables” and “products”<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">d.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">After selecting products, you
can see all the saved records<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">e.<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span lang="EN-IN">You can update record from here
as well.</span></p><p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy67JC9UCf3CwaX-vkAXAtTWGNJjJD7WfmRbtCwssk1FZI7Tz62l90wAjoLzacibEu_OLF9w19xEExqz14DOtmiDx-HAzu_rc6OzV5ogh7g3-1JflRZbAX8tS9BlQkvzmL9PV80M83A7E/s1342/15.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="729" data-original-width="1342" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy67JC9UCf3CwaX-vkAXAtTWGNJjJD7WfmRbtCwssk1FZI7Tz62l90wAjoLzacibEu_OLF9w19xEExqz14DOtmiDx-HAzu_rc6OzV5ogh7g3-1JflRZbAX8tS9BlQkvzmL9PV80M83A7E/w640-h348/15.PNG" width="640" /></a></div><p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Hope it will help you to save azure
function api data in NoSQL database (Table storage account). Which is very
scalable.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Keep learning keep sharing. Cheers<o:p></o:p></p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-12657245242335690012020-09-15T10:55:00.002+05:302020-09-30T10:38:55.217+05:30Privacy Policy<p><span style="font-size: medium;"><b>Privacy Policy for</b> <a href="https://blogs.deepakjoshi.info/" target="_blank">https://blogs.deepakjoshi.info/</a></span></p><p>If you require any information or have any questions regarding our privacy policy, please feel free to contact us by email at <a href="mailto:me@deepakjoshi.info" target="_blank">me@deepakjoshi.info</a> </p><p>At <a href="https://blogs.deepakjoshi.info" target="_blank">https://blogs.deepakjoshi.info</a>, the privacy of our visitors is of extreme importance to us. This privacy policy document outlines the types of personal information is received and collected by <a href="https://blogs.deepakjoshi.info" target="_blank">https://blogs.deepakjoshi.info</a> and how it is used. </p><p><span style="font-size: medium;"><b>Log Files</b></span></p><p>Like many other Web sites, <a href="https://blogs.deepakjoshi.info" target="_blank">https://blogs.deepakjoshi.info</a> makes use of log files. The information inside the log files includes internet protocol (IP) addresses, type of browser, Internet Service Provider (ISP), date/time stamp, referring/exit pages, and a number of clicks to analyze trends, administer the site, track user’s movement around the site, and gather demographic information. IP addresses and other such information are not linked to any information that is personally identifiable. </p><p><b><span style="font-size: medium;">Cookies and Web Beacons </span></b></p><p><a href="https://blogs.deepakjoshi.info" target="_blank">https://blogs.deepakjoshi.info</a> does use cookies to store information about visitors preferences, record user-specific information on which pages the user access or visit, customize Web page content based on visitors browser type or other information that the visitor sends via their browser.</p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-82429761646795789462020-09-12T20:22:00.030+05:302021-05-18T14:31:41.724+05:30What is Azure Storage Account<p style="text-align: left;"><span style="text-align: justify;">Everything we create on azure it use storage account to store it. The Azure Storage platform is storage solution for modern data storage scenarios. Core
storage services offer a massively scalable object store for data objects, disk
storage for Azure virtual machines (VMs), a file system service for the cloud,
a messaging store for reliable messaging, and a NoSQL store. The storage
account provides a unique namespace (URL) for your Azure Storage data that is
accessible from anywhere in the world over HTTP or HTTPS.</span></p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlo8AuVX3mj06qf_I8Yu15-6RY1PxgsNonqHeesVUht6OV954QvW6luI8An_XDF0GKK9VMiNu2njoG6oBghzQP7aYV2h5fGr5PvpyGDDQQ_Gq144DKiodQNrjerBhbcx5gC5WE9nv4A6k/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="675" data-original-width="1223" height="353" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlo8AuVX3mj06qf_I8Yu15-6RY1PxgsNonqHeesVUht6OV954QvW6luI8An_XDF0GKK9VMiNu2njoG6oBghzQP7aYV2h5fGr5PvpyGDDQQ_Gq144DKiodQNrjerBhbcx5gC5WE9nv4A6k/w640-h353/image.png" width="640" /></a></div><p></p><br /><p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Azure Storage offers several
types of storage accounts. Each type supports different features and has its
own pricing model. </p><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7FXehp44BYw9WffP7gRKICbwLNnfWEyI0JHE71wo80dS8HNJsSUKcdgXJoonPz5AOPqv-DilDS1c9KzHmRoAKsWU9Se8NpjZqlAJ3wh47wJNrZ1V5ogXALBurZFOCaR5lWlV2AO8nuQo/s1004/1.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="619" data-original-width="1004" height="395" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7FXehp44BYw9WffP7gRKICbwLNnfWEyI0JHE71wo80dS8HNJsSUKcdgXJoonPz5AOPqv-DilDS1c9KzHmRoAKsWU9Se8NpjZqlAJ3wh47wJNrZ1V5ogXALBurZFOCaR5lWlV2AO8nuQo/w640-h395/1.png" width="640" /></a></div><p class="MsoNoSpacing" style="text-align: justify;"></p></blockquote><p class="MsoNoSpacing" style="text-align: justify;">Consider these differences before you create a storage
account to determine the type of account that is best for your applications.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>BlobStorage</b> - Legacy Blob-only storage
accounts. Use general-purpose v2 accounts instead when possible. It only supports
two types of blob <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l4 level2 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->a.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Block
Blob<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l4 level2 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->b.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Append
Blob<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqRmteFibwU2X5Ptq0k7w-aXSSPrRPFPePmg4mqEFu8clGHUqJEPMhCTau2SDioES-G03aqRx2TU_J2yWMyc08WjjNvZ2w5vUWk3Emjy5w5aFnrALBnc7fn2AIeNNbkNinZEyHVC0lg7M/s1062/2019-05-01-18_38_46-Azure_Storage_Account.png-Paint.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="495" data-original-width="1062" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqRmteFibwU2X5Ptq0k7w-aXSSPrRPFPePmg4mqEFu8clGHUqJEPMhCTau2SDioES-G03aqRx2TU_J2yWMyc08WjjNvZ2w5vUWk3Emjy5w5aFnrALBnc7fn2AIeNNbkNinZEyHVC0lg7M/w640-h298/2019-05-01-18_38_46-Azure_Storage_Account.png-Paint.jpg" width="640" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l4 level2 lfo2; text-align: justify; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Storage (General-purpose v1)</b> - Legacy
account type for blobs, files, queues, and tables. Use general-purpose v2
accounts instead when possible. It supports all three types of blob<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l4 level2 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->a.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Block
Blob<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l4 level2 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->b.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Append
Blob<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l4 level2 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->c.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Page
Blob<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgrYzeWsd5ECo-02Pf5ignMOOgDiSAL85aCONVVDA0e81ZDCa6PiHiv3Bmk0CRJShE4PWLjruV24aHlNqoeGwH-YDwAZ7ShYDXKwpvBL9e5sLwk9Zi4xw9Aii0JiHzBhXTzvswbl8-ddI/s1061/2019-05-01-18_24_33-Azure_Storage_Account.png-Paint-1+%25282%2529.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="498" data-original-width="1061" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgrYzeWsd5ECo-02Pf5ignMOOgDiSAL85aCONVVDA0e81ZDCa6PiHiv3Bmk0CRJShE4PWLjruV24aHlNqoeGwH-YDwAZ7ShYDXKwpvBL9e5sLwk9Zi4xw9Aii0JiHzBhXTzvswbl8-ddI/w640-h300/2019-05-01-18_24_33-Azure_Storage_Account.png-Paint-1+%25282%2529.jpg" width="640" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l4 level2 lfo2; text-align: justify; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l4 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>StorageV2 (General-purpose v2)</b> - Basic
storage account type for blobs, files, queues, and tables. Recommended for most
scenarios using Azure Storage.</p>
<p class="MsoNoSpacing" style="text-align: justify;"><b>StorageV2 (</b>General Storage v2) account which takes the features of
the <b>BlobStorage</b> accounts and
combines them with the <b>Storage
(General-purpose v1)</b>, plus tiering</p><p class="MsoNoSpacing" style="text-align: justify;"><br /></p>
<p align="center" class="MsoNoSpacing" style="text-align: center;"><b><span style="color: red; font-size: large;">StorageV2 (General-purpose v2) = Storage
(General-purpose v1) + Access Tiers (Cool , Hot, Archive)</span></b></p><p align="center" class="MsoNoSpacing" style="text-align: center;"><br /></p><p></p>
<p class="MsoNoSpacing" style="text-align: justify; text-indent: -24px;">Azure storage offers different access tiers, which allow you to store blob object data in the most
cost-effective manner. The available access tiers</p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Hot</b>-
Lowest access rates, most
expensive per GB capacity.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Cool</b> - Still low latency, but cheap per
GB capacity at higher access rate and stored for at least 30 days. Data in the
cool access tier can tolerate slightly lower availability, but still requires
high durability, retrieval latency, and throughput characteristics like hot
data. For cool data, a slightly lower availability service-level agreement
(SLA) and higher access costs compared to hot data are acceptable trade-offs
for lower storage costs.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Archive </b>- The cheapest per GB capacity
but it takes up to 15 hours to move a blob back to cool/hot where it can be
accessed again.</p>
<p class="MsoNoSpacing" style="text-align: justify;">Differences between BlobStorage
and Storage (General-purpose v1)</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXwPSyRWtTKh7DAQH7RR8kpQsmmA3oXJW40ROR3aEoJe0fXKptU169NlRZSYD9pYn6BrEeQ6uN8WsLCe3cTQtrbbPDGkUiHoI4LEyVWmafXhn-FTFe6yIP9O5lQbWfFfTH0gKeEHXbV7U/s1048/13.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="151" data-original-width="1048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXwPSyRWtTKh7DAQH7RR8kpQsmmA3oXJW40ROR3aEoJe0fXKptU169NlRZSYD9pYn6BrEeQ6uN8WsLCe3cTQtrbbPDGkUiHoI4LEyVWmafXhn-FTFe6yIP9O5lQbWfFfTH0gKeEHXbV7U/s16000/13.PNG" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>
<h1><a name="_Toc50833743">Storage Account core storage services</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">Azure Storage Account provide
these core storage services<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l5 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Blobs Storage</b><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l5 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Tables Storage</b><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l5 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Files Storage</b><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l5 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Queues Storage</b><span style="text-align: center;"> </span></p>
<h2><a name="_Toc50833744">Blob storage</a><o:p></o:p></h2>
<p class="MsoNoSpacing" style="text-align: justify;">A massively scalable object
store for text and binary data. Azure Storage offers three types of blob
storage<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Block Blobs<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Append Blobs <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Page blobs<o:p></o:p></p>
<h3><a name="_Toc50833745">Block Blobs</a><o:p></o:p></h3>
<p class="MsoNoSpacing" style="text-align: justify;">Block blobs are composed of
blocks and are ideal for storing text or binary files, and for uploading large
files efficiently. Blocks of block blob can be managed individually. Block
blobs store up to about 4.75 TB of data.<o:p></o:p></p>
<h3><a name="_Toc50833746">Append Blobs</a><o:p></o:p></h3>
<p class="MsoNoSpacing">Append blobs are also made up of blocks, but they are
optimized for append operations, making them ideal for logging scenarios. An
append blob is comprised of blocks and is optimized for append operations. When
you modify an append blob, blocks are added to the end of the blob only, via
the Append Block operation. Updating or deleting of existing blocks is not
supported. Unlike a block blob, an append blob does not expose its block IDs.<o:p></o:p></p>
<h3><a name="_Toc50833747">Page Blobs</a><o:p></o:p></h3>
<p class="MsoNoSpacing" style="text-align: justify;">Page blobs are made up of
512-byte pages up to 8 TB in total size and are designed for frequent random
read/write operations. Page blobs are the foundation of Azure IaaS Disks. Page
blobs are a collection of 512-byte pages, which provide the ability to
read/write arbitrary ranges of bytes. Hence, page blobs are ideal for storing
index-based and sparse data structures like OS and data disks for Virtual
Machines and Databases.</p>
<h3><a name="_Toc50833748">Structure of Azure Blob storage</a><o:p></o:p></h3>
<p class="MsoNoSpacing" style="text-align: justify;">It has three types of
resources<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo5; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->The
storage Account<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo5; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->A
container in the storage account<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo5; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->A
blob (file)</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo5; text-align: justify; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisly_1rEvkU63DZJs1OYRpP-Jecpr5vzOwpUE_IbF06OdKawFuKft0F-oCOApSwEWstq7h5_U0YlUR2FM7OK1QpxYnEqAezO8P4GXE8I-rifPRsUdN-x-5wBjhwvlV1CUxnw4tIXWaBrs/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="789" data-original-width="881" height="573" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisly_1rEvkU63DZJs1OYRpP-Jecpr5vzOwpUE_IbF06OdKawFuKft0F-oCOApSwEWstq7h5_U0YlUR2FM7OK1QpxYnEqAezO8P4GXE8I-rifPRsUdN-x-5wBjhwvlV1CUxnw4tIXWaBrs/w640-h573/image.png" width="640" /></a></div><br /><br /><p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo5; text-align: justify; text-indent: -0.25in;">It will look like as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS6NLE_VG3VXUnP1dFniedu5HLBSDplNGtuxhti1Fjn0Xp6VbEw_DLhs9xflv08Yjcs1w07SBq6IyYVUGpINX8H-nbKzN030vU69zOkcvPsr1TtzFuvZuKnjNEP73EUBJehicUf9Dx8cU/s329/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="167" data-original-width="329" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS6NLE_VG3VXUnP1dFniedu5HLBSDplNGtuxhti1Fjn0Xp6VbEw_DLhs9xflv08Yjcs1w07SBq6IyYVUGpINX8H-nbKzN030vU69zOkcvPsr1TtzFuvZuKnjNEP73EUBJehicUf9Dx8cU/s16000/2.png" /></a></div>
<h2><a name="_Toc50833749">Tables Storage</a><o:p></o:p></h2>
<p class="MsoNoSpacing" style="text-align: justify;">Azure Table storage is a
service that stores structured NoSQL data in the cloud, providing a
key/attribute store with a schemaless design. Because Table storage is
schemaless, it's easy to adapt your data as the needs of your application
evolve. Access to Table storage data is fast and cost-effective for many types
of applications and is typically lower in cost than traditional SQL for similar
volumes of data.<o:p></o:p></p><p class="MsoNoSpacing" style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtOttL1SaW2mKMBSjIVQHBWjUswLhdCJt65A2TmkdwVfQAZzLcs_tQRmIvh6Scv8HZOu2-lqWWJ6OsC9BaDP3VpfNqJE_s9jH3H-8s2zK7Qtkt92aL56GoxGOLq9LXgP54BbXdXu7WCgc/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="811" data-original-width="897" height="580" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtOttL1SaW2mKMBSjIVQHBWjUswLhdCJt65A2TmkdwVfQAZzLcs_tQRmIvh6Scv8HZOu2-lqWWJ6OsC9BaDP3VpfNqJE_s9jH3H-8s2zK7Qtkt92aL56GoxGOLq9LXgP54BbXdXu7WCgc/w640-h580/image.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing">Table storage contains the following components </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqaG7y_ELhxbxJ0AYApIA8AxTjnjCogq52JQ28_5wUCNE5XxWJwUZs0sJl6AJaW8dpszW2yN0UTuTMniBgXvkqyodlijcXCnjp9T9ywH6BQAKTuRDMRLrg8G6gUHaOjuZ-BCf44QS8oSw/s468/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="247" data-original-width="468" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqaG7y_ELhxbxJ0AYApIA8AxTjnjCogq52JQ28_5wUCNE5XxWJwUZs0sJl6AJaW8dpszW2yN0UTuTMniBgXvkqyodlijcXCnjp9T9ywH6BQAKTuRDMRLrg8G6gUHaOjuZ-BCf44QS8oSw/s16000/3.png" /></a></div><br /><p></p>
<h2><a name="_Toc50833750">Files Storage</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">Azure Files is an alternative to
Azure Blob Storage (Block Blob) but can reside within the same storage account.
Azure File Storage exposes file shares using the Server Message Block (SMB)
protocol, the predominantly used file share protocol for existing on-premises
applications, it simplifies moving your existing applications to the cloud, and
because Azure File Storage allows applications to mount file shares from
anywhere in the world, your on-premises applications can take advantage of
cloud storage without change. </p><p class="MsoNormal" style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCJ9W9jWloPIykAbECokZ67hnvjUOH7xzI2MqlQfb3OGZg3wm1KSf3VM5hPEqa1rIX_7w2nyZSatrdDRBsZ4RcWLnRq2lwndH7OPHdcXlkuXQNOMiwGJH5KOWorFOIMQzn3DgglNSz86Q/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="831" data-original-width="913" height="582" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCJ9W9jWloPIykAbECokZ67hnvjUOH7xzI2MqlQfb3OGZg3wm1KSf3VM5hPEqa1rIX_7w2nyZSatrdDRBsZ4RcWLnRq2lwndH7OPHdcXlkuXQNOMiwGJH5KOWorFOIMQzn3DgglNSz86Q/w640-h582/image.png" width="640" /></a></div><br /><p></p><p class="MsoNormal" style="text-align: justify;">Azure File Storage also implements REST API
protocol, which enables you to develop modern applications that integrate with
existing applications.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibwFIXUTpiIXw0I_hI-0Lmj67Q4Y0NbjndV2Ihm281tSgHogpjWlPfeF-rjuINoAFRbwcfj97uvi0VZIw-thofBemwcSDmUh9_Mognw50cNsubiH-sRmAqVHGVsXUGiCsX5XH5_Dj054g/s660/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="296" data-original-width="660" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibwFIXUTpiIXw0I_hI-0Lmj67Q4Y0NbjndV2Ihm281tSgHogpjWlPfeF-rjuINoAFRbwcfj97uvi0VZIw-thofBemwcSDmUh9_Mognw50cNsubiH-sRmAqVHGVsXUGiCsX5XH5_Dj054g/s16000/4.png" /></a></div><p class="MsoNormal" style="text-align: justify;"><br /></p>
<h2><a name="_Toc50833751">Queues Storage</a><o:p></o:p></h2>
<p class="MsoNormal" style="text-align: justify;">Azure Queue Storage is a service
for storing large numbers of messages. You access messages from anywhere in the
world via authenticated calls using HTTP or HTTPS. </p><p class="MsoNormal" style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeZQKRywHKs16YXZ6AFkC5q5nZfc2JEirS5LhAYtv-C77QVncm3e_tS_U6E1C7jeNtMqiLzhVk-AmXerfoCgrf_39xmBEwXf_Z7hEV0Ik-eu97lsh9wzL23V9ry_rPsLKXjQhl05LyTic/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="831" data-original-width="973" height="547" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeZQKRywHKs16YXZ6AFkC5q5nZfc2JEirS5LhAYtv-C77QVncm3e_tS_U6E1C7jeNtMqiLzhVk-AmXerfoCgrf_39xmBEwXf_Z7hEV0Ik-eu97lsh9wzL23V9ry_rPsLKXjQhl05LyTic/w640-h547/image.png" width="640" /></a></div><br /><p></p><p class="MsoNormal" style="text-align: justify;">A queue message can be up to
64 KB in size. A queue may contain millions of messages, up to the total
capacity limit of a storage account. Queues are commonly used to create a backlog
of work to process asynchronously.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihMnI-OUbcWBFs-7RXOoe5DGeSib_NtwgtYE5daQC8KdzEvcF7PfQCRcV6HkGi1TbJ9WQYjkYjWqezA5gTHjk016ZC49B0GnwaGY3btvMtfu5lIyaSo20wrCQ_TGi2mNKW1300j4EL2SM/s286/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="86" data-original-width="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihMnI-OUbcWBFs-7RXOoe5DGeSib_NtwgtYE5daQC8KdzEvcF7PfQCRcV6HkGi1TbJ9WQYjkYjWqezA5gTHjk016ZC49B0GnwaGY3btvMtfu5lIyaSo20wrCQ_TGi2mNKW1300j4EL2SM/s16000/5.png" /></a></div><p class="MsoNormal" style="text-align: justify;"><br /></p>
<h1><a name="_Toc50833752">Create Azure Storage Account</a> <o:p></o:p></h1>
<p class="MsoNormal">We need to follow below steps to “Create storage account”<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/">https://portal.azure.com</a></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Once you are login in portal click in (+) sign as
below “Azure Marketplace” search page will open type “Storage Account”</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNksrWrlYZCvZ4WNhi6FWtQjdKLX848i6JdZFULfu1ALY_MaM9i3MtD9XMb7H-s65C6LczMjICADEBQP2LRAVh92mmGPJwCuTlqTegvXOxR0KjrrsuT19vdPW4DS-6cKgWVLUWdwLljlI/s555/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="168" data-original-width="555" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNksrWrlYZCvZ4WNhi6FWtQjdKLX848i6JdZFULfu1ALY_MaM9i3MtD9XMb7H-s65C6LczMjICADEBQP2LRAVh92mmGPJwCuTlqTegvXOxR0KjrrsuT19vdPW4DS-6cKgWVLUWdwLljlI/s16000/6.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Select “Storage account” option</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGF_wvIfNXvIhJUxuoSvxSuWx5PiQHUm766Hoh9QAZtjSeehQQI_g5w_GykIfflLaK0Rqxohf9BNJn-4afAnHRUNQfXroKLlsU51wrOjW-ZlkOJcqqg0BZ4tsNCAPfWhvGRkAvUcNORno/s1010/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="416" data-original-width="1010" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGF_wvIfNXvIhJUxuoSvxSuWx5PiQHUm766Hoh9QAZtjSeehQQI_g5w_GykIfflLaK0Rqxohf9BNJn-4afAnHRUNQfXroKLlsU51wrOjW-ZlkOJcqqg0BZ4tsNCAPfWhvGRkAvUcNORno/s16000/7.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo6; text-indent: -0.25in;"><br /></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]-->4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Click on above “Create” button and it will open
“Create storage account” form like this</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidSL7coQMlr8Dcw5lIDgycb-Mt1hR8KQZgi3FO49Ma9sIG2I63vM5rM7JFE6svCEQoLTL5RExjXfau2CmDhoQUAO6Mgih8dmJABOqpX26rIUxJ0kRwuh4X5nt9OoQE51fiu8BzPto8hG8/s688/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="686" data-original-width="688" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidSL7coQMlr8Dcw5lIDgycb-Mt1hR8KQZgi3FO49Ma9sIG2I63vM5rM7JFE6svCEQoLTL5RExjXfau2CmDhoQUAO6Mgih8dmJABOqpX26rIUxJ0kRwuh4X5nt9OoQE51fiu8BzPto8hG8/s16000/8.png" /></a></div><p class="MsoListParagraphCxSpFirst" style="margin-left: 1in; mso-add-space: auto; mso-list: l0 level2 lfo6; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">a.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><b><span lang="EN-IN">Performance </span></b><span lang="EN-IN">- A premium performance tier
for storing unmanaged virtual machine disks. Microsoft recommends using managed
disks with Azure virtual machines instead of unmanaged disks. <o:p></o:p></span></p>
<p class="MsoListParagraphCxSpLast" style="margin-left: 1in; mso-add-space: auto; mso-list: l0 level2 lfo6; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span lang="EN-IN">b.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span><!--[endif]--><b><span lang="EN-IN">Replication</span></b><span lang="EN-IN"> - Azure Storage always
stores multiple copies of your data so that it is protected from planned and
unplanned events, including transient hardware failures, network or power
outages, and massive natural disasters.<o:p></o:p></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]-->5.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Once we fill “Create storage account” form as
above it asks to choose “Network”<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6vDEG4_KgS_Lhp0Owpvo8lDeUbsrHrALRyGOmET2gl-IGE6l8h8uc35egnoVDo2byXfmi5gaGaF3Mi93K0M4FWUMPtQvZTIs97WCVYAstdhUkJ1uRb9kidULbTFLyfITcJw9LfSnu_k/s1036/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="693" data-original-width="1036" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6vDEG4_KgS_Lhp0Owpvo8lDeUbsrHrALRyGOmET2gl-IGE6l8h8uc35egnoVDo2byXfmi5gaGaF3Mi93K0M4FWUMPtQvZTIs97WCVYAstdhUkJ1uRb9kidULbTFLyfITcJw9LfSnu_k/s16000/9.png" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]-->6.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->We have not made any change in “Network” default
option just click in “Next: Data protection”</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhClyx92NSrsQGrtJ5cTZ2S1QOyTSq-Kd0CyauGrv8fctLgljGq-a_maetWq35WmoKSgmVRyB_u6qJc9bPjmEPi6YOf6dGLJ_KSsBzUjKwK2HKwaBRqSZ3O-MgdtR8W88yhwtcslV7EupU/s611/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="593" data-original-width="611" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhClyx92NSrsQGrtJ5cTZ2S1QOyTSq-Kd0CyauGrv8fctLgljGq-a_maetWq35WmoKSgmVRyB_u6qJc9bPjmEPi6YOf6dGLJ_KSsBzUjKwK2HKwaBRqSZ3O-MgdtR8W88yhwtcslV7EupU/s16000/10.png" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]-->7.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->We have not made any change in this screen as well
just click in “Next: Advanced”<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZdwqNk855qFFxxCF2f5HbUW02hviWIdrTmeCBH9enLZDNYlj8G3Axj274WSYpCb7oqla6yh_1rJz4V5Xb6yXJP6oteHoy0GiHLvnDlyCEnr9o-_kyG6l8pBJA-huDEmss9rzzK2SaBps/s712/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="656" data-original-width="712" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZdwqNk855qFFxxCF2f5HbUW02hviWIdrTmeCBH9enLZDNYlj8G3Axj274WSYpCb7oqla6yh_1rJz4V5Xb6yXJP6oteHoy0GiHLvnDlyCEnr9o-_kyG6l8pBJA-huDEmss9rzzK2SaBps/s16000/11.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo6; text-indent: -0.25in;"><!--[if !supportLists]-->8.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->On above screen we have not made any changed all
these options selected by default. Just click in “Review + Create” button it will
create “djblogs” as storage account.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIHYICxoOAb-Ss11xN5h8fUkoF8y0_zZLRwWZnHi2g_I-pqgbcYGWFGDF_puH9couP2Dkf9R2aMmHFSOxvfzpnYFgM0GZVH_eqmWFOxYCPA4YFpXjkHZm6a2U6bHyUYBx3epxMyFReYWk/s1315/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="645" data-original-width="1315" height="314" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIHYICxoOAb-Ss11xN5h8fUkoF8y0_zZLRwWZnHi2g_I-pqgbcYGWFGDF_puH9couP2Dkf9R2aMmHFSOxvfzpnYFgM0GZVH_eqmWFOxYCPA4YFpXjkHZm6a2U6bHyUYBx3epxMyFReYWk/w640-h314/12.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>
<h1><a name="_Toc53408326">How to save image in blob container</a></h1><h1><o:p></o:p></h1>
<p class="MsoNoSpacing">Now I will create demo application to save images in blob
storage container. Need to follow below steps<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Go to azure portal <span class="MsoHyperlink"><a href="https://portal.azure.com/">https://portal.azure.com</a></span> </p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Select <b>djblogs</b>
storage account and add new container <b>images</b>
like below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX20Cvl9x8f_Gk0uaW48Vva_mBVO7gB2fApcm1GTUvQoP5Q3bX1k4_phP0oK-Hpx4cdjstM03IYEaW7sktVpCUOuFETpKXGX8z-kaE_ahD3TA_u2IX6Qedowf3OPSBRrOhKki451QZCbE/s833/18.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="833" data-original-width="817" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX20Cvl9x8f_Gk0uaW48Vva_mBVO7gB2fApcm1GTUvQoP5Q3bX1k4_phP0oK-Hpx4cdjstM03IYEaW7sktVpCUOuFETpKXGX8z-kaE_ahD3TA_u2IX6Qedowf3OPSBRrOhKki451QZCbE/s16000/18.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->User can upload new image in <b>images</b> container directly from azure portal
as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-l2Kw1F7V30VssmQtmuUCMb4e9wW05qEUPqHlTCcOejsgxvxpNScZ8Y4zvjE3TtWNpP2mtVyE7DgfqOOVwm516QT6dqZLH2dkAWjNbhmzzo3GItgbI1-5Kz5M7TX7rA0NpFjoWGMoT-o/s1096/22.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="319" data-original-width="1096" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-l2Kw1F7V30VssmQtmuUCMb4e9wW05qEUPqHlTCcOejsgxvxpNScZ8Y4zvjE3TtWNpP2mtVyE7DgfqOOVwm516QT6dqZLH2dkAWjNbhmzzo3GItgbI1-5Kz5M7TX7rA0NpFjoWGMoT-o/s16000/22.PNG" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Once <b>images</b>
container created we need to save images inside it. We can access this
container in our C# with help of <o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->a.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Container
URL<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->b.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Storage
account access keys<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-indent: 0.5in;"><b>Container URL<o:p></o:p></b></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">You can get container URL by
clicking on images container. It will show below screen</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA7m4-m_xYkcJrQB5CFig9vGvPgIYIzw_58fHuRMpcqnaN1v1WecO-6za0hp0H4ajlxf3y3xW5UnsHOpxy0wBSGbLg12kHcHHMbKOBY1Dge_xt7IrNarG4ra_lx2egIuEq8ZnN4Hk1HZ4/s501/19.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="395" data-original-width="501" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA7m4-m_xYkcJrQB5CFig9vGvPgIYIzw_58fHuRMpcqnaN1v1WecO-6za0hp0H4ajlxf3y3xW5UnsHOpxy0wBSGbLg12kHcHHMbKOBY1Dge_xt7IrNarG4ra_lx2egIuEq8ZnN4Hk1HZ4/s16000/19.PNG" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="text-indent: 0.5in;"><b>Storage account access keys<o:p></o:p></b></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">We can get storage account access
key by clicking on storage account <b>Access
keys</b> section. It provides two access keys. You can use any one of them</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_A3OxDN_JrT38lBHcgRuvmhRNuGqnFWOWHuwVcz3w3yNGdspNTBiFJPZebh9K1UmPJ1V0Ktm5Vfqpx2raDsSwWuG15QhyphenhyphenU6pIBQ04L4Qkzm1SQWHm1rCly96jeuVC0n-Hh6yiNjx1yXs/s593/20.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="575" data-original-width="593" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_A3OxDN_JrT38lBHcgRuvmhRNuGqnFWOWHuwVcz3w3yNGdspNTBiFJPZebh9K1UmPJ1V0Ktm5Vfqpx2raDsSwWuG15QhyphenhyphenU6pIBQ04L4Qkzm1SQWHm1rCly96jeuVC0n-Hh6yiNjx1yXs/s16000/20.PNG" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->5.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Now open visual studio and create new MVC
project in .NET core. First we will install NuGet package “Microsoft.WindowsAzure.Storage”
to for blob storage library.</p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->6.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->You can get the images from blob storage with
below piece of code.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglSO7SK3gULQyqHVHyn1J2Q5pacfZXk1IffWb8Yf_9NwIkvLB4hcbqzRIz9YPOgVYpnBvI23E-8KdkpdnkRSxefLrEELT1RmEmMK9gHmHYN85NQSq7P2RXjYt8mHer3bZKmhtqWB1q64s/s749/23.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="257" data-original-width="749" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglSO7SK3gULQyqHVHyn1J2Q5pacfZXk1IffWb8Yf_9NwIkvLB4hcbqzRIz9YPOgVYpnBvI23E-8KdkpdnkRSxefLrEELT1RmEmMK9gHmHYN85NQSq7P2RXjYt8mHer3bZKmhtqWB1q64s/s16000/23.PNG" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p>
<p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN">GitHub Code: <a href="https://github.com/deepakjoshiinfo/DJBlog.StorageAccount/blob/main/DJBlogs.StorageAccount/Controllers/HomeController.cs" target="_blank">https://github.com/deepakjoshiinfo/DJBlog.StorageAccount/blob/main/DJBlogs.StorageAccount/Controllers/HomeController.cs</a></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->7.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->User can save images and files with below code</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfdvWPTtIH1EKrhq3wDr78QHf0bwK-Jn7suCkN32uvsXm9x3HkgWj5vdT8F1aA9YptCWmI8g48EXZa2GHH1JigGLjoNC8fN8jn8981trQILwxzjtT9EaXLC0-kMWyUXDL9UKAvn0lbv9o/s834/24.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="381" data-original-width="834" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfdvWPTtIH1EKrhq3wDr78QHf0bwK-Jn7suCkN32uvsXm9x3HkgWj5vdT8F1aA9YptCWmI8g48EXZa2GHH1JigGLjoNC8fN8jn8981trQILwxzjtT9EaXLC0-kMWyUXDL9UKAvn0lbv9o/s16000/24.PNG" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><br /></p>
<p class="MsoListParagraph"><span lang="EN-IN">GitHub Code: <a href="https://github.com/deepakjoshiinfo/DJBlog.StorageAccount/blob/main/DJBlogs.StorageAccount/Controllers/HomeController.cs" target="_blank">https://github.com/deepakjoshiinfo/DJBlog.StorageAccount/blob/main/DJBlogs.StorageAccount/Controllers/HomeController.cs</a><o:p></o:p></span></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->8.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->I have added all this code in my “DJBlogs.StorageAccount”
project. You can download this project code from GitHub.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">GitHub URL: <a href="https://github.com/deepakjoshiinfo/DJBlog.StorageAccount" target="_blank">https://github.com/deepakjoshiinfo/DJBlog.StorageAccount</a></p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->9.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Also deployed this code in Azure WebApp as well<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">URL: <a href="https://djblogstorageaccount.azurewebsites.net/" target="_blank">https://djblogstorageaccount.azurewebsites.net/</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">I have uploaded 2 images it will
look like as below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgekz9WaMlPNZbjc9EbZPSFUJ_3YnFhf5JSwyekJvKrZOegDbmRKrsApdt_G-aPAuMD1WL4ftoJGLRCl20RaaWO2Y7PVk-R7ItoOyBFW9NPZVmg7Qn49xpqxG1gS5PrSyAB7Evjsd_5MJQ/s662/26.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="371" data-original-width="662" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgekz9WaMlPNZbjc9EbZPSFUJ_3YnFhf5JSwyekJvKrZOegDbmRKrsApdt_G-aPAuMD1WL4ftoJGLRCl20RaaWO2Y7PVk-R7ItoOyBFW9NPZVmg7Qn49xpqxG1gS5PrSyAB7Evjsd_5MJQ/s16000/26.PNG" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p><h1>What is Azure Storage Explorer<o:p></o:p></h1><p class="MsoNoSpacing" style="text-align: justify;">Azure Storage Explorer is an
application which helps you to easily access the Azure storage account through
any device on any platform, be it Windows, MacOS, or Linux. You can easily
connect to your subscription and manipulate your tables, blobs, queues, and
files.<o:p></o:p></p><p class="MsoNormal">We need to follow below steps to see all storage account
details in “Azure Storage Explorer”<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->You
can download “Azure Storage Explorer” from below link and install your machine <o:p></o:p></p><p class="MsoListParagraphCxSpFirst" style="text-align: justify;"><b><span lang="EN-IN"> Download Link:</span></b><span lang="EN-IN"> <a href="https://azure.microsoft.com/en-in/features/storage-explorer">https://azure.microsoft.com/en-in/features/storage-explorer</a><o:p></o:p></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoBQIubCY7dcltWtUSAeZDWu7sDzN-DLFMa3Sgi74VHhMzq1cW1u0BUgAZPuKEBVeOYUg4CluqWfb0hPLORcHxWAADRgpZKom8wGnENo0VWmyCp7AzvuMMmbWJBtJjDHGJwm5soI7bMCA/s555/14.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="465" data-original-width="555" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoBQIubCY7dcltWtUSAeZDWu7sDzN-DLFMa3Sgi74VHhMzq1cW1u0BUgAZPuKEBVeOYUg4CluqWfb0hPLORcHxWAADRgpZKom8wGnENo0VWmyCp7AzvuMMmbWJBtJjDHGJwm5soI7bMCA/s16000/14.png" /></a></div><p class="MsoListParagraphCxSpFirst" style="text-align: justify;"><br /></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Once you “Azure Storage Explorer” installed in
your machine then need to be added your azure to see all your storage accounts.</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZL-Bnn5hIKXCeN58rmP5pdEcDLB-meLKf1TnIcw9fPaz2RyNv4MvFG541796HU3Vxm0mncgvT8xTBuKGoLo2HaWAAA4B5KggbPYx-dYH-48JtGlnDJnYEIcAAgYQFsTRNTrNCA9UlWBc/s900/15.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="617" data-original-width="900" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZL-Bnn5hIKXCeN58rmP5pdEcDLB-meLKf1TnIcw9fPaz2RyNv4MvFG541796HU3Vxm0mncgvT8xTBuKGoLo2HaWAAA4B5KggbPYx-dYH-48JtGlnDJnYEIcAAgYQFsTRNTrNCA9UlWBc/s16000/15.PNG" /></a></div><br /><p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><span style="text-indent: -0.25in;">Once
your azure account added in “Azure Storage Explorer” then you can see all
storage account added in azure subscription. As we have created “</span><b style="text-indent: -0.25in;">djblogs</b><span style="text-indent: -0.25in;">” storage account and added </span><b style="text-indent: -0.25in;">images</b><span style="text-indent: -0.25in;"> container to store images. It
will look like below</span></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTs_bRQ4-J9Gma63q-4kdg5x96BwKX49tuUyVJ8waLi6oNtPUmWEU6AQDP8YF7tbBOYGcDf7rOKHdV9BYAVb6fe-m5cfkPzV-urQbsPfQDMpJipmWHxQOk1clGSjBcepjXuR8J_2kzAZI/s1237/25.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="461" data-original-width="1237" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTs_bRQ4-J9Gma63q-4kdg5x96BwKX49tuUyVJ8waLi6oNtPUmWEU6AQDP8YF7tbBOYGcDf7rOKHdV9BYAVb6fe-m5cfkPzV-urQbsPfQDMpJipmWHxQOk1clGSjBcepjXuR8J_2kzAZI/w640-h239/25.PNG" width="640" /></a></div><p class="MsoNoSpacing"><br /></p><p class="MsoNoSpacing">Hope it will help you to understand azure storage account
and where we can use it.</p><p class="MsoNoSpacing">Keep sharing keep learning. <span style="font-size: 11pt;">Cheers</span></p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com7tag:blogger.com,1999:blog-3060332739418622694.post-36218345107848543752020-09-09T20:28:00.005+05:302020-09-09T20:45:17.353+05:30Track your stock portfolio with Google Sheets<p class="MsoNormal">Recently I was learning about Google Sheets and came across
"<b>GOOGLEFINANCE</b>" function.
It is helpful to track your stock portfolio. This function helps us to get the
real-time stock price and real time currency conversion rate.<o:p></o:p></p><p class="MsoNormal"><b><span style="font-size: 14pt; line-height: 107%;">Example:<o:p></o:p></span></b></p><p class="MsoNormal">Get real time google stock price <b>=GOOGLEFINANCE("NASDAQ:GOOGL","price")<o:p></o:p></b></p><p class="MsoNoSpacing" style="text-align: justify;"><b>NASDAQ</b>: This is the stock exchange name where company share listed<o:p></o:p></p><p class="MsoNoSpacing" style="text-align: justify;"><b>GOOGL</b>: This is the name of google stock name<o:p></o:p></p><p class="MsoNoSpacing" style="text-align: justify;"><b>Price</b>: It will give us
the real time price of stock</p><p class="MsoNoSpacing" style="text-align: justify;">Get real time currency conversion
rate = <b>GOOGLEFINANCE("CURRENCY:USDGBP")</b></p><p class="MsoNormal" style="text-align: justify;">This will give the “<b>CURRENCY</b>”
conversion rate “<b>USDGBP</b>” USD to GBP. In same way you can use the function
in Google Sheet based on your requirement.<o:p></o:p></p><p class="MsoNormal" style="text-align: justify;"><br /></p><p>
</p><p class="MsoNormal" style="text-align: justify;">With help of "<b>GOOGLEFINANCE</b>" function. I have
created google sheet template to track stock portfolio. You can download this template
and put your stocks details there hope it will help you track your stocks. </p><p class="MsoNormal" style="text-align: justify;">You can download template from below link </p>
<span style="font-size: medium;"><a href="https://docs.google.com/spreadsheets/d/1NcCcKh4-taM8fHrLfjPo3g8GPjcKfYe0M7RTtNsQWWY/copy" target="_blank">Make your template copy</a>
</span><br />
<iframe height="650" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQsfiA7d37qeMbZc13Lf-3l52EIhGDVH7utVGEKKEajaCkUJEzEy58AVSBNdw6KAaAAGNI41Tdn07QL/pubhtml?gid=0&single=true&widget=true&headers=false" width="1100"></iframe>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-81302179289703984972020-09-06T13:41:00.016+05:302020-09-30T10:38:28.529+05:30What is Azure API management<p> <span style="text-align: justify;">Azure API Management enables
us to create a service repository, where we can expose all our services to
clients. It helps organizations publish APIs to external, partner, and internal
developers to unlock the potential of their data and services. It also helps us
to maintain security and versioning in our APIs. Businesses everywhere are looking to extend
their operations as a digital platform, creating new channels, finding new
customers and driving deeper engagement with existing ones. API Management
provides the core competencies to ensure a successful API program through
developer engagement, business insights, analytics, security, and protection.
You can use Azure API Management to take any backend and launch a full-fledged
API program based on it.</span></p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">In previous post we have
created 2 azure functions. </p><p class="MsoNoSpacing" style="text-align: justify;">1. <a href="https://blogs.deepakjoshi.info/2020/08/what-is-azure-function.html" target="_blank"> Djblogsfuncapp</a></p><p class="MsoNoSpacing" style="text-align: justify;">2. <a href="https://blogs.deepakjoshi.info/2020/08/serverless-apis-with-azure-function_30.html" target="_blank">ProductsFuncApp</a></p><p class="MsoNoSpacing" style="text-align: justify;">Now with help of Azure API Management, we can manage
both azure functions in one location and it provide developer portal (Web App) with nice user interface for API consumer. We change developer portal
color, theme based on our requirement.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-9RyE0J6osjSzjXf_w9IT-QHI3RtdF8tDkzRPO1q6h3_78rNZDDuKRu-C2UyZYcNFKGOW9MdRz5yr2zV7Z22zL10YeDcApyhCUI_J9bdZErSDZ0NlMqpY4NcchvrtRpFRlA9hPZKQyTc/s588/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="351" data-original-width="588" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-9RyE0J6osjSzjXf_w9IT-QHI3RtdF8tDkzRPO1q6h3_78rNZDDuKRu-C2UyZYcNFKGOW9MdRz5yr2zV7Z22zL10YeDcApyhCUI_J9bdZErSDZ0NlMqpY4NcchvrtRpFRlA9hPZKQyTc/s16000/1.png" /></a></div><p class="MsoNoSpacing" style="text-align: justify;"><br /></p><h1><a name="_Toc50291119">Azure API Management example</a><o:p></o:p></h1><p class="MsoNoSpacing">Let’s consider a simplified online store system. A visitor of the website needs to be able to see product’s details, place an order, review a placed order. Whenever an order is placed, the system needs to process the order details and issue a shipping request.<o:p></o:p></p><p class="MsoNoSpacing">As above requirement we need to create three Azure Functions (microservices)<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Order (GET and POST API)- Responsible for viewing and placing an order.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Product (GET API)- Responsible for viewing details of a product.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l3 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Shipping triggered internally by an event- Responsible for processing and shipping an order<o:p></o:p></p><p class="MsoNoSpacing">We can manage these above Azure Functions (microservices) with help of API Management</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrG_oxJq4eVUCJp1wW0AAU_eLx7gyt0BrrFvSKo2viQaFoBbhOlEzCWRDetsU_CW7hnMNxg_vvlJWj6YJPhEGj7oL7_7NCjDbGO9oQtYQ3xWCNdTolUJOuo1xbHR6HN-WldQfVWMGUZIk/s640/16.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="353" data-original-width="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrG_oxJq4eVUCJp1wW0AAU_eLx7gyt0BrrFvSKo2viQaFoBbhOlEzCWRDetsU_CW7hnMNxg_vvlJWj6YJPhEGj7oL7_7NCjDbGO9oQtYQ3xWCNdTolUJOuo1xbHR6HN-WldQfVWMGUZIk/s16000/16.png" /></a></div><p class="MsoNoSpacing"><b style="mso-bidi-font-weight: normal;">Azure Service Bus</b> can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. Data is transferred between different applications and services using messages. A message is in binary format and can contain JSON, XML, or just text.</p><h1><a name="_Toc50291120">Benefits of using Azure API Management</a><o:p></o:p></h1><p class="MsoNormal">Azure API Management help us manage different azure functions (microservices) in one location<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Independent development and freedom to choose technology- Developers can work on different azure functions (microservices) at the same time and choose the best technologies for the problem they are solving.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Independent deployment and release cycle- azure functions (microservices) can be updated individually on their own schedule.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Granular scaling- Individual azure functions (microservices) can scale independently, reducing the overall cost and increasing reliability.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Simplicity- Smaller services are easier to understand which expedites development, testing, debugging, and launching a product.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><!--[endif]-->Fault isolation- Failure of a microservice does not have to translate into failure of other services.</p>
<h1><a name="_Toc50291118">How to create Azure API Management Service</a> <o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">As we created “<a href="https://howitworkinazure.blogspot.com/2020/08/serverless-apis-with-azure-function_30.html" target="_blank">ServerlessAPIs with Azure Function</a>” in last post now in this post we will wrap that serverless
API with Azure API management. It helps us to manage API from azure portal and
provide us nice Developer API portal for API documentation. It is very easy and
professional. I will show you step by step how we can add “Azure API Management
“service in our “Azure function (Serverless, microservice)”.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Go to azure portal <a href="https://portal.azure.com/" target="_blank">https://portal.azure.com</a></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Once you are login in portal click in (+) sign as
below “Azure Marketplace” search page will open type “API Management”<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6gh7K2WaQC81jpwT_x0KhqxBkRJq5qLhsSbNST_Xx_e5UcdXruW3gqYH3NmXXqy7-wNRRt8kccJamkSTDNBYWCt3-6GLk3zvVKypkhTxhIj6TQoT4whzid54_wqn00I5KZFhKjy_i0ZY/s1028/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="249" data-original-width="1028" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6gh7K2WaQC81jpwT_x0KhqxBkRJq5qLhsSbNST_Xx_e5UcdXruW3gqYH3NmXXqy7-wNRRt8kccJamkSTDNBYWCt3-6GLk3zvVKypkhTxhIj6TQoT4whzid54_wqn00I5KZFhKjy_i0ZY/s16000/2.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Click on API Management<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmD2od1_fwP0ITni6hmqHJpd0CHfVbU-H24BG8zxfjXZmQ-8jis0XYelqrd6nywEx8UuyJ-B8KsBLb3awtVWVIuksOiS-RMDri5z4o2aHnWi84lWjxrtb7xPauiVXxaPiksaaJgPIyo2k/s480/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="307" data-original-width="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmD2od1_fwP0ITni6hmqHJpd0CHfVbU-H24BG8zxfjXZmQ-8jis0XYelqrd6nywEx8UuyJ-B8KsBLb3awtVWVIuksOiS-RMDri5z4o2aHnWi84lWjxrtb7xPauiVXxaPiksaaJgPIyo2k/s16000/3.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Click on above “Create” button and it will open “API
Management Service” form like this <o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi50YuW76ypfqSeMlC8AXmGWlpcvE7W24KkgpxUHRx2pnnZbKljA8mbG-zsvEQFuZ5yGh5ZVue6QsyJTFuBOI0yInGtCAmact8AKN8Etm-4mBbvv_XJL7genEoKwCRNWkGrXAyjqb9mFE/s672/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="672" data-original-width="593" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi50YuW76ypfqSeMlC8AXmGWlpcvE7W24KkgpxUHRx2pnnZbKljA8mbG-zsvEQFuZ5yGh5ZVue6QsyJTFuBOI0yInGtCAmact8AKN8Etm-4mBbvv_XJL7genEoKwCRNWkGrXAyjqb9mFE/s16000/4.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Once you click on “Create” it will create “productfuncappapi”
as API management service<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><span style="mso-spacerun: yes;"> </span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhbBqaq07IT2dSG7Z4HyxOkjKjDPapBiE4t0S-5pNyk0kVdJCKOhghGyTD7XVEzPFS9pKp2Y0wrXp3oAfSOqrFzZeeTRB4ajegmrcIiWIpf2YfUyL1UCdBo54rD4SwYTZOUyLS1eYmoU/s1343/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="601" data-original-width="1343" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhbBqaq07IT2dSG7Z4HyxOkjKjDPapBiE4t0S-5pNyk0kVdJCKOhghGyTD7XVEzPFS9pKp2Y0wrXp3oAfSOqrFzZeeTRB4ajegmrcIiWIpf2YfUyL1UCdBo54rD4SwYTZOUyLS1eYmoU/w640-h286/5.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Once
API Management service created the we can add our “Azure Functions” on “APIs”
as below <o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo_vlh0pFI9ANykjh6ZvR90sEEGbGxlRR6IHhqy1MW6LzdbVqCl3_LmbibXuiIRC_xiPRIXomeNJ8TegO55Cp9e26tnaiW20ukn0aGx7gJKpXfBXs_DL8B5LiyKKwvOHhRH7XMapwSNpY/s1182/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="603" data-original-width="1182" height="326" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo_vlh0pFI9ANykjh6ZvR90sEEGbGxlRR6IHhqy1MW6LzdbVqCl3_LmbibXuiIRC_xiPRIXomeNJ8TegO55Cp9e26tnaiW20ukn0aGx7gJKpXfBXs_DL8B5LiyKKwvOHhRH7XMapwSNpY/w640-h326/6.png" width="640" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->To add already create “Azure Function” click on
“Function App” as above <o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRR7Qti0ckXonuYYK2RBPhzb5vxz66q2NtXFkjVqI4WhZVV6EgwT3igH1UmPowArakpQ3z3URLOk3q7VJadegdBs3o_EgQhsLlFJwDKt5d2MQYoN_iOIFagnENt3euN8gi0hq1ZQgmMkI/s887/7.png" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="395" data-original-width="887" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRR7Qti0ckXonuYYK2RBPhzb5vxz66q2NtXFkjVqI4WhZVV6EgwT3igH1UmPowArakpQ3z3URLOk3q7VJadegdBs3o_EgQhsLlFJwDKt5d2MQYoN_iOIFagnENt3euN8gi0hq1ZQgmMkI/s16000/7.png" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Click on “Browse” and select your azure function
which you want to add in API Management<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglO7mTNt1TVUxg8j6xymQ-1bifJP2QFpVgDIJMZl3c9_c58ET3u7dP70wt3njYifQFh108dUffV179zKPADQbum4vbfQD7QEnEzwixnbA47qU3WkQLPJQrqu3VkRnior2_ZM91fJBzygU/s1141/8.png" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="600" data-original-width="1141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglO7mTNt1TVUxg8j6xymQ-1bifJP2QFpVgDIJMZl3c9_c58ET3u7dP70wt3njYifQFh108dUffV179zKPADQbum4vbfQD7QEnEzwixnbA47qU3WkQLPJQrqu3VkRnior2_ZM91fJBzygU/s16000/8.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Click on select button as above screen it will
show all the function inside “ProductsFuncApp” like below<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhin6-1nxfQ2HOgaWhKNuHkMQJubcbAf_KoXvgK6aa-DpCk_VcGVBuE4clpNMOyY2WzCkoQvtG0NdVvADO_JLnPIKWAuTo-iTT4TdqpKOvZnzxmu0lQd4Z_S-nomTw-AeqCBZFVi6dHw9Y/s1028/9.png" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="1028" data-original-width="1019" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhin6-1nxfQ2HOgaWhKNuHkMQJubcbAf_KoXvgK6aa-DpCk_VcGVBuE4clpNMOyY2WzCkoQvtG0NdVvADO_JLnPIKWAuTo-iTT4TdqpKOvZnzxmu0lQd4Z_S-nomTw-AeqCBZFVi6dHw9Y/s16000/9.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">10.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Select all function which your want to add in “Azure
API Management Service”.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">11.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Once
“Azure Function” added. You can design your API request and response for end
user (Developer Portal). <o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIYo9D-bTJJWRLQ3z85C-0X1erBduwkwrhvTMMAUp-mBAXwBrjfY-ZKIfI66c2uW9H-Xl6ukmiVgboEDNQaqi5EtgNC4jOzDT8a011bparH4WpmZkBuBnH__y4NisVlM9yibAZkA2Zjrs/s1209/10.png" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="620" data-original-width="1209" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIYo9D-bTJJWRLQ3z85C-0X1erBduwkwrhvTMMAUp-mBAXwBrjfY-ZKIfI66c2uW9H-Xl6ukmiVgboEDNQaqi5EtgNC4jOzDT8a011bparH4WpmZkBuBnH__y4NisVlM9yibAZkA2Zjrs/w640-h328/10.png" width="640" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">12.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->You can create multiple APIs and sell them like
products to the end users. When we create API Management there 2 type of default
products provided by azure. You can create your own products and add your APIs
inside it and provide APIs access based on end user products.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l2 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">a.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Starter<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l2 level2 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">b.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Unlimited<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKO3ovgxcIUtK4hvfHttT8HPmrPafpO906aUGTrShQKpZjwW6lYqJbCdZId90fKShyphenhyphenI4bcY94MsWm_lf5q87Pr4XsrIZLi__PfzVL_FXA_Muwol2MSOCjhj99FZNzQ2eNNy98zUMQ-gyA/s1069/11.png" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="610" data-original-width="1069" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKO3ovgxcIUtK4hvfHttT8HPmrPafpO906aUGTrShQKpZjwW6lYqJbCdZId90fKShyphenhyphenI4bcY94MsWm_lf5q87Pr4XsrIZLi__PfzVL_FXA_Muwol2MSOCjhj99FZNzQ2eNNy98zUMQ-gyA/s16000/11.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p><p class="MsoNoSpacing" style="margin-left: 0.5in;">More information about read Microsoft
“<a href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-add-products">Create
and publish a product</a>” in API Management</p><p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">13.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Now I am adding our product APIs inside “Starter”
product and that can be accessed via API Management Developer portals.<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikMWj9OPK7UdAJDSHPmM4WckfjBXyhB-igWEHBGJ1jE7f9o91eJtG0wD_0iroHnf5XRHGmWjBuB3DV6xNeeokysGKVcs19vFgY2wArNPeHKY__aM3SI4Cc5bXpMVwb4bjQ_VJr7kUok6Y/s822/12.png" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="376" data-original-width="822" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikMWj9OPK7UdAJDSHPmM4WckfjBXyhB-igWEHBGJ1jE7f9o91eJtG0wD_0iroHnf5XRHGmWjBuB3DV6xNeeokysGKVcs19vFgY2wArNPeHKY__aM3SI4Cc5bXpMVwb4bjQ_VJr7kUok6Y/s16000/12.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">14.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->We can access these API from “Azure API Management
Portal” and change it design based on your company branding. By default Azure give
Contoso branding as below <span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">Our API URL: <a href="https://productfuncappapi.developer.azure-api.net/" target="_blank">https://productfuncappapi.developer.azure-api.net/</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://productfuncappapi.developer.azure-api.net" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="690" data-original-width="1347" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguG2_jIfS3ZRAuBK6LeSObMOIqhSKf_XXmHclPkSP7ndkifEF_4Bzf6zXIKUsn2Z_OnzQRwWWpbDyC_KorK6i809_Ixq-p7ac6493TB_ymJ3hxlC6ejkHyyml_e5unl9cs5SAEfdM0c34/w640-h328/13.png" width="640" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">15.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->I have tried to change the design of the “API
Management Developer Portal”. Now it looks like as below</p><div class="separator" style="clear: both; text-align: center;"><br /><a href="https://productfuncappapi.developer.azure-api.net" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="686" data-original-width="1326" height="331" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5tzFaquMBEP9QQrgrYSODqxv5sS-U7cSH4dn02LiWj8mcuGvpBKZOHeevZ9EuPJ4ZOSlZyicl2artJ2cTTkooQNPphXXqwJuHwiQrOmATz77kkPamL57tZGxEMk7Fi1zvKAnCGBJ29zo/w640-h331/14.png" width="640" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">16.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->We can modify our developer portal design very easily.
Hope this link will help you more if you want <a href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-developer-portal-customize">customize
developer portal</a>. <span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">17.<span style="font: 7pt "times new roman";">
</span></span></span><!--[endif]-->Once you go to our developer portal it will show
APIs as below<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in;">URL: <a href="https://productfuncappapi.developer.azure-api.net/apis" target="_blank">https://productfuncappapi.developer.azure-api.net/apis</a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://productfuncappapi.developer.azure-api.net/apis" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="1207" data-original-width="1206" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUHeeqTpqg54JITaMv1Z-lldObC_q7wVuOv4ZQmfnojdzcJVeUeDYISkLBGC8aQCwDKDS4x5Dk2Eh1M0SZAAVartm1LJBQ6wDk1Pt3tvj5-c67zY7Z0MilHw_mHUXWUa-fKydvZ4ZuBHs/w639-h640/15.png" width="639" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p>
<p class="MsoNoSpacing">You can see how nice APIs documentations portal and security
provided by API Management. API Management provide many features some of the
features I personally like is<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 41.25pt; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Versioning<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 41.25pt; mso-list: l1 level1 lfo4; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Mock
API response<o:p></o:p></p>
<p class="MsoNoSpacing">In future post we will try to cover these features</p><div>Hope it will help you to understand what is "Azure API Management" and how you can use that and take advantages from it.</div><div>Keep learning, Keep sharing! Cheers </div><div><br /></div>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com4tag:blogger.com,1999:blog-3060332739418622694.post-60268694115460439022020-08-30T13:23:00.017+05:302020-09-20T11:48:33.777+05:30Serverless APIs with Azure Function<p><span style="text-align: justify;">The acronym API stands for
"Application Programming Interface”. What is an "Application
Programming Interface"?</span></p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">The definition of
"Application Programming Interface (API)" is, "an interface or
protocol between different parts of an application". A shorter definition
would be, "How parts of an application talk to each other".<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">Let's look at the
"parts" of the Products Manager application.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">In the Products Manager
application, there are two distinct parts of the application<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Website<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Database<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtZXt4Y39sOPfh3BM2y1sQj37DN_Ls7TVgCsaA-WaGj86HDMQLKbfL8I2oH4eDyJbk-CPlq59Sy-_dx8m9nMagLao-G9KNH9P3ecFw1tnyyymJD1d8Tyi_u6DoRD2667KsHdLEPb09-Gw/s448/1.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="242" data-original-width="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtZXt4Y39sOPfh3BM2y1sQj37DN_Ls7TVgCsaA-WaGj86HDMQLKbfL8I2oH4eDyJbk-CPlq59Sy-_dx8m9nMagLao-G9KNH9P3ecFw1tnyyymJD1d8Tyi_u6DoRD2667KsHdLEPb09-Gw/s16000/1.PNG" /></a> </div>
<p class="MsoNoSpacing" style="text-align: justify;">Sometimes, applications talk
directly to a database. Other times, it's just not a good idea to talk directly
to the database. The Products Manager application is a website that runs in a
browser. Databases require secure connection information. You don't want to put
secure connection information in the browser where anyone can see it.<o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">A better idea would be to put
all the database connection code into a separate part of the application. This
part connects securely to the database but keeps your secret connection
information safe and sound. Instead of talking to the database, the website
talks to this new part of the application. This new part is the
"API".<o:p></o:p></p><p class="MsoNoSpacing" style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMPvSKwqNoio-yGHKUaIBZoVkWuoHZxORsSF0eNAOUZbI_55EkozPtWcIgANPFSkX0v8jD5WFOqKYrR_DdqoNPLM7FDKGyZ_hUu3RRbKr2MlGQg4AddhqtF1nKIW8XyI2GHNm1H7C2eMM/s699/2.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="238" data-original-width="699" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMPvSKwqNoio-yGHKUaIBZoVkWuoHZxORsSF0eNAOUZbI_55EkozPtWcIgANPFSkX0v8jD5WFOqKYrR_DdqoNPLM7FDKGyZ_hUu3RRbKr2MlGQg4AddhqtF1nKIW8XyI2GHNm1H7C2eMM/s16000/2.PNG" /></a></div><br /> <p></p>
<h1><a name="_Toc49683266">Create Serverless APIs with Azure Function</a><o:p></o:p></h1>
<p class="MsoNoSpacing" style="text-align: justify;">Serverless means you can scale on demand and pay only for the time your code is executed. I have written blog about azure functions. You can read it for more information.</p><p class="MsoNoSpacing" style="text-align: justify;"><a href="https://howitworkinazure.blogspot.com/2020/08/what-is-azure-function.html" target="_blank">What is Azure Function</a></p><p class="MsoNoSpacing" style="text-align: justify;">We will use HTTP-triggered
Azure Functions to create a REST API. Here I am using visual studio 2019 to
create “Azure Function” with “HTTP-triggered”. We will use in-memory to store
data. This approach is great for very simple experiments but comes with obvious
limitations. When the Azure Functions runtime de-allocates the server instance
running our function app, all data lost.</p><p class="MsoNoSpacing" style="text-align: justify;"><o:p></o:p></p>
<p class="MsoNoSpacing" style="text-align: justify;">I will create 4 methods for Product
API with help of 3 http methods (GET, POST and DELETE).<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->GetProduct
(GET)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->GetProductbyId
(GET)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->AddProduct
(POST)<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l2 level1 lfo2; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->DeleteProduct
(DELETE) </p>
<p class="MsoNoSpacing" style="text-align: justify;">Need to follow below steps to
create serverless APIs with Azure Function<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Create
“Azure Functions” with help of Visual Studio 2019<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj69w6vFe1Hm2vPVXbH1-zcO73P-gK9fNguq1D7QfX80HEL3ycPRACvR4Bu2D6qnn0sN637thPb06B3yCYjSSi0HhIUZC0Dad5DBaFZ66JwJd8U-Jo3pvPokFSk7RDUS0IcpLawZWPa184/s1006/3.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="607" data-original-width="1006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj69w6vFe1Hm2vPVXbH1-zcO73P-gK9fNguq1D7QfX80HEL3ycPRACvR4Bu2D6qnn0sN637thPb06B3yCYjSSi0HhIUZC0Dad5DBaFZ66JwJd8U-Jo3pvPokFSk7RDUS0IcpLawZWPa184/s16000/3.PNG" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Click
on next button, enter project name “ProductsFuncApp”<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtke1k02R-2pHInO880X-d99FrI9ZMmba8n5hFtwmEgMQQYz87IUMlmnNdO5q5idTHgbIWeD0vZTHuglQfU4dGoW5kB8jtHZvu3MhmlpkePCk3sheSwo9Ty-Va8ZTZnM_wy5FeExqj5bM/s980/4.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="585" data-original-width="980" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtke1k02R-2pHInO880X-d99FrI9ZMmba8n5hFtwmEgMQQYz87IUMlmnNdO5q5idTHgbIWeD0vZTHuglQfU4dGoW5kB8jtHZvu3MhmlpkePCk3sheSwo9Ty-Va8ZTZnM_wy5FeExqj5bM/s16000/4.PNG" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Add
new item “Product” as Azure Function <o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN19o2MFG-O0EI1t-eotYmjkwofnjRAx5h6UmD8wpYQHs4Tu9f1RS_HWlmfHq2ckv7qmQLhAk8yaBn6TMkZkH6dW07snKKGR3lQhoh9VIGLwdAlshUJ4mCyOXmemBvq5JRuQ63HfawyqU/s932/05.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="567" data-original-width="932" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN19o2MFG-O0EI1t-eotYmjkwofnjRAx5h6UmD8wpYQHs4Tu9f1RS_HWlmfHq2ckv7qmQLhAk8yaBn6TMkZkH6dW07snKKGR3lQhoh9VIGLwdAlshUJ4mCyOXmemBvq5JRuQ63HfawyqU/s16000/05.PNG" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Adding
new class “ProductModel” in same “.cs” file just for demo purpose. You can add
“ProductModel” in new folder with name “Model” <o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmTciup27T3UXRjf-44KWTZlKfIbTvjS3hGfjg9IOIoBbwp6n3njUTAMekklSl-UY2rN73UV6CU10172PPbf2BzRtzV9PfBx_82hMXBZjqhRi-7tJ1mn2opJqbpbyLYl_2BPZIxF2gLa4/s386/5.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="176" data-original-width="386" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmTciup27T3UXRjf-44KWTZlKfIbTvjS3hGfjg9IOIoBbwp6n3njUTAMekklSl-UY2rN73UV6CU10172PPbf2BzRtzV9PfBx_82hMXBZjqhRi-7tJ1mn2opJqbpbyLYl_2BPZIxF2gLa4/s16000/5.PNG" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Now
we will add all 4 methods inside “Product” class<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNXQHPg2riT-bwKLg5gmWsnbc7lV3jYRqqm72cvrD3S7c9nqCz97Aa3NxtpOMmNTnqoO5eiv8CNDrkU9f82LGfZtt0KehVK04cGBTxIaxdYtv6H_TK_7Mj4v7snslyJd2aiOdp1YwIGes/s797/6.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="534" data-original-width="797" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNXQHPg2riT-bwKLg5gmWsnbc7lV3jYRqqm72cvrD3S7c9nqCz97Aa3NxtpOMmNTnqoO5eiv8CNDrkU9f82LGfZtt0KehVK04cGBTxIaxdYtv6H_TK_7Mj4v7snslyJd2aiOdp1YwIGes/s16000/6.PNG" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->We
have taken “products” list for in-memory storage. Add 3 product in “Product” Constructor<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyC8vkwKVrHBUWNjO89T6FLZ52CSW1OyyllFV3XI2EFS6_hd3cl52O3v9KguQKun0jUO-_tqVrsA9ILi07ke6eV9PiagPXHvjuCfF9OJNjby1_lASQCpduBFe7z5hTPq6XcL0Bh-J6oJY/s450/07.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="445" data-original-width="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyC8vkwKVrHBUWNjO89T6FLZ52CSW1OyyllFV3XI2EFS6_hd3cl52O3v9KguQKun0jUO-_tqVrsA9ILi07ke6eV9PiagPXHvjuCfF9OJNjby1_lASQCpduBFe7z5hTPq6XcL0Bh-J6oJY/s16000/07.PNG" /></a></div>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->You
can see "Product.cs" code in my GitHub link <a href="https://github.com/deepakjoshi-info/ProductsFuncApp/blob/master/ProductsFuncApp/Product.cs" target="_blank">Product.cs</a><o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->We
can run azure function in our local development machine to test</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6HeiI-2DHgXczeAIAj5Ijs1_KYE3sOUD___1Pydw1seK-5vkz8KXIWXCiciSvdlGNftyN2DDsRCFICPRkA4E0cHfHNgC0hLDqqgIouD3fQOX64ayf4vmS656cbxGlrwcbb_ilof06cWg/s1107/7.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="488" data-original-width="1107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6HeiI-2DHgXczeAIAj5Ijs1_KYE3sOUD___1Pydw1seK-5vkz8KXIWXCiciSvdlGNftyN2DDsRCFICPRkA4E0cHfHNgC0hLDqqgIouD3fQOX64ayf4vmS656cbxGlrwcbb_ilof06cWg/s16000/7.PNG" /></a></div><br /><p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Once
everything looks good to us then We can publish this Azure Function into our
azure account from Visual Studio 2019. Right click on Project and click on
publish<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAnBfo9yGVdyrfSj3oqx4izhc98ebCGOBWhDto7I8qm8aurTWGn-cWBsc6OWASxlep1d8ZUKMlwh8SAIKceL0TzbEHSBAc74NHa8mHs4CjTHBLsNHs1zMUMOVh4H3E2Rd8pnIt5f90ysg/s1294/08.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="641" data-original-width="1294" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAnBfo9yGVdyrfSj3oqx4izhc98ebCGOBWhDto7I8qm8aurTWGn-cWBsc6OWASxlep1d8ZUKMlwh8SAIKceL0TzbEHSBAc74NHa8mHs4CjTHBLsNHs1zMUMOVh4H3E2Rd8pnIt5f90ysg/w640-h317/08.PNG" width="640" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">10.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Click
on next button choose the options as I have selected<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnQ7RP_TQAd1gYrVLb1KV781lyswfzHovtgwPhe7x4ydWAdz1Nw_rA7QxKCDRtBmjibnSC80tpRp2B67KoOTwt57YdHZJIrIK1EfDDGGjBsJSpXIPbbkoumJXgn_j04Qe8j5QFxJjDcQU/s1041/8.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="606" data-original-width="1041" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnQ7RP_TQAd1gYrVLb1KV781lyswfzHovtgwPhe7x4ydWAdz1Nw_rA7QxKCDRtBmjibnSC80tpRp2B67KoOTwt57YdHZJIrIK1EfDDGGjBsJSpXIPbbkoumJXgn_j04Qe8j5QFxJjDcQU/s16000/8.PNG" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">11.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Once
you filled all information as above then click on create button <o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXZI_MaSQ1caMDk4YTv-BHPvAwfR1qKKfXXN0Is-nGxt9jI_8dcDwHfziD4_iK2IJuco5BcjHwC8rtbvR03gqERN1koigfjteMps2FmuO4-_BDqs0QZP8qRZqdyiRQc9ZEKLWHNOjSFiw/s801/9.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="564" data-original-width="801" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXZI_MaSQ1caMDk4YTv-BHPvAwfR1qKKfXXN0Is-nGxt9jI_8dcDwHfziD4_iK2IJuco5BcjHwC8rtbvR03gqERN1koigfjteMps2FmuO4-_BDqs0QZP8qRZqdyiRQc9ZEKLWHNOjSFiw/s16000/9.PNG" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">12.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Click
on finish button<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">13.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Once
all above steps done now we ready to publish “Azure Function” in azure<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1QyVQ5LQ_cTsIT0ooZJAC2yYbYSAv4RrmjneKbpbfowpbyoHJAfpCgdbWREbsN80rfk2Ioc-Lm205RFyXZX2jteIjn5U7WRiAVqDVO_OeQKrq9mx8e0NvKNPIENUoTU2SlOKT8YEzj9o/s883/10.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="542" data-original-width="883" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1QyVQ5LQ_cTsIT0ooZJAC2yYbYSAv4RrmjneKbpbfowpbyoHJAfpCgdbWREbsN80rfk2Ioc-Lm205RFyXZX2jteIjn5U7WRiAVqDVO_OeQKrq9mx8e0NvKNPIENUoTU2SlOKT8YEzj9o/s16000/10.PNG" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">14.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Login
in to the Azure portal and then go to “ProductsFuncApp” azure function <o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv8YRJ-pmEmAa_d6eJbSNxqZM4a6RLLQwiKMQloLvlbUpdgcSM_AhDE4Uwxh_oh3b_CRIuq7KYqqZom7RuhMLscNaX9oeALIztzlvaUERVyRjOi5_9_MHyqclk7PFgZCG1TzyBbcFjKbo/s1226/11.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="611" data-original-width="1226" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv8YRJ-pmEmAa_d6eJbSNxqZM4a6RLLQwiKMQloLvlbUpdgcSM_AhDE4Uwxh_oh3b_CRIuq7KYqqZom7RuhMLscNaX9oeALIztzlvaUERVyRjOi5_9_MHyqclk7PFgZCG1TzyBbcFjKbo/w640-h319/11.PNG" width="640" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">15.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->Click
on “Functions” link in right navigation and you can see all 4 methods.<o:p></o:p></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrghnj7-a0j_kEB7KMno2CO63kU-hI5tQSNaN1LoHSEBaFgwpG1sHGPi8AHxXIkQa9bgQYNKENoPv_z_g0wfpMMUeRybyvdlvQ02FWb1vvQuGJ82IJbbLToviHRKQT7nNz5fytQ_kRQqk/s1146/12.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="532" data-original-width="1146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrghnj7-a0j_kEB7KMno2CO63kU-hI5tQSNaN1LoHSEBaFgwpG1sHGPi8AHxXIkQa9bgQYNKENoPv_z_g0wfpMMUeRybyvdlvQ02FWb1vvQuGJ82IJbbLToviHRKQT7nNz5fytQ_kRQqk/s16000/12.PNG" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">16.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]--><span style="mso-spacerun: yes;"> </span>User can test all these functions in Azure
Portal. I have tested “GetProduct” function, in same way you can test all
methods. Azure provide interface to pass request parameter in JSON format.<o:p></o:p></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;">GetProduct URL:
<span class="MsoHyperlink"><a href="https://productsfuncapp.azurewebsites.net/api/Product" target="_blank">https://productsfuncapp.azurewebsites.net/api/Product</a></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXR2HcZ6g_Jts4UWmA6_VeORf3AxzA1ONYj8AcsQQkxiPoObX2jxPNvtLaCPQtmP0C7HPJzJVafzHjJRBlkKHKMxIv3Wdp5nFX87MiFOnTY-ViU_8xWZiTaU7rS1Nm37qnxTiYtiHb8Uk/s1025/013.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="618" data-original-width="1025" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXR2HcZ6g_Jts4UWmA6_VeORf3AxzA1ONYj8AcsQQkxiPoObX2jxPNvtLaCPQtmP0C7HPJzJVafzHjJRBlkKHKMxIv3Wdp5nFX87MiFOnTY-ViU_8xWZiTaU7rS1Nm37qnxTiYtiHb8Uk/s16000/013.PNG" /></a></div><br /><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo3; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">17.<span style="font: 7pt "times new roman";"> </span></span></span><!--[endif]-->As
above you can check “AddProduct” method with help of HTTP POST method</p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPlh7JqDDp8_lY1brjeXU7dERDqpYYjcGHX-BUHWlo6HJAzdAo4wQYnmPeDZIRxKTghgD_Wluugkp9NwIYN9igYN4uMo16o7PP8Y-WkWIgFnyT_LFYH2iw-F_P_241YgZZlzS4hzKvhd0/s1132/13.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="563" data-original-width="1132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPlh7JqDDp8_lY1brjeXU7dERDqpYYjcGHX-BUHWlo6HJAzdAo4wQYnmPeDZIRxKTghgD_Wluugkp9NwIYN9igYN4uMo16o7PP8Y-WkWIgFnyT_LFYH2iw-F_P_241YgZZlzS4hzKvhd0/s16000/13.PNG" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p>
<p class="MsoNoSpacing" style="text-align: justify;">You can test this API with help of Fiddler, Google Post Man etc.</p><p class="MsoNoSpacing" style="text-align: justify;">Download Code from Google Drive <a href="https://drive.google.com/file/d/1TkUXlQCYlIYPzy8-hIYyMBmXsi9YQ7aw/view?usp=sharing" rel="" target="_blank">ProductsFuncApp</a></p><p class="MsoNoSpacing" style="text-align: justify;">Download Code from GitHub <a href="https://github.com/deepakjoshi-info/ProductsFuncApp" target="_blank">ProductsFuncApp</a></p><p class="MsoNoSpacing" style="text-align: justify;">Hope it will help you to understand,
how to “Create Serverless API” with help of “Azure Function”. In future blog I
will use database to store API data and add azure “API Management service” in
top of API.</p><p class="MsoNoSpacing" style="text-align: justify;"><a href="https://howitworkinazure.blogspot.com/2020/09/save-serverless-apis-in-table-storage.html">Read about save serverless APIs data in table storage (NoSQL) </a></p><p class="MsoNoSpacing" style="text-align: justify;"><a href="https://howitworkinazure.blogspot.com/2020/09/what-is-azure-api-management.html" target="_blank">Read about what is azure API management</a></p>
<p class="MsoNormal">Keep sharing keep learning <o:p></o:p></p>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com0tag:blogger.com,1999:blog-3060332739418622694.post-83689153510490745532020-08-24T19:17:00.012+05:302020-08-24T19:59:55.014+05:30What is Azure Logic Apps<p><span style="text-align: justify;">It help us to create business processes and workflows visually and integrate with SaaS and enterprise applications. Azure Logic App works based on
the workflow defined. Logic Apps provide a way to simplify and implement
scalable integrations and workflows in the cloud. It provides a visual designer
to model and automates your process as a series of steps known as a workflow.</span></p><p><span style="text-align: justify; text-indent: 0.5in;">I have created a
simple Logic App with help of visual designer. In this example, Every-time when I post new
blog in “DJ Blogs” with help of RSS Feed connector. Email notification about new blog send to my Gmail
account. </span></p><p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"><o:p></o:p></p>
<p class="MsoNoSpacing"><b style="mso-bidi-font-weight: normal;">DJ Blogs RSS feed url:</b>
<span class="MsoHyperlink"><a href="https://blogs.deepakjoshi.info/feeds/posts/default" target="_blank">https://blogs.deepakjoshi.info/feeds/posts/default</a></span></p><p class="MsoNoSpacing"><b>Gmail:</b> <span class="MsoHyperlink"><a href="mailto:Deepakjoshiinfo@gmail.com">Deepakjoshiinfo@gmail.com</a></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin47Pkp97IiZ3klygwg_P68k6xKXD7QG_epUodyRAZ0mMKOWm5zywTXnlw7xtL2zhQAnXQBSZAVTZdFvhMjOw_tFLWOe_j11nYtrNVLJrG3K_TkutwKIoxnPBNiMkNUjwo3VJUDo85MvU/s555/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="356" data-original-width="555" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin47Pkp97IiZ3klygwg_P68k6xKXD7QG_epUodyRAZ0mMKOWm5zywTXnlw7xtL2zhQAnXQBSZAVTZdFvhMjOw_tFLWOe_j11nYtrNVLJrG3K_TkutwKIoxnPBNiMkNUjwo3VJUDo85MvU/d/1.png" /></a></div><h1>How it works?<o:p></o:p></h1><p class="MsoNoSpacing"></p><p class="MsoNoSpacing" style="text-align: justify;">Every logic app workflow starts with a trigger, which fires when a specific event happens, or when new available data meets specific criteria. Many triggers provided by the connectors in Logic Apps include basic scheduling capabilities so that you can set up how regularly your workloads run. In our example each time when I post new blog trigger fires, the Logic Apps engine creates a logic app instance that runs the actions in the workflow. As result it send email to my Gmail account.</p><p class="MsoNoSpacing">Azure Logic apps have four key components.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Workflow <o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Managed Connectors<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Triggers <o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Actions</p><h2><a name="_Toc49179415">Workflow</a><o:p></o:p></h2><p class="MsoNoSpacing">Logic Apps provides a graphical way to model your
business processes as a series of steps or a workflow. As you can see the above
example 2 steps involve in workflow.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 38.25pt; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Download
new RSS feed from RSS feed URL.<o:p></o:p></p><p class="MsoNoSpacing">
</p><p class="MsoNoSpacing" style="margin-left: 38.25pt; mso-list: l0 level1 lfo2; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Send
email to Gmail<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5t8z3t3jqgWYameoLJIL9UFVpUc3iOTjPkpaCWfiF7yTmQB5WdlUrID0qlUQhc8uORzrk8Y9QtUMe_lx7sfQYU7zFF0ss5FqxLov9VqCsZaXtrDqXr6hv5AorqRoBRe8axBx32pK7loQ/s610/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="121" data-original-width="610" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5t8z3t3jqgWYameoLJIL9UFVpUc3iOTjPkpaCWfiF7yTmQB5WdlUrID0qlUQhc8uORzrk8Y9QtUMe_lx7sfQYU7zFF0ss5FqxLov9VqCsZaXtrDqXr6hv5AorqRoBRe8axBx32pK7loQ/d/2.png" /></a></div><h2><a name="_Toc49179416">Managed Connectors</a><o:p></o:p></h2><p class="MsoNoSpacing">
</p><p class="MsoNoSpacing" style="text-align: justify;">A connector is a proxy or a
wrapper around an API that allows the underlying service to talk to Microsoft
Power Automate, Microsoft Power Apps, and Azure Logic Apps. It provides a way
for users to connect their accounts and leverage a set of pre-built actions and
triggers to build their apps and workflows. Logic apps need access to data and
services. Managed connectors are created specifically for connecting to and
working with data. Connectors allow connecting to 3rd party application to
manage data and working with it. On-premise applications can be synchronization
to cloud applications using connectors. As above example we are getting data
from RSS feed. RSS feed is connector in this example. Logic Apps offers
hundreds of connectors and you can choose any connector based on your
requirement.<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfbg8pKviALtEzLjNEKyBGdEfJGpXMAdGAWCfaGf-jfxg6dNPEV0dr7Wvu05J6g53vHHN1bRS3UPzZ0M_Qb2GGqYBFifHgRECmVCK5NuyGF3VGUM04REjFw-qVgbuqZsazTOVkrIwQF-E/s817/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="735" data-original-width="817" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfbg8pKviALtEzLjNEKyBGdEfJGpXMAdGAWCfaGf-jfxg6dNPEV0dr7Wvu05J6g53vHHN1bRS3UPzZ0M_Qb2GGqYBFifHgRECmVCK5NuyGF3VGUM04REjFw-qVgbuqZsazTOVkrIwQF-E/d/3.png" /></a></div><h2><a name="_Toc49179417">Triggers</a><o:p></o:p></h2><p class="MsoNoSpacing" style="text-align: justify;">
</p><p class="MsoNoSpacing" style="text-align: justify;">Logic Apps provides built-in
triggers and actions so that you can create schedule-based workflows, help your
logic apps communicate with other apps and services, control the workflow
through your logic apps. Some Managed Connectors can also act as a trigger. A
trigger starts a new instance of a workflow based on a specific event, like
some change in data source, arrival of an e-mail. As our example we are using
RSS feed as connector and it has built-in “Schedule” trigger. We can set “Schedule”
when we want download post in certain interval.<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiypG0XH6vc354v1LvYLTc6e5_54zaD0IEInRLR5-kgJ9ITc7OBnokHaTNZrd0205kZbgfDF27MTNPLwVuJuQNGj8xnfSa7IONASO1cj8O_4JM8xXkhznpm_Au26UFYvFHLt_w9y0PX3kM/s611/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="233" data-original-width="611" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiypG0XH6vc354v1LvYLTc6e5_54zaD0IEInRLR5-kgJ9ITc7OBnokHaTNZrd0205kZbgfDF27MTNPLwVuJuQNGj8xnfSa7IONASO1cj8O_4JM8xXkhznpm_Au26UFYvFHLt_w9y0PX3kM/d/4.png" /></a></div><h2><a name="_Toc49179418">Action</a><o:p></o:p></h2><p class="MsoNoSpacing" style="text-align: justify;">
</p><p class="MsoNoSpacing" style="text-align: justify;">The step after a trigger that
makes something happen, such as sending an email. As above example after RSS
feed downloaded then we will send notification to the user. We are sent email with
help of Gmail.<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtWj0dxu3Qv9qFW0H7kWdqZoJxEd5jBZUUNA5iOf9H94hohA7i_vmD2v2Gg3Qcj5mJfrriKqrIb6_RjHB1KUzLtrw0GozoxmLfi5_4yvWBlW8QflPVvNH39VDE7Cn5E_yQPTwpbRfogRY/s544/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="342" data-original-width="544" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtWj0dxu3Qv9qFW0H7kWdqZoJxEd5jBZUUNA5iOf9H94hohA7i_vmD2v2Gg3Qcj5mJfrriKqrIb6_RjHB1KUzLtrw0GozoxmLfi5_4yvWBlW8QflPVvNH39VDE7Cn5E_yQPTwpbRfogRY/d/5.png" /></a></div><h1><a name="_Toc49179419">Create Logic App</a><o:p></o:p></h1><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Login in to the Azure portal<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->2.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Azure portal search box, enter logic apps, and
select Logic Apps.<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFVMnC2AP0DC-dy7YfAZi2CiLScHh4fUiZbjTDwyQxbF1h6xUlYnA9AU8sMrBzB11WXsq4D4eiXlq6El_gOVX3hCM0gcIypLjnTW1LLNd1xjSAgg-ANjP-xzQzkLXzE0wsifdI8vP6BoA/s800/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="280" data-original-width="800" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFVMnC2AP0DC-dy7YfAZi2CiLScHh4fUiZbjTDwyQxbF1h6xUlYnA9AU8sMrBzB11WXsq4D4eiXlq6El_gOVX3hCM0gcIypLjnTW1LLNd1xjSAgg-ANjP-xzQzkLXzE0wsifdI8vP6BoA/d/6.png" /></a></div><div><p class="MsoNoSpacing" style="margin-left: 0.5in;"><br /></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->3.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->On the Logic Apps page, select Add</p><p class="MsoNoSpacing" style="margin-left: 0.5in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggI9a4n6wGwrClkprO8NTmV_pBuvqwtOPFIwOJTF0XzkhLzqefyDi9eH0VHfSKKdsx55TJPKwmMIq5zEmhRbgXfX7S8LRMMoi4BR1ovKRjbfkA20NLHJbrluAeCrnK9mZm203JCF3TgMA/s800/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="177" data-original-width="800" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggI9a4n6wGwrClkprO8NTmV_pBuvqwtOPFIwOJTF0XzkhLzqefyDi9eH0VHfSKKdsx55TJPKwmMIq5zEmhRbgXfX7S8LRMMoi4BR1ovKRjbfkA20NLHJbrluAeCrnK9mZm203JCF3TgMA/d/7.png" /></a></div><o:p><br /></o:p><p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->4.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Logic App pane provide details about your logic
app as shown below.</p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2DsZX-5z0xzimU0PrlsWMAity-GXicBos7TNUk7qdH987iCU6WU5LBTJDTSGIMqnmcKAJ772xZklWpLnh7qnKGGhJf5IbOm4rCi8X_zotkCZkPbTePAppxP7jxGwI0FJSV_AYqqAnVhg/s766/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="681" data-original-width="766" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2DsZX-5z0xzimU0PrlsWMAity-GXicBos7TNUk7qdH987iCU6WU5LBTJDTSGIMqnmcKAJ772xZklWpLnh7qnKGGhJf5IbOm4rCi8X_zotkCZkPbTePAppxP7jxGwI0FJSV_AYqqAnVhg/d/8.png" /></a></div><p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->5.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span><!--[endif]-->Select the location based on where you want to
save your logic app data<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-indent: -0.25in;"><!--[if !supportLists]-->a.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]--><b>Region:</b>
If we selected it ask for azure data center region name <o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 1in; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->b.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><b>Integration
Service Environment:</b> It is a fully isolated and dedicated environment for all
enterprise-scale integration needs. When you create a new Integration Service
Environment, it is injected into your Azure virtual network, which allows you
to deploy Logic Apps as a service on your VNET<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->6.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->When
you're ready, select Review + Create. Confirm the details that you provided and
select Create.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->7.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->After
Azure successfully deploys your app, select Go to resource.<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->8.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Click
on <b>Templates</b>, select <b>Blank Logic App</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-sfMePDmH65PrtMYTn4qo624SjyicjoqgwndtOKc8hXlcrqc_l4D-NPzaz4xw707C0QQbzRIxWkzmSieCVVAnEKp3iN98BFo-K5enUoby8sDmhM_cJWGfTzgyegKI2kfS9Jw95P4tzCI/s947/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="432" data-original-width="947" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-sfMePDmH65PrtMYTn4qo624SjyicjoqgwndtOKc8hXlcrqc_l4D-NPzaz4xw707C0QQbzRIxWkzmSieCVVAnEKp3iN98BFo-K5enUoby8sDmhM_cJWGfTzgyegKI2kfS9Jw95P4tzCI/d/9.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->9.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span>To
find the RSS connector, in the search box, enter rss. From the triggers list,
select the RSS trigger, when a feed item is published.</p><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBfEs22ClmZWYgOam9eoyF0sK6JYCTsgA87qH_ht-5x7JbeUA1Uwk9uL1SQTkS23_SVG6jAIcNtpUaQuQjtiFeAoMQcMSWMupz9xm-2UHKu1W6uj7Ualc-1yv63myLRahTVWPanAg7QdM/s1015/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="585" data-original-width="1015" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBfEs22ClmZWYgOam9eoyF0sK6JYCTsgA87qH_ht-5x7JbeUA1Uwk9uL1SQTkS23_SVG6jAIcNtpUaQuQjtiFeAoMQcMSWMupz9xm-2UHKu1W6uj7Ualc-1yv63myLRahTVWPanAg7QdM/d/10.png" /></a></div><o:p><br /></o:p><p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->10.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Provide
the information for your trigger as described in this step<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHbBn2QRK8ZQ0dhnLcaiH25SttqT53ZUAHd2nPZwloa5sk3X99rhKl1VajJPyDNhKXa8-J6C4Ge4YxZ3-IUEu_UmKSDjPbOPvRJN2iAXb3Ux7RS4q6C14z4ORjedMc9_nXcr_Qk7uQUEA/s1102/11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="408" data-original-width="1102" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHbBn2QRK8ZQ0dhnLcaiH25SttqT53ZUAHd2nPZwloa5sk3X99rhKl1VajJPyDNhKXa8-J6C4Ge4YxZ3-IUEu_UmKSDjPbOPvRJN2iAXb3Ux7RS4q6C14z4ORjedMc9_nXcr_Qk7uQUEA/d/11.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->11.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->When
a feed item is published trigger, select New step<o:p></o:p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8MFOQAyZMN5wNgDwFHpU1-phAh1tJUxQuQQ2pqmRAdBKosPhRjMTyhLfjVjj8cOB_UZdKSvg_5HhoG89Ugo1Qxxc9cj5CXhESfozB4FQMyt3FBpoN3-QxyTvgASQx3Nw9s82Kix-4wKM/s935/12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="580" data-original-width="935" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8MFOQAyZMN5wNgDwFHpU1-phAh1tJUxQuQQ2pqmRAdBKosPhRjMTyhLfjVjj8cOB_UZdKSvg_5HhoG89Ugo1Qxxc9cj5CXhESfozB4FQMyt3FBpoN3-QxyTvgASQx3Nw9s82Kix-4wKM/d/12.png" /></a></div><p></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->12.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->If
your selected email connector prompts you to authenticate your identity,
complete that step now to create a connection between your logic app and your
email service.<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXKUWYaysmQI2wgmRk1a3U3V0ceuEfdVRT8HY5ySQkRyeV5_hu_nkKznYeL5op_cSaN0AFZPoUQgxw-AJg2SbqZWT03BD484okIprrh9J0iQ7A3g_An2JRN2R0yN78HlRjnhKMkb-a8qo/s990/13.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="515" data-original-width="990" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXKUWYaysmQI2wgmRk1a3U3V0ceuEfdVRT8HY5ySQkRyeV5_hu_nkKznYeL5op_cSaN0AFZPoUQgxw-AJg2SbqZWT03BD484okIprrh9J0iQ7A3g_An2JRN2R0yN78HlRjnhKMkb-a8qo/d/13.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; text-align: justify;"><br /></p><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->13.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->In
the Send an email action, specify the information to include in the email<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjospXvEaHZGXUgxLoEqSDJsPs3lupFRPYRWQ8ilCIlBwrelBYgnD-BH9S34DODPMSX3YSx0EONSDeHi9JTs-spkAmBSDzqqpKmcpKhMJ7zJvijVWFCnq26IBsFuUnjLA68P9TarwrPAp8/s1002/14.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="578" data-original-width="1002" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjospXvEaHZGXUgxLoEqSDJsPs3lupFRPYRWQ8ilCIlBwrelBYgnD-BH9S34DODPMSX3YSx0EONSDeHi9JTs-spkAmBSDzqqpKmcpKhMJ7zJvijVWFCnq26IBsFuUnjLA68P9TarwrPAp8/d/14.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->14.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Run
your logic app<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbxnYjDEPdQvSPtUz3O6rc5Hu8yH-zenDPUjDanQME2EhGawsabtoZhu90qJP80fz-7WeRqWCboTmnyO3Nto4kQCp22Dkww3djXKBPFCxSrLtqzfA0VPMUugVLxvsCpVTQtu5SN1vm7i8/s1100/15.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="344" data-original-width="1100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbxnYjDEPdQvSPtUz3O6rc5Hu8yH-zenDPUjDanQME2EhGawsabtoZhu90qJP80fz-7WeRqWCboTmnyO3Nto4kQCp22Dkww3djXKBPFCxSrLtqzfA0VPMUugVLxvsCpVTQtu5SN1vm7i8/d/15.png" /></a></div><p class="MsoNoSpacing" style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;"><!--[if !supportLists]-->15.<span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><!--[endif]-->Sample
email that this logic app sends<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCT99Kq2-M_Zxr1UY1A6F6QQc6gw2_wlyqleV77s5t1asmq5v6rN_yn59Z9qvaSJdFVQcTNW-vBpXcKSGZzQ9xqx6tdALKU8GL3HP8NvXRgmiwIHWPkO30Aal4w57dviAiD20Fe5kJreI/s727/16.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="234" data-original-width="727" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCT99Kq2-M_Zxr1UY1A6F6QQc6gw2_wlyqleV77s5t1asmq5v6rN_yn59Z9qvaSJdFVQcTNW-vBpXcKSGZzQ9xqx6tdALKU8GL3HP8NvXRgmiwIHWPkO30Aal4w57dviAiD20Fe5kJreI/d/16.png" /></a></div><p class="MsoNoSpacing" style="text-align: justify;">Technically, when the trigger
checks the RSS feed and finds new items, the trigger fires, and the Azure Logic
Apps engine creates an instance of your logic app workflow that runs the
actions in the workflow. If the trigger doesn't find new items, the trigger
doesn't fire and "skips" instantiating the workflow.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1_YOn3QKv21YsAe9njxb7M2WcapSl6JIAg102Sphmnmgmqv0d0GEmW7AxX0Hiuj8sSIOBuKAbFXKNDtJURKjsRjdYAeNc2eaAInrvNuRVX49IIzbKrO7zerkbEwLh8rjs54DCU4tS7Cw/s1207/17.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="868" data-original-width="1207" height="460" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1_YOn3QKv21YsAe9njxb7M2WcapSl6JIAg102Sphmnmgmqv0d0GEmW7AxX0Hiuj8sSIOBuKAbFXKNDtJURKjsRjdYAeNc2eaAInrvNuRVX49IIzbKrO7zerkbEwLh8rjs54DCU4tS7Cw/w640-h460/17.png" width="640" /></a></div><p class="MsoNoSpacing"><br /></p><p class="MsoNoSpacing">Introduction to Azure Logic Apps by Microsoft<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="400" src="https://www.youtube.com/embed/aFRYCPdOxeM" width="800" youtube-src-id="aFRYCPdOxeM"></iframe></div><p class="MsoNoSpacing" style="text-align: justify;">Now we have successfully built
and run our first logic app with the Azure portal. Hope it will help you to
understand logic apps and how you can use them.<o:p></o:p></p><p class="MsoNoSpacing">
</p><p class="MsoNoSpacing" style="text-align: justify;">Keep sharing keep learning.
Cheers </p></div>Deepak Joshihttp://www.blogger.com/profile/10081382270991727504noreply@blogger.com2