background preloader

ASP.NET

Facebook Twitter

Windows Communication Foundation FAQ quick starter Part 1. Updated with links to WCF-Part 2, WPF, WWF, WCF Tracing FAQ, 8 steps to enable Windows authentication on WCF BasicHttpBinding, difference between BasicHttpBinding and WsHttpBinding, WCF FAQ Part 3 – 10 security related FAQ, SilverLight FAQ Part 1 and Part 2, One-Many and One-One relationship using LINQ to SQL. Introduction In this section we will run through a quick FAQ for WCF. I am sure after reading this you will get a good understanding of the fundamentals of WCF.

Watch my 500 videos on various topics like design patterns, WCF, WWF, WPF, LINQ, Silverlight, UML, SharePoint, Azure, VSTS, and a lot more @ here, you can also catch me on my trainings @ here>. Enjoy… What is .NET 3.0? In one simple equation .NET 3.0 = .NET 2.0 + Windows Communication Foundation + Windows Presentation Foundation + Windows Workflow Foundation + Windows Card Space. What is Windows Card Space? It was previously known by its codename Info Card. What is WCF? NET remoting MSMQ Web services COM+ WCF is based on SOA. A low-level Look at the ASP.NET Architecture. This article looks at how Web requests flow through the ASP.NET framework from a very low level perspective, from Web Server, through ISAPI all the way up the request handler and your code. See what happens behind the scenes and stop thinking of ASP.NET as a black box.

By Rick Strahlwww.west-wind.comrstrahl@west-wind.com Last Update: August 24, 2008 Other Links: Download Examples for this articleLeave a Comment or Question ASP.NET is a powerful platform for building Web applications, that provides a tremendous amount of flexibility and power for building just about any kind of Web application. To me understanding the innards of a platform always provides certain satisfaction and level of comfort, as well as insight that helps to write better applications. Most people using ASP.NET are familiar with WebForms and WebServices.

However, ASP.NET provides much more flexibility from a lower level. What is ASP.NET Let’s start with a simple definition: What is ASP.NET? From Browser to ASP.NET. .NET Best Practice No: 3:- Using performance counters to gather performance data. Updated with links of .NET Best Practice No: 1, 2, 4, 5, and Video .NET Best Practice No: 3:- Using performance counters to gather performance data Is this Article worth reading ahead ?

This article discusses how we can use performance counter to gather data from an application. So we will first understand the fundamentals and then we will see a simple example from which we will collect some performance data. Introduction: - My application performance is the best like a rocket J Let us start this article by a small chat between customer and developer. Scenario 1 Customer: - How’s your application performance? Scenario 2Customer: - How’s your application performance? I am sure the second developer looks more promising than the first developer. Please feel free to download my free 500 question and answer eBook which covers .NET , ASP.NET , SQL Server , WCF , WPF , WWF@ Courtesy :- Thanks Javier and Michael Performance counters are not magicians.

Remote IIS Debugging : Debug your ASP.NET Application which is hosted on "Remote IIS Server" Table of Content Background : In the last month I have published an article on Debugging of ASP.NET Application that hosted on IIS server using process attaché. And I have got a very good response from all the readers, specially Yankee Imperialist Dog! , Pete O'Hanlon, Dr.Luiji , Manas Bhardwaj and many others . And they have suggested me for a follow up article on IIS Remote debugging. Thanks to all of them for their feedback and giving me another opportunity to write an article.

Introduction : Before starting with this article, I will request you to read my previous article Debug Your ASP.NET Application that Hosted on IIS : Process Attach and Identify which process to attach . Now coming back to this article, this article is all about the IIS remote debugging. Visual Studio Debugging Features for ASP.NET We can have three different way to debug our application from Visual Studio. Visual Studio Internal Debugger Local IIS Debugging Remote IIS Debugging Local IIS Debugging : Summary : ASP.NET Internals: Request Architecture. Beginner's Guide : Exploring IIS 6.0 With ASP.NET.

Table of Contents Introduction In the past, I have written a few articles for beginners and had got a very good response from all readers. This time I have planned to write an article on IIS 6.0 and Integration of IIS with ASP.NET. I have worked on IIS 5.1, IIS 6.0, and IIS 7.0. What is a Web Server Visual Studio has its own ASP.NET engine which is responsible for running your web application so you don't have any problems running an ASP.NET application from the VS IDE. IIS Server Overview The first client will make a request to the web server (IIS), the web server checks the request and will pass the request to the ASP.NET Process (don't get confused here, I have explained the details), the ASP.NET process engine will process the request and pass the response to the client via the web server.

Introduction to IIS Overview of IIS Internet Information Server is one of the most powerful web servers provided by Microsoft that is able to host and run your web applications. How to Install IIS 6.0. A Beginner's Guide to ASP.NET Application Folders. Table of Contents Introduction First of all I would like to thank Sean Ewington for his article Beginner's Walk - Web Development, which gives me a great opportunity to write an article for beginners on ASP.NET web development here on CodeProject. After writing articles on caching and view state for beginners, I have decided to write an article for beginners on the ASP.NET Application Folders. However, I will be back with another article on rest of state management. Like my other articles, I believe this will also give you very good idea on the Application Folders. Please give your valuable suggestions and ideas for improvement that I can incorporate into this article, as well as my future articles.

Overview - ASP.NET Application Folders ASP.NET 2.0 uses a file-based approach. We can add as many as files and folders as we like (according to our requirements) within our solutions,and it won't be necessary to recompile them each and every time they are added. App_Code Folder Bin Folder E.g. Simple Windows Service Sample. Introduction As a matter of fact Microsoft Windows services, formerly known as NT services enable you to create long-running executable applications that run in its own Windows session, which then has the ability to start automatically when the computer boots and also can be manually paused, stopped or even restarted. This makes services ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer.

You can also run services in the security context of a specific user account that is different from the logged-on user or the default computer account. Windows services don’t have any interface to the user, so it can not be debugged like any regular application, but it’s debugged as a process. .NET has a very nice tool that enables processes debugging while it’s in the run status, by easily pressing Ctrl + Alt + P shortcut. Background Using the code Click the designer. Set the Name property to MyNewService. Common IIS + ASP.NET Issues. Ajax Update Progress: Modified - Bryan Sampica. Problem: Depending on your design, it may or may not work to have your atlas progress rendering inline with your other content. This is actually kind of a pain. My situation included a gridview being rendered that may require the user to scroll, clicking a paging link at the bottom. Clicking this link triggers the update progress template at the TOP of the page - But does almost nothing to inform the user who has now scrolled down and doesn't see it.

We need a way to inform the user that an Ajax panel is getting data from the server, and is actually doing anything. Solution: Enter JavaScript - yea I know what you're saying. Concept: We are going to declare a DIV inside the progress template. Ok - so lets get started eh? For this example, I'm going to return a DateTime string, and set it to the label in my page. Go ahead and get your page setup like this to get us started. You can get some free Ajax Update type animated GIFS from this site. Exception Handling Best Practices in .NET. Contents Introduction "My software never fails". Can you believe it? I'm almost hearing you all, screaming that I'm a liar.

"Software that never fails is something near to impossible! " Contrary to common belief, creating reliable, robust software is not something near to impossible. In other words, software that is stable. Having a bug in your software is forgivable, and even expected. To understand better what I'm saying, I've seen countless business software that, in an out of disk space error in the DBMS, reports something like this: "Could not update customer details. While this message may be an adequate of reporting an unknown resource failure to a business user, all too often this is the whole debugging information that is available to debug the error cause. Plan for the worst A few basic design concepts will make your program much more robust, and will improve the user experience in the presence of an unexpected error.

Check it early Don't trust external data Writes can fail, too. Explained: Forms Authentication in ASP.NET 2.0. MSDN Library patterns & practices Retired Solution Development Fundamentals Security Security Guidance for Applications Explained Explained: Forms Authentication in ASP.NET 2.0 Explained: Windows Authentication in ASP.NET 2.0 44 out of 59 rated this helpful - Rate this topic Explained: Forms Authentication in ASP.NET 2.0 patterns & practices Developer Center J.D.

Microsoft Corporation November 2005 Applies To ASP.NET version 2.0 Summary This module explains how forms authentication works in ASP.NET version 2.0. Contents ObjectivesOverviewIIS AuthenticationASP.NET Forms AuthenticationCookieless Forms AuthenticationMembership and Login ControlsWeb Farm ScenariosAdditional Resources Objectives Learn how forms authentication works in ASP.NET version 2.0.

Overview Forms authentication uses an authentication ticket that is created when a user logs on to a site, and then it tracks the user throughout the site. IIS Authentication ASP.NET authentication is a two-step process. ASP.NET Forms Authentication Figure 1. Best Practices No 5: - Detecting .NET application memory leaks. Download source code - 34 KB Table of contents Improve garbage collector performance using finalize/dispose pattern Introduction Memory leaks in .NET applications have always been a programmer’s nightmare.

Please feel free to download my free 500 questions and answers eBook which covers .NET , ASP.NET, SQL Server, WCF, WPF, WWF @ Avoid task manager to detect memory leaks The first and foremost task is to confirm that there is a memory leak. First let’s try to understand how the Task Manager memory information is misleading. So the working set memory can be bigger in amount than the actual memory used. Using private bytes performance counters to detect memory leak In order to get the right amount of memory consumed by the application we need to track the private bytes consumed by the application. Below are the steps we need to follow to track private bytes in an application using performance counters: Start your application which has memory leaks and keep it running.

Web User Control in Asp.Net - Asp.Net, C#, SQL Blog. Getting started with Web User Control in Asp.net and lets explain it easy step by step. What is Web User Control? A Web User Control, is a Web Form. You can say it as a web form, which can be placed on multiple web form and can be reused. Example of Web User Control in Asp.NetYou can use Web User Control to create to display User Status. i.e. based on whether user is logged-in or not display him appropriate message. If use is logged-in display "Welcome UserName" And if not than display message "Welcome Guest". Extension of Web User Control in Asp.netUI File: .ascx (Like Web form Compiled First time when WebPage is requested.)Class File: .ascx.cs (Like Component Precompiled File, so it can improve performance) Difference between Web Form and Web User ControlUser Control are used within Web Form and do not contain the following HTML Tags.

Step1: Create Asp.net Website Project Step2: Add User Control as shown in figure. Select "Web User Control" from New Item Window and name it "ucImageViewer" ASP.NET Performance Overview. The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location. Performance can be a key factor in a successful Web site or project. This topic provides guidelines for improving performance of a site as well as links to best practices documentation. The following guidelines suggest ways to work with ASP.NET pages and controls efficiently. The following guidelines suggest ways to make state management efficient. The following guidelines suggest ways to make data access in your application efficient. The following guidelines suggest ways to make Web applications as a whole work efficiently.

Why do ASP.NET AJAX page methods have to be static? - Encosia. Dozens of variations on the title of this post are some of the most common searches that bring people here to Encosia. Unfortunately, the search engines all point to a post that doesn’t answer the question. It’s also a frequent question raised on the ASP.NET message boards, typically without a satisfactory answer provided. However, it is an important question, the answer to which is important to understand. So, in an attempt to fill in this gap for the searchers and perhaps preemptively help others, I want to proceed to answer it as thoroughly as possible without overly complicating the whole business. In order to do this, we’ll have to take a brief tour of WebForms, including: Understanding what the Page class is, and why we have it.One specific thing that the Page class does for us.How this is accomplished, behind the scenes.What the static keyword entails, when used with a method.Finally, why page methods must be static.

Understanding what the Page class is, and why we have it Conclusion. ASP.Net 2.0 - Master Pages: Tips, Tricks, and Traps. Master pages are a great addition to the ASP.NET feature set. Master pages help us build consistent and maintainable user interfaces. Master pages, however, are not without their quirks. Sometimes master page behavior is surprising, and indeed the very name master page can be a bit misleading. In this article, we are going to examine some of the common problems developers run into when using master pages, and demonstrate some practical advice for making effective use of master pages. To make use of master pages, we first need to understand how master pages work. When a web request arrives for an ASP.NET web form using a master page, the content page (.aspx) and master page (.master) merge their content together to produce a single page. The master page contains some common elements, like a head tag. The web form contains a single Content control, which in turn is the proud parent of a Label.

Protectedvoid Page_Load(object sender, EventArgs e){ MasterPageFile = "~/foo";} using System; Working with the ASP.NET Global.asax file.