Please Like and Share

I have 4+ experience and working as software Engineer with Hytech professionals India PVT ltd and also working as Consultant,Trainer,Blogger and Author on Microsoft technologies,Also I have Trained more than 500+ IT professionals.I have knowledge about Asp.net,C#,SQL,Project management,replication,MVC,WebApi,SSRS,PostMan,TFS,SVN,Swagger,WMI,Agile,SignalR,Angularjs,IIS configuration.

It can be used to simulate a heavy load on any server, group of any servers, any network or any object to test its strength or to analyze overall Load performance under different load types. You can use it to make a graphical analysis chart,Excel report,csv report, of performance or to test your server/script/object behavior under heavy concurrent load.

Features of APACHE JMETER:-

You can test performance on many different server/protocol types using jmeter:

Web - HTTP, HTTPS protocol

SOAP / REST services.

FTP

Database via JDBC

LDAP authentication.

Message-oriented middleware (MOM) via JMS in java.

Mail - SMTP(S), POP3(S) and IMAP(S)

Native commands or shell scripts

TCP protocol

Complete portability and 100% Java purity.

its support fully multi-threading framework allows concurrent sampling user by many threads and simultaneous sampling of different functions by separate thread groups.

Careful GUI design allows faster Test Plan building and debugging.

Caching and offline analysis/replaying data of test results very fast.

you can make report in form of graph,csv,excel..etc....

How to use APACHE JMETER to test WebApi?

Step 1:-Download and install on your machine.but you need to install java environment because its pure java application.

Add=>Threads(Users)=>Thread group...thereafter open new panel, according your requirment you can set any number of concurrent user(thread). .see image ................

Step 4:-You can add httpheader parameter see image...

after adding httpheader panel you add header parameters like this see image.

Step 5:-You can add httprequest parameter see image...

Thereafter you'll set your request parameter,proxy,baseurl,relativeurl.etc...Step 6:-If you are using any type of authentication in your application you'll set authentication part ..see image.

Step 7:-Add listener panel to show performance report ,there are many type of report format you can select any .see image.........

Step 8:-Check your all setting again and click on start button which is in top of screen(green button)After click on START you can check you request and response data on view result panel.see image............

click on summery report you report is generated in the form of table ,you save it in own form. Note:-This is best tool to test load performance of any web application or web api.

Today i am going to explain about constant(const),readonly,dynamic.var and static in c#.Also i going to differentiate about these c# keyword because most of developer confused about these keyword in c#.

constant (const)

In c# the constants refer to fixed values of variable that the program may not change during its execution time . These fixed values of variable are also called literals.you can assign constants can be of any of the basic data types like an integer, a floating, a character,or a string literal. See image ..........

readonlyIn the c# readonly keyword is use as a modifier for field. Whenever you a field declaration includes a readonly modifier in c#, assignments to the fields value introduced by the declaration can only occur as part of the declaration or in a constructor in the same class.A field that can marked as "readonly", can only be set once during the construction of an object (in the constructor). See image..........

"Readonly" is the keyword whose assigned value we can change during runtime process or we can assign value it at run time but only through the non-static constructor. Not even a method or function.

static

In c# each object has its own set of member,properties ,variables and all the member variables have a scope part.If you want a variable to have the same value throughout all instances of the object then we can declare it as a static variable in our program. To manipulate and use the values of static variables we can also define a function as static.In c# the keyword "static" means that only one instance of a given variable exists for a class. Static variables are used to define constants because their values can be retrieved by invoking the class without creating an instance of it.In c# static variables can be initialized outside the member function or class definition. The following code is an example of a static variable, which shows the declaration and initialization of a static variable.See image.......

DynamicIn c# 4.0 the dynamic keyword is new, and is used to tell the compiler that a variable's type can change or that it is not known until run-time.It means, their type is inferred at run-time and not at the compile time execution in contrast to var type.See image............

Today i am going to explain about "area" in MVC.In very short, we can say "an area is sub part of MVC application, can be defined as Smaller functional units in an ASP.NET MVC project with its own set of whole features(model,view,controller,web.config).Inside a single MVC application we can create multiple "area".we can understand area after showing this image given below.

Blog,Help Desk,Shopping is Area which is inside a Main application MVC project.

How To use area inside MVC application:-

Step 1:-Create a MVC Project.

Step 2:-You can see your application without area.Run application without area it'll working fine.

Step 3:-Add area in your application.see image.

Now you can add multiple area in any type of MVC application.Now i am adding a area name is "Mens".see image

Now i am going to add next area name is "Womans".see image.

Now you can see in image I've added two area in Main application.

Now you are able to create model,view,controller inside any area according your requirment as well as Main application.

Note:-If you are using any area in Mvc Application then you'll have to change your Route.config file because default routing have ambiguity problem .otherwise after run application throw error like this.see image.

Step 4:-Create controller , action for each area and view.

But you can hit directly using area path .see image.

Step 5:-Change route.config file.see image.

If you want default route is any area then you'll have to add

.DataTokens["area"]= "Test"; line inside route.config file.otherwise by default page working fine from Main application. Be aware about route configuration (Controller name,Action name);

Now you are ready to work with area in MVC.

Step 6:- How to redirect one area to other area in mvc?

Hyperlink from one area view to other area view use this code.

@Html.ActionLink("Redirect to other View", "Index", "Home", new { Area = "womans" },null)

Today i am going to explain how to use Filter in MVC application .In this part of blog we will try to describe how we can use custom filters and attributes in an ASP.NET MVC application.

Why we can use Filter in MVC:-

Sometime we need to add logic either before or after an action method runs.To support this type of feature in MVC useing Filter.

Types of Filter in MVC:-

1. Action Filter

2. Authorization Filter

3. Result Filter

4. Exception Filter

1.Authorization Filter:-This Filter will be execute before action start executing.this filter is use to authorize a request for action . We will add the filter object in Global.asax or any other class inside application. These interfaces and event use in this filter.

Interface:- IAuthorizationFilter

event:- OnAuthorization

Example with code:-

publicclassAuthorizationFilterAttribute:FilterAttribute,IAuthorizationFilter{voidIAuthorizationFilter.OnAuthorization(AuthorizationContext filterContext){
filterContext.Controller.ViewBag.AuthorizedMessage="AuthorizationFilter filter is called before action.";}}

2.Action Filter:-This Filter will be execute before and after action start executing .In this filter we can use pre-processing and post-processing logic.. We will add the filter object in Global.asax or any other class inside application. These interfaces and event use in this filter.

This Filter will be execute before and after action start executing .We can use this Filter in the event that we need some adjustment to be done in the Action outcome. We will add the filter object in Global.asax or any other class inside application. These interfaces and event use in this filter.

4.Exception Filter:-This Filter will be execute whenever any action of the controller throw exception.this filter is mainly use to custom error logging module.We will add the filter object in Global.asax or any other class inside application. These interfaces and event use in this filter.