Wednesday, June 19, 2019

Read the Response message when a web request throws “500 Internal Server Error”

Introduction

When I call a SOAP request from Postman I got the response as “500 Internal Server Error”. I had to call the same api from C# and read the response and had to pass it from api to front end.

Here is the screenshot of the response.




Solution



   
                string soapResult = string.Empty;
                try
                {
                    using (WebResponse webResponse = webRequest.EndGetResponse(asyncResult))
                    {
                        using (StreamReader rd = new StreamReader(webResponse.GetResponseStream()))
                        {
                            soapResult = rd.ReadToEnd();
                        }
                    }
                }
                catch (WebException wex)
                {
                    soapResult = new StreamReader(wex.Response.GetResponseStream())
                                          .ReadToEnd();
                }
                return soapResult;

Friday, May 10, 2019

Unable to open dtproj projects in Visual Studio 2017

Problem
I was trying to open a sln file which contains “.dtproj”. Unfortunately the project is marked as incompatible and the migration report displayed as below.


Solution

  • Install the latest version of SSDT
  • Open Visual Studio 2017: Go to: Tools > Extensions And Updates > Search: Microsoft Integration Services Projects > Click: Enable
  • Restart Visual Studio
  • In SSIS Project On Solution: Right Click > Reload Project




Wednesday, May 1, 2019

Tuesday, April 16, 2019

Customized SharePoint Online Training for Dilmah Tea

Conducted and completed 4 days SharePoint Online training for Dilmah Tea from 27th of March to 2nd of April.
Thanks for the opportunity and great working with you guys


Sunday, March 10, 2019

Date and time Expression in MS Flow


Expression
Output
@utcnow()
2019-03-10T12:07:30.6298153Z
utcnow('MM')
03
utcnow('yyyy')
2019
          utcnow('dddd')        Tuesday 
         utcnow('mmmm')        March