Objective This article will give a brief explanation on how to handle remote server name could not resolved exception in WCF Data Service If you are new to this topic, please read Introduction to WCF Data service and ODATA before going through below article Let us say, there is a WCF Data Service up andContinueContinue reading “WebException or Remote server name could not be resolved in WCF Data Service”
Author Archives: Dhananjay Kumar
Step by Step walk Through on URL routing in ASP.Net 4.0
Objective URL Routing is new feature in ASP.Net 4.0. This article will give a walkthrough on how to work with URL Routing and an introduction of that. URL Routing ASP.Net 4.0 URL Routing enables mapping between search engines optimized URL to physical web Form pages. For example http://localhost:36774/Products/All URL will be mapped to http://localhost:36774/AllProduct.aspx HereContinueContinue reading “Step by Step walk Through on URL routing in ASP.Net 4.0”
Select and SelectMany: LINQ projection operator
Projection transforms the query result into the form defined by the developer. There are two projection operators in LINQ Let us say, there is a class And a function returning List<Student> as below, Select operator Below query will return name and roll number of all the students. Output Below query will project name of theContinueContinue reading “Select and SelectMany: LINQ projection operator”
Learning Video on LINQ to SQL Class
Source Code using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication9 { class Program { static void Main(string[] args) { StudentDemoDataContext context = new StudentDemoDataContext(); #region Reterive //Reteriving all the Records foreach (var r in context.Students) { Console.WriteLine(r.Name + r.Subject); } #endregion #region Insert Student std = new Student { RollNumber = “8”, NameContinueContinue reading “Learning Video on LINQ to SQL Class”
Basic of C#: Call Stack, Call Site and Stack unwinding
Objective In this article, I will explain three basic terms of C# 1. Call Stack 2. Call Site 3. Stack Unwinding Let us say, you got the below code Program.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication7 { class Program { static void Main(string[] args) { Method1(); Console.Read(); } static void Method1()ContinueContinue reading “Basic of C#: Call Stack, Call Site and Stack unwinding”
Basics of C#: Checked and Unchecked Conversions
Objective In this article, I will discuss about Checked and unchecked keyword and conversions in C#. Consider the below code Program.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication7 { class Program { static void Main(string[] args) { int number = int.MaxValue; number = number + 1; Console.WriteLine(number); Console.Read(); } } } Now,ContinueContinue reading “Basics of C#: Checked and Unchecked Conversions”
WebServiceHost : Hosting a WCF REST Service
Objective In this article, I will explain 1. What is WebServiceHost Factory class? 2. What is its function? 3. Where to use it? 4. One sample on hosting WCF REST Service using WebServiceHost. What is WebServiceHost factory? 1. This is useful to host WCF REST End points. 2. This is derived from ServiceHost. 3. WebServiceHostContinueContinue reading “WebServiceHost : Hosting a WCF REST Service”
LINQ with IIS sites and web Applications
Objective In this article, we will see how to work with LINQ against IIS. Before applying LINQ against IIS sites and application pool, we need to set up the environment. Follow the bellows steps to do this. Step 1 Down load Microsoft.Web.Administration.dll and save to a particular directory. I am saving it in D driveContinueContinue reading “LINQ with IIS sites and web Applications”
CollectionDataContract Attribute in WCF
This article is part # 2 of custom collection in WCF Objective In this article, I will explain you what is CollectionDataContract Attribute in WCF and why need it? I strongly recommend you to read custom collection in WCF first. Why we need it? If you notice when we expose a custom collection, it mustContinueContinue reading “CollectionDataContract Attribute in WCF”
Working with Custom collection in WCF
Objective In this article, I will show you 1. How to create custom collection 2. How to use them in WCF Service 3. How to consume at client side Before reading this article, I recommend you to read my article Collection in WCF Create a custom collection 1. Right click on WCF project and addContinueContinue reading “Working with Custom collection in WCF”