Posts

Test APIs without Swagger in Visual Studio 2022 using .http/.rest file

  To test APIs without Swagger in Visual Studio 2022 using .http/.rest, you can follow these steps: Open Visual Studio 2022 and create a new project or open an existing one that has APIs to be tested. In the Solution Explorer, right-click on the project, and select "Add" -> "New Item". In the "Add New Item" dialog box, search for ".http" or ".rest" and select the appropriate template based on your requirements. If you don't see these templates, you may need to install the "Web and Cloud Tools" workload from the Visual Studio Installer. Once you've added the file, you can use it to test your APIs by writing HTTP requests directly in the file. For example, you can send a GET request to an API endpoint by writing the following code: GET https : //api.example.com/products/1 You can also add headers, query parameters, and request body as needed. For example, you can send a POST request with a JSON payload like this: PO...

Error: The client and server cannot communicate, because they do not possess a common algorithm.

Error:MySql.Data.Common.Ssl.StartSSL(Stream& baseStream, Encoding encoding, String connectionString) at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.Driver.Open() at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() This issue is related to a connection issue between a .NET application and a MySQL database. The stack trace shows the application encountering an exception while attempting to open a connection to the MySQL database. It seems like the error is due to a problem with establishing a Secure Sockets Layer (SSL) connection. The exception is thrown in the MySql.Data.Common.Ssl.StartSSL method, which suggests that the error occurred...

How to re-order columns in the list views and add remove columns in Angular?

You can implement the ability to re-order columns and add/remove columns in list views in Angular by using drag and drop functionality for re-ordering and providing options for adding/removing columns using buttons or dropdown menus. You can also store the column configuration in a service or database to persist the user's preferences. There are also third-party libraries available that provide pre-built solutions for implementing these features. Here are some examples of third-party libraries that can be used to implement re-ordering and column customization in Angular: ng2-dragula: This library provides drag-and-drop functionality for re-ordering elements, including table columns. It's easy to use and has a simple API. ngx-datatable: This library provides a powerful and flexible data table component for Angular, with features such as column re-ordering, resizing, and hiding, as well as pagination, sorting, and filtering. ag-Grid: This library provides a feature-rich data grid...

New Tax Slab 2023 Budget LIVE Updates:

Image
Budget 2023 – Income Tax  New Tax Slab 0-3 lakh- nil 3-6 lakh -5% 6-9 lakh - 10% 9-12 lakh-15% 12-15 lakh -20% Above 15 lakh - 30%   The e-Filing portal received 72 lakh returns in a day and processed more than 6.5 crores returns Basic Exemption limit under 44AD & 44ADA to 3 Crores & 75 Lakhs. Start-ups incorporated upto 31-03-2024 shall be eligible to claim tax exemptions under Section 80-IAC Carry forward Losses for Start-Ups increased from 7 Years to 10 Years  Lower Tax Rate for Co-operatives at 15%  Introduced Capital Gain Exemption U/s. 54 & 54F limit Upper Limit to 10 Crores.  Reduce TDS from 30% to 20% to EPF Rebate limit on personal Income Tax  U/s. 87A increased from 5 Lakhs to 7 Lakhs – No Tax if taxable income in 7 Lakhs – Only for New Tax Regime  New Taxes Slabs 0- 3 Lakhs Nil, 3- 6 lakhs 5%, 6- 9 Lakhs 10%, 9-12 Lakhs 15% and 12-15 Lakhs 20 % and Above 15 Lakhs and above 30%  - Only for New Tax Regime.  The highest su...

Entity Framework 7 (EF7) : New bulk update API

Image
Entity Framework 7 (EF7) has introduced a new bulk update API that allows developers to update multiple entities in a single database round trip. This feature is particularly useful when you need to update large amounts of data, as it can help reduce the number of database round trips and improve performance. Here's an example of how to use the bulk update API in Entity Framework 7: In this example, we first retrieve a list of blogs using LINQ, just like in the previous example. Next, we loop through the list of blogs and update the URL property of each blog. Finally, we use the UpdateRange method on the context to update all of the blogs in a single database round trip, and then call SaveChanges to persist the changes to the database. By using the bulk update API in Entity Framework 7, you can significantly improve the performance of your application when updating large amounts of data.

Retirement of EC2-Classic: Steps to migrate your resources from EC2-Classic to Amazon VPC:

Image
If you are using EC2-Classic its time to migrate EC2-Classics to VPC EC2-Classic was a previous generation of Amazon Elastic Compute Cloud (EC2). AWS has announced that EC2-Classic instances will be retired on January 27, 2023, which means that any resources running on EC2-Classic will be terminated and will no longer be available. To mitigate this risk and ensure the continuity of your resources, AWS is offering an extension for a limited time for you to migrate your resources to Amazon Virtual Private Cloud (Amazon VPC). To request an extension, you need to follow these steps: Go to the AWS Support Center Choose "Create case" Select "Account and billing support" Select "Account" Select Category "Extend EC2-Classic timeline" Share your extended deadline in the body. It's important to note that you should take action as soon as possible, as the extension is only available until January 27, 2023. Migrating your resources to Amazon VPC will pro...

How to reduce cost of AWS infrastructure?

Image
Use reserved instances: Reserved instances provide a significant discount (up to 75%) compared to on-demand instances. You can purchase a reserved instance for a one- or three-year term. You can also convert your on-demand instances to reserved instances. Steps: Go to the EC2 dashboard in the AWS Management Console. Under "Instances", click "Reserved Instances". Click "Purchase Reserved Instances" and select the type and number of instances you want to reserve. Select the term (1 or 3 years) and the payment option (all upfront, partial upfront, or no upfront). Review your order and click "Purchase" to complete the proces...