Contents tagged with .NET
-
Resolving 'System.Drawing.Image' Errors After Upgrading to .NET 9
Microsoft recently released .NET 9, the latest version of its popular development platform. This release brings several enhancements, including improved performance, enhanced developer productivity tools, and updated runtime features. With a focus on streamlining application development and introducing new capabilities, .NET 9 continues to solidify its position as a powerful framework for modern software development.
-
Level Up Your Skills at Microsoft Build: Attend and Earn a Free Microsoft Certification Exam through the Cloud Skills Challenge
Microsoft Build is an annual conference designed for developers, software engineers and tech professionals. This year, Microsoft Build will take place from Tuesday, May 23 to Thursday, May 25, offering attendees the choice to participate either in-person or online. The conference serves as a platform for Microsoft to unveil new tools, technologies, and updates while providing valuable educational sessions and workshops to help developers enhance their skills.
-
Globalization & Localization in ASP.Net Core 7
In today's world, it is becoming increasingly common for applications to be written with a global audience in mind. Globalization and localization are two key concepts that developers must consider when creating software to support multiple languages / cultures.
-
Index is not an attribute class – Error while migrating from ASP.Net MVC 5 to .Net Core
Recently one of my friends was migrating a project from ASP.Net MVC 5 to ASP.Net core 3.1. One of the challenges he faced is with the Index Attribute in data annotations. The .Net Core is not recognizing the Index attribute. When he copied his class from his MVC 5 project, he got the following error message.
-
C# 7 - Return multiple values from methods
It was a long-awaited feature to return multiple values from a method. Developers used collection variables such as Array, ArrayList or Generic List to return multiple values from methods. Now with Visual Studio 2017 and C# 7, you can easily return multiple values with the help of Tuples.
In this article, I am going to explain how tuples can be used in C# 7 onwards to return multiple values.
Consider the following code from the console application. The method GetDivisionResults accepts two parameters namely number and divisor and returns two integers that are quotient and remainder.
static void Main(string[] args)
{
int number = 17;
int devisor = 5;
var result = GetDivisionResults(17, 5);
Console.WriteLine("Quotient is " + result.Item1);
Console.WriteLine("Remainder is " + result.Item2);
} -
Create an offline installer for Visual Studio 2017
Since Visual Studio 2017 is released, I wanted to try it as usual. But I found, there is no ISO available for Visual Studio 2017. But there is a beautiful guide available that explains how to create an offline installer for Visual Studio. You can find the document in the below link
-
Securing sections in Web.Config
For ASP.Net applications, developers usually store lots of configuration data in the Web.Config, some of such settings can contain secured information such as connection strings, email settings, proxy settings etc. Storing credential information in Web.Config as plain text is a threat as this could lead to leak the information. Though the web server will not render web.config files to the visitors, you need to see there could be users, such as system administrators, back up operators, etc who have access to your server’s file system. Exposing secured information for such users is a threat and you need to protect your configuration data. The solution is to encrypt the sections in Web.Config and thankfully ASP.Net offers out of the box support for encrypting and decrypting the connection string placed inside Web.Config.
In this article I am going to demonstrate, how to encrypt/decrypt the connection string section in Web.Config, you can follow the same concepts to encrypt any other section in web.config. For the purpose of the article, I created an ASP.Net empty web application and added a default.aspx file. The project in solution explorer looks as follows.
-
Enable RSS feed in SharePoint 2013
For the purpose of this walkthrough, I have created a picture Library named “MyPictures” and added five pictures to this library. The thumbnail view of the picture library is as follows.
-
Integrate Microsoft Translator into your ASP.Net application
In this article I am going to explain how easily you can integrate the Microsoft translator API to your ASP.Net application. Why we need a translation API? Once you published a website, you are opening a channel to the global audience. So making the web content available only in one language doesn’t cover all your audience. Especially when you are offering products/services it is important to provide contents in multiple languages. Users will be more comfortable when they see the content in their native language. How to achieve this, hiring translators and translate the content to all your user’s languages will cost you lot of money, and it is not a one time job, you need to translate the contents on the go. What is the alternative, we need to look for machine translation. Thankfully there are some translator engines available that gives you API level access, so that automatically you can translate the content and display to the user. Microsoft Translator API is an excellent set of web service APIs that allows developers to use the machine translation technology in their own applications.
-
Bundling and Minification in ASP.Net 4.5
Being a web developer in these days is challenging as well as interesting. With HTML 5 specifications in place, the browsers adding more client side capabilities. JQuery is playing a major role in today’s client side development. As a developer you cannot stay away from these things, you need to adapt these. At the same time you cannot develop (at least not practical as cost/time wise) all those client side scripts, you need to depend on third party JQuery plug-ins to bring attractive user friendly interfaces. There are lots of plug-ins available over internet for free that allows to use in your website. If you are developing sites, you must be using use several plug-ins in your site.
-
ASP.Net Web API in Visual Studio 2010
Recently for one of my project, it was necessary to create couple of services. In the past I was using WCF, since my Services are going to be utilized through HTTP, I was thinking of ASP.Net web API. So I decided to create a Web API project. Now the real issue is that ASP.Net Web API launched after Visual Studio 2010 and I had to use ASP.Net web API in VS 2010 itself. By default there is no template available for Web API in Visual Studio 2010.
-
Get certified for free, Microsoft offers free certification exam (70-480)
Recently I got an email from Microsoft regarding the free exam voucher that can be used for exam 70-480 : Programming in HTML 5 with JavaScript and CSS3. This is a great opportunity for developers to get certified without spending any money. Awesome!
-
NuGet package manager in Visual Studio 2012
NuGet is a package manager that helps developers to automate the process of installing and upgrading packages in Visual Studio projects. It is free and open source. You can see the project in codeplex from the below link.
-
Coexistence of projects between Visual Studio 2010 and 2012
Microsoft has released another version of Visual Studio named Visual Studio 2012. As you can see there are user interface (UI) changes in all/most of the Microsoft applications as Microsoft is moving towards Windows 8 and changing the UI scheme for all of the applications. Visual Studio 2012 is a move to adapt the new interface requirements that are in coherent with Windows 8. Not only this Visual Studio 2012 has lots of improvements in several areas and it supports .Net framework 4.5.
-
Change default language settings in Visual Studio 2012
The first thing you need to do after the installation of Visual Studio 2012 is to choose the IDE preferences. Once you select your preferred collection of settings, the IDE will always choose dialogs and other options according to your selection. Nowadays developer’s needs to work with different programming environments and due to this, developers might need to reset the default settings. In this article, I am going to demonstrate how you can change the default settings in Visual Studio 2012.
-
Extension methods in .Net framework
Recently one of my friend asked me about extension method. Though it was introduced in .Net framework 3.0, lots of people are not using this or not aware of the power of extension methods. So I decided to write a blog post about this to give an introduction to the extension methods.
-
Site Map Provider using custom business objects
Recently one of the project I was in a situation to build navigation for line of business data, the existing system available was fully designed as object oriented and it connects with some database other than SQL server. While thinking about showing navigation controls to the user, it was not a good idea to drill through objects as it takes lot of resources and more number of connections. So I decided to use a custom SiteMap provider that uses LOB objects to create navigation. In this article I am going to summarize the major steps I went through.
-
Configure Forms based authentication in SharePoint 2010
-
WalkThrough: aspnet_regsql.exe in ASP.Net 4
ASP.Net has the built-in support for Membership. Using this, you can securely store and validate user credentials. By using Membership along with Roles and Profiles you can build powerful applications. ASP.Net has a set of classes that allows you to access the Membership and Roles functionality. You can get complete reference of these classes from the below link.
-
Create a Web Application in SharePoint 2010 using Claims Based authentication
SharePoint 2010 supports two types of authentication modes. Classic Mode and Claims based. Classic mode supports only windows authentication, where in case of Claims based authentication you can use any of the supported authentication methods such as windows authentication, forms based authentication (LDAP, SQL Server, custom) and SAML token based authentication.