Posts

Create (post) JIRA ticket (Issue) with rest API using C# ASP.NET

Today I will show you how to create new JIRA ticket using C#, you can use this code in class library then you can use it in any .NET application (like ASP.NET).using JIRA web service(REST API) you can retrieve and post Jira tickets by creating rest call to web services,for example : http://localhost:8080/rest/api/latest/issue/PROJ-2 calling this url will return json object contains the full information about issue with key (PROJ-2) so each issue or project have a key. Quick helpful links see how to install Jira on your windows JIRA rest API POST Generate C# class from JSON Now to post new issue follow the instructions : Create Console Application Project in Visual Studio. Download the following libraries by NuGet : Json.NET Microsoft ASP.NET Web API 2 Client Microsoft HTTP Client Libraries Here is the C# code: using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Net.Http.Headers; using System.Text; ...

How to remove (.aspx) from ASP.NET web forms page url using Friendly URL package.

I will explain how to remove (aspx) extension from asp.net web forms pages like the url in MVC. First you need to install the package from Nuget : Install-Package Microsoft.AspNet.FriendlyUrls Then go to Global.asax file , and add the following line to application start  : void Application_Start(object sender, EventArgs e) {    RouteConfig.RegisterRoutes(System.Web.Routing.RouteTable.Routes); } Now your asp.net web forms application url will be friendly without extension (aspx), not that both url with and without aspx will be working. how to register friendly url package asp.net friendly url asp.net web forms

Improve data Insertion performance in entity framework || Fatest way to insert huge data in entity framework C#.NET

Image
Introduction  In this article i will talk about how to improve performance when you want to insert records using entity framework, and how you can add and use bulk insert  extension in visual studio. The basic idea is to reduce the hits on database server as possible, the worst case is to insert each record in database hit. Practical Performance testing : I'm prepared simple practical test for entity framework performance for inserting data.And i take five methods of insert in test comparison  as following : Bulk Insert Extension.(i will explain how to install it from nuget) AddRange method. Add method with one SaveChanges(). Add method with one SaveChange() for each 100 record. Add method with SaveChanges() for each record. Test Results : Bulk Insert Extension Installation As we notice , bulk insert is the faster method for insert data especially huge data in entity frame...

Building string Encryption Library in C#.NET using AES encryption

Image
In this post i will show how to build class library (.dll) for string encryption and use it in client application,the encryption algorithm is AES , its not breakable method for encryption. Any .NET developer can use this class library in any .NET project as dll reference to protect the sensitive data for example : Some sensitive URL parameters in ASP.NET projects such as the id of page or logged in user. Password field in database (Hashed password). Cookies encryption. In String Encryption class you can change the secret encryption key its defined in cost string variable. Screenshot for library client application : Click here to download the source code and client project. Hope its helpful.

How to deploy ASP.NET web forms / MVC application and access it from another device on the same network using Internet information service (IIS).

Image
In this post i will explain how to deploy ASP.NET web application (web forms or MVC) on local network. the idea is to make client and server (web server) on local network , in this case any device connected to the network can access your web application by request your IP address. Step 1: Active IIS on your windows if its the first time you are use IIS on you windows.( follow the instructions ). Step 2: Publish your project from visual studio , choose file system method. Step 3 : Open IIS , you can open it by executing the following command in RUN ( inetmgr ). Step 4: Right Click on Sites menu , choose add website and enter its configurations , in our case you must provide port number for your application to configure your windows firewall to allow incomming connections to this port number, if you keep port 80 , you must open port 80 and this is not good choice. enter port 8080 (or any available port). Step 5: Open your browser and browse your application...

ASP.NET MVC - Load Partial View using ajax with progress indicator - Visual Studio 2013 MVC 5

Introduction : In any web technology, AJAX is important to load the data without refresh hole page.on other hand we will load data on request so the main page load will be faster than loading all data on page load.In this article I will show how to load MVC Partial view using ajax and how to show progress image or message by callback. What is Different between partialviews ajax Loading and partialview direct Rendering? If you render the partial view directly without using ajax technologies, its will loaded on your page (view) load, this will decrease your system performance so in some cases you can avoid this performance issue by load the partial view and render it only on request. Assume that you are going to create user profile and this profile contains the skills,and education information beside user Information. In this case you can create each profile section in partial view and then load it on request. Don't forget to show "loading" or progress ...