Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Monday, August 17, 2015

Which version of MVC am I using?


Open web.config file and find the System.Web.Mvc assembly definition:

assembly="System.Web.Mvc, Version=3.0.0.0 ..."

It's an MVC3 as you see. Via web you can use MvcDiagnostics which is similar to phpinfo() functionality in PHP.

I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials
​,MVC,MVC Version

Sunday, August 9, 2015

DEPENDENCY INJECTION IN ASP.NET VNEXT


Microsoft changed the way how dependency injection (DI) is done in ASP.NET vNext. In previous versions of ASP.NET there were different entry points for user defined classes like the IControllerFactory for ASP.NET MVC applications or the IHttpControllerActivator for ASP.NET WebAPI applications. Starting with ASP.NET vNext DI becomes a first-class citizen in the framework through the whole stack. With showing the new DI features in ASP.NET vNext, discussions came up whether it is the correct way to do DI. In this post I like to show how DI works in ASP.NET vNext and then lead to the current discussion about it. At the end I like to ask you for your opinion.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,Dependency Injection,MVC,.Net,Articles,Computer Tutorials, ASP.Net

Friday, August 7, 2015

Replaying IIS request logs using Apache JMeter


How would you validate a new API is compatible with an old API? While upgrading frameworks in a web application we're building, that was exactly the question we were asking ourselves. Sure, we could write synthetic tests on each endpoint, but is that representative? Users typically find insane better ways to test an API, so why not replay actual requests against the new API? In this post, we'll see how we can do exactly this using IIS and Apache JMeter. I've been using JMeter quite often in the past years doing web development, as it's one of the most customizable load test and functional test tools for web applications. The interface is q


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,jMeter,IIS,.Net,Articles,Computer Tutorials

ASP.NET MVC 6, Part 1: Tag Helpers


Welcome to part one of two in a series on ASP.NET MVC 6. ASP.NET MVC 6 has some great new features to make developing enterprise-level Web applications easier. Here, I'll be covering the new Tag Helpers feature that can be used to clean up your Razor views. To get started, download Visual Studio 2015. The Community version of Visual Studio 2015 works fine for the sample application. Next, open up a command prompt and run the Powershell script in Figure 1 to install DNVM.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,MVC, MVC6, Tagged Help,.Net,Articles,Computer Tutorials, ASP.Net

Thursday, August 6, 2015

Diagnostic Tools debugger window in Visual Studio 2015


First let's define what we mean when we say "Diagnostic Tools" in Visual Studio. Diagnostic tools means different things to different people, and some would consider the debugger itself to be a diagnostic tool. In this context, when we say Diagnostic Tools, we mean tools that allow you to see historical information (data collected over time), as opposed to just a single moment in time (like when you are stopped at a live breakpoint). By that definition, there are three main examples of diagnostic tools that were available previously in Visual Studio 2013:


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,Diagnostic Tools,Visual Studio 2015,.Net,Articles,Computer Tutorials

ASP.NET WebAPI: Getting Started with MVC4 and WebAPI


I've spent the last year working on ASP.NET MVC3 and feeling good this year on MVC4. I got some new exciting features after updating to MVC4, Web API is one of those exciting features. I have read a lot on this feature and have read a lot of good articles on the web. But I didn't get any article that covers all the concepts in one place. So I tried to combine those in one place for beginners. Please don't consider this article as my own invention.. everything is taken from several articles. Please navigate the links in the History section for further details.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

ASP.Net,WebAPIs,C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, MVC, MVC4

Versioning in WebAPI using Route Constraints


I had an interesting problem with API versioning. The API behaviour for a given resource was going to change between version 1.x and 1.y, but the controller logic was going to stay the same. Usually when your behaviour changes it's a big enough change that you need a new controller and you can direct the request appropriately - either using a version number in the route, or (my preference) with a version in the request header and a custom IHttpControllerSelector.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

Versioning,WebAPIs,C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, ASP.Net

Versioning ASP.NET Web API Services Using HTTP Headers


I've been doing some work with APIs lately and finally had the chance to dig into the ASP.NET Web API a bit more. While it's technically brand new (released with .NET 4.5 and Visual Studio 2012), the Web API has been around in beta form for quite a bit now. For those of us who have done a fair amount of work with the WCF framework, the Web API is a welcome addition/replacement. Instead of monstrous configuration files and contract-first demands placed on us by WCF, we can now build RESTful web services using a very lightweight and HTTP-focused framework. As I work on designing a new API, one thing that I'm focused on right now is versioning. In this blog post, I'll show you how to build HTTP-header-based versioning for ASP.NET Web API services.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

WebAPIs,C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, ASP.Net

.NET Core is Open Source


.NET Core is a modular development stack that is the foundation of all future .NET platforms It's already used by ASP.NET 5 and .NET Native. I'll go into more detail on what NET Core is and how it relates to the NET Framework in a following blog post.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,.Net Core,.Net,Articles,Computer Tutorials

Using Second Level Cache in Entity Framework 6.1 applications


In this post I am going to provide you with a hands-on example on how to use second level caching with Entity Framework 6.0 version. Second Level Caching is one of the features that is not present out-of-the-box in Entity Framework. Second level cache is a query cache. The results of SQL commands are stored in the cache, so that the same SQL commands retrieve their data from the Cache rather than executing the query again against the underlying provider. This can have a performance boost for your application and results in less activity against your database, at the cost of increased memory.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,ASP.Net,Web Form,Entity Framework 6.1,ASP.Net,.Net,Articles,Computer Tutorials, ASP.Net

Create an ASP.NET Web Forms app with SMS Two-Factor Authentication (C#)


This tutorial shows you how to build an ASP.NET Web Forms app with Two-Factor Authentication. This tutorial was designed to complement the tutorial titled Create a secure ASP.NET Web Forms app with user registration, email confirmation and password reset. In addition, this tutorial was based on Rick Anderson's MVC tutorial.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,ASP.Net,Web Form,ASP.Net,.Net,Articles,Computer Tutorials, ASP.Net

Profile and debug your ASP.NET MVC app with Glimpse


Glimpse is a thriving and growing family of open source NuGet packages that provides detailed performance, debugging and diagnostic information for ASP.NET apps. It's trivial to install, lightweight, ultra-fast, and displays key performance metrics at the bottom of every page. It allows you to drill down into your app when you need to find out what's going on at the server. Glimpse provides so much valuable information we recommend you use it throughout your development cycle, including your Azure test environment. While Fiddler and the F-12 development tools provide a client side view, Glimpse provides a detailed view from the server. This tutorial will focus on using the Glimpse ASP.NET MVC and EF packages, but many other packages are available. Where possible I will link to the appropriate Glimpse docs which I help maintain. Glimpse is an open source project, you too can contribute to the source code and the docs.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,ASP.Net,MVC,Glimpse,.Net,Articles,Computer Tutorials, ASP.Net

Understanding C# Features (8) Covariance, Contravariance, and Higher-Order Function


In Covariance/contravariance, variance is the capability to replace a type with a less-derived type or a more-derived type in a context. C# 4.0 and CLR 4 introduced covariance and contravariance for generics.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2012,.Net,Articles,Computer Tutorials

Upgrading a Real-World MVC 5 Application to MVC 6


These are exciting times for web development on the Microsoft stack, but perhaps a little confusing as well. For many years the cycle of moving from one solution and project system to the next hasn't been overly complex. Sure, there have been breaking changes, I've felt those pains myself, but provided the framework you were using continued to live on, there was a reasonable migration path. Moving to MVC 6 is going to be a big shift for a lot of development teams, but that doesn't mean it needs to be scary, complicated or introduce instability into your project. It does, however, mean that you're going to need an attitude of learning, that you'll pick up some new tooling, you'll have to brush up on your JavaScript and work with some new concepts.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, MVC, MVC5, MVC6

ViewComponents in ASP.NET 5 and ASP.NET MVC 6


Let's have a quick look at another new feature in ASP.NET MVC 6, and that is the ViewComponent feature. View components are intended to be replacements to ChildActions and, to some extent, of partial views. Traditionally in ASP.NET MVC (and in general in the textbook MVC pattern), you had to compose the entire model in the controller and pass it along to the view, which simply rendered the entire page based on the data from the model. The consequence of this is that the view does not need to explicitly ask for any data – as its sole purpose is to just act upon the model it received. While this sounds very nice in theory, it has traditionally posed a number of practical difficulties. There are a number of reusable components on pretty much every website – think a menu, a shopping cart, lists of all kinds, breadcrumbs, metadata and so on – so things that appear on multiple pages.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, MVC, MVC5, MVC6

Entity Framework Code First — an indexing of fields and full-text query search


By the nature of my activity, I often should do various small projects, in the core, these are sites wr on ASP.NET MVC. At any modern project there are data, so also a database so with it it are necessary as that to work. If to discard all discussions about "pro and contra" I hastens to inform that my choice falling on Entity Framework Code First. During development of the project, I pays attention to exceptional business logic and I does not waste time on projection of a database and other sample actions. Absence of possibility «from a box» at Entity Framework of possibility becoming an unpleasant surprise at usage of such approach for me to build an index on fields, and as to use the convenient and modern mechanism of full-text query search. After a gugleniye lasting many hours, ha test tens various methods with StackOverflow and other similar sites, I coming to a conclusion that the obvious and simple solution of a problem are not present, therefore deciding to make own, about it and speech will go further.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2012,.Net,Articles,Computer Tutorials,Entity Frameworks

Infinite Scrolling Using JQuery Ajax And ASP.NET MVC


Web applications such as Facebook and Twitter use a technique known as infinite scrolling or endless scrolling wherein data is loaded on the fly when a user scrolls to the bottom of a web page. There are many jQuery plugins that help you enable such a feature in your web application. However, if you wish to avoid any third-party dependency or have some specific needs, you can add your own infinite scrolling with a few lines of jQuery code and ASP.NET MVC. This article tells you how that can be accomplished.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, MVC, MVC4

Monday, August 3, 2015

Improving Web API performance


ASP.Net Web API is a lightweight framework used for building stateless HTTP services. You can use Web API to design and implement RESTful services that run on HTTP. REST is an architectural style -- a set of constraints used to implement stateless services. Web API has already become the technology of choice for building light weight HTTP services. You can learn more on Web API from the asp.net site.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,WebAPIs,MVC,MVC5,WebAPIs,Async,Performance,.Net,Articles,Computer Tutorials

Web API, Async and Performance in an ASP.NET MVC application


With the multifold increase in processor performance as well as number of processor cores in a system, software systems are expected to scale horizontally with system hardware. However, software systems have the tough job of working with disparate systems that work at their own speeds (e.g. Network latency, Disk latencies, peripheral device latency and so on). So if we are building a system that does things synchronously, our throughput is always going to be limited by the slowest system in the chain. Thus, the ability of our software to initiate a task and do something else till that task completes, goes a long way to ensure we don't 'bottleneck' or 'wait doing nothing' on a slowly running component. Rowan Miller had an excellent analogy of Async tasks to waiters at a restaurant, in his TechEd NA (2013) talk. To paraphrase – A system working asynchronously is like a waiter at a restaurant. More often than not, a waiter serving a table will be at Table 1, take an order, explain a menu item, deliver an order and then move away, free to do the same at Table 2. When Table 1 is done (deciding the order, requiring a refill, requesting the check) they will draw the waiter's attention and the waiter would come back to Table 1 as soon as they become available (or immediately if they are available). This mechanism of one waiter serving multiple tables ensures that you don't need as many waiters as the number of tables, to maintain optimal performance (in case of restaurant – experience). If we consider a computation unit (CPU + Coprocessors + Cache + System Bus etc.) to be a waiter serving customers, then async operations is the way to make sure that they don't waste time waiting while the customer decides what to order.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,WebAPIs,MVC,MVC5,WebAPIs,Async,Performance,.Net,Articles,Computer Tutorials

Building ASP.Net Web API RESTful Service – Part 11


In this post we'll discuss how we can implement resource caching by using an open source framework for HTTP caching on the client and server, this framework is called CacheCow. It is created by Ali Kheyrollahi, we'll cover in this post the server side caching.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,WebAPIs,MVC,MVC5,WebAPIs,Cache,.Net,Articles,Computer Tutorials

LinkWithin

LinkWithin

Like Us On Facebook and Receive All Updates!

You can also receive Free Email Updates:

Powered By Tutorails