Tuesday, April 01, 2014

IaaS, PaaS and SaaS Terms Explained

Easy to Understand one-word descriptions of each term (i.e. IaaS means host)

Data Visualization of Vendor Management Responsibility of Services
IaaS - the unit you are gaining is a computer/server. Therefore IaaS is essentially a “physical server box”. An example of this would be going to RackSpace or SoftLayer and leasing a physical box from them. The vendor manages the networking, hard drives (if they fail), hardware of the box, virtualization O/S (if the box is virtualized). You can remote desktop to the box and you manage everything else (shown in the screenshot above). Windows Azure provides IaaS in the form the VM Role (you upload a Windows Server 2008 R2 image and manage the server yourself). PaaS - the unit you are gaining is an application/framework. Therefore PaaS is a “hosted application/framework/tools that you can leverage to build something on. That application is configured on IIS/SQL Server etc and runs on a hardware/virtual system that the vendor manages. An example of PaaS would be Windows Azure (excluding the VM Role) services like web role, worker role, Reporting Services etc. SaaS - the unit you are gaining is business functionality. For example, Gmail is a type of a SaaS mail provider because you don’t have to manage any service yourself and its all done by the vendor (Google in this example).

Saturday, May 18, 2013

MVC - Message Handler

Code to log message received or send from Web API:

 using System;  
 using System.Diagnostics;  
 using System.Net.Http;  
 using System.Text;  
 using System.Threading;  
 using System.Threading.Tasks;  
 namespace Program.Api.Web.ActionFilters  
 {  
   /// <br />  
 <br />  
 <summary>  
   /// Class to log the request/response received from the client  
   /// </summary>  
   public abstract class MessageHandler : DelegatingHandler  
   {  
     protected override async Task<httpresponsemessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)  
     {  
       var corrId = string.Format("{0}{1}", DateTime.Now.Ticks, Thread.CurrentThread.ManagedThreadId);  
       var requestInfo = string.Format("{0} {1}", request.Method, request.RequestUri);  
       var requestMessage = await request.Content.ReadAsByteArrayAsync();  
       await IncommingMessageAsync(corrId, requestInfo, requestMessage);  
       var response = await base.SendAsync(request, cancellationToken);  
       byte[] responseMessage;  
       if (response.IsSuccessStatusCode)  
         responseMessage = await response.Content.ReadAsByteArrayAsync();  
       else  
         responseMessage = Encoding.UTF8.GetBytes(response.ReasonPhrase);  
       await OutgoingMessageAsync(corrId, requestInfo, responseMessage);  
       return response;  
     }  
     protected abstract Task IncommingMessageAsync(string correlationId, string requestInfo, byte[] message);  
     protected abstract Task OutgoingMessageAsync(string correlationId, string requestInfo, byte[] message);  
   }  
   /// <summary>  
   /// The logger class which will log to the database or text file  
   /// </summary>  
   public class MessageLoggingHandler : MessageHandler  
   {  
     protected override async Task IncommingMessageAsync(string correlationId, string requestInfo, byte[] message)  
     {  
       if(WebConfig.LogMessages) // Based on web.config property  
       await Task.Run(() =&gt;  
         Trace.WriteLine(string.Format("{0} - Request: {1}\r\n{2}", correlationId, requestInfo, Encoding.UTF8.GetString(message))));  
     }  
     protected override async Task OutgoingMessageAsync(string correlationId, string requestInfo, byte[] message)  
     {  
       if (WebConfig.LogMessages)  
       await Task.Run(() =&gt;  
         Trace.WriteLine(string.Format("{0} - Response: {1}\r\n{2}", correlationId, requestInfo, Encoding.UTF8.GetString(message))));  
     }  
   }  
 }  

Monday, December 17, 2012

Passed TOGAF 9 Foundation Exam

Passed my TOGAF 9 foundation exam after months of reading and practice. Glad to see 97% pass mark...

Monday, October 17, 2011

XSLT Rendering–SharePoint 2010 Web Parts

 

One of the main areas of investment when developing Web Parts is the user interface and the output of (X)HTML code. A Web Part needs to merge transparently into an existing page (Web Part Page or Wiki Page), adhering to the rich and user-friendly layout of the hosting site, which can be a public CMS solution. Nevertheless, the output of the Web Parts can be defined in its CreateChildControls method or, for Visual Web Parts, in the ASCX code of the corresponding visual control. However, you cannot always predict where the Web Part will be hosted; thus, you cannot provide a layout that will be appropriate for
every kind of output.

Of course, you can try to satisfy different layout requirements by just working with Cascading Style Sheets (CSS), but in general, there’s no one-size-fits-all solution. This is an issue that Microsoft had to face when developing SharePoint itself.

Consider how Web Parts such as the SearchCoreResults or the XsltListViewWebPart render their output, to name but a couple of
examples. These native Web Parts accept an XSLT transformation as one of their main parameters and apply that transformation to an XML document that represents the real content of their output.


Often, in real SharePoint solutions that target not only intranet/extranet sites but also public Internet scenarios, you will need to develop custom Web Parts that follow these same basic principles.


This technique is truly powerful because it lets you define a completely custom layout for Web Parts while still sharing common business logic and behavior, but it doesn’t impose any specific constraints about the (X)HTML code to output, so it’s often your best choice in realworld SharePoint Internet solutions.

Sunday, October 16, 2011

Passed Exam 70-667: TS: Microsoft SharePoint 2010, Configuring

 

Last week, I finally gave the 70-667 exam and passed with 750 marks. The exam was not as easy one would expect. The toughest part were multiple questions where you need to arrange the steps of configuration. I was knowing what all involve in configuration but arranging them in proper steps were bit hard.

So, here is my 1 cent advise on anyone who wants to sit this exam-

  • Go through Wiley Publishing - MCTS Microsoft® SharePoint® 2010 Configuration Study Guide. Follow each step on a test SharePoint Virtual machine
  • Use MeasureUp or other exams and make sure to go through the explanation

If you follow these thoroughly, I am pretty confident that you will be able to pass this exam..ALL the best.

Friday, September 30, 2011

Explanation - Microsoft.SharePoint.SPException: The security validation for this page is invalid.

 

SharePoint applies a security check whenever you change data through the Server Object Model during HTTP requests. In fact, by default, SharePoint web forms use a form digest control to enforce security. The form digest is a hidden field POSTed by SharePoint webforms and checked by the security infrastructure on the server. When you make changes to objects by using the Server Object Model during an HTTP GET request, this input field will be missing, so by default SharePoint will throw an exception that looks like this excerpt:


Microsoft.SharePoint.SPException: The security validation for this page is invalid.


Similarly, if you send an HTTP POST request with a missing or invalid form digest value, you will receive the same error. This behavior applies only during HTTP requests. Therefore, when you reference the Server Object Model in a class library or a batch tool that runs outside of the ASP.NET pipeline, the security check will not occur. In fact, the check process looks for the
HttpContext.Current variable; if it is null the digest validation will not occur.


With that in mind, if you are developing a webpage that will respond to HTTP GET requests, or a custom web form page that doesn’t inherit from the WebPartPage type and doesn’t use the Form Digest control, you will need to instruct SharePoint to skip the digest validation;otherwise, your code will not work.


To instruct SharePoint to skip the validation, set the Boolean AllowUnsafeUpdates property of the current SPSite or SPWeb to true.

Conversely, when you develop a custom ASPX page, and you want to exploit the security environment provided by SharePoint, you have a couple of choices: you can inherit from WebPartPage, or manually include a FormDigest control in your page.

In the first case you simply need to inherit from the Microsoft.SharePoint.WebPartPages.WebPartPage base class, which internally renders a FormDigest control. Then, in your code, you call the utility method SPUtility.ValidateFormDigest() to check the digest when you POST the page back to the server.

In the latter case you need to include the Microsoft.SharePoint.WebControls.FormDigest control in your page(s), and you still need to invoke the SPUtility.ValidateFormDigest() method to check the digest.

Saturday, August 06, 2011

Handling exception in SharePoint Client Object Model

 

If you use normal try … catch … finally blocks to handle exceptions in Client Object model, you will need to invoke the server via ExecuteQuery three times(one for each situation). This could lead to performance degradation as well as to a huge stress on the server side. Luckily the Client Object Model provides a class named ExceptionHandlingScope that is specifically defined to support such situations and avoid executing multiple queries against the server.

Refer sample from http://msdn.microsoft.com/en-us/library/ee534976.aspx



ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection");            

ExceptionHandlingScope scope = new ExceptionHandlingScope(clientContext);

using (scope.StartScope())
{
using (scope.StartTry())
{
List oList = clientContext.Web.Lists.GetByTitle("My List");
oList.Description = "In Try Block";
oList.Update();
}

using (scope.StartCatch())
{
// Assume that if there's an exception, it can only be
// because there is no list with the specified title, so
// create the list.
ListCreationInformation listCreateInfo = new ListCreationInformation();
listCreateInfo.Title = "My List";
listCreateInfo.Description = "In Catch Block";
listCreateInfo.TemplateType = (int)ListTemplateType.Announcements;
List oList = clientContext.Web.Lists.Add(listCreateInfo);
}

using (scope.StartFinally())
{
List oList = clientContext.Web.Lists.GetByTitle("My List");
oList.EnableFolderCreation = true;
oList.Update();
}
}

clientContext.ExecuteQuery();




Explanation:



Under the cover, the ExceptionHandlingScope instance collects activities (internally called ClientAction) to execute on the server side for all the three situations (try, catch, finally). The server will begin executing the code inside the StartTry block, and then in case of failure, it will execute the code in the StartCatch. Whether or not exceptions occurred in the StartTry

block, it will finally execute the code in the StartFinally block. However, the request sent to the server is just one, as well as the response.

Wednesday, June 29, 2011

Read SharePoint 2010 List item using Web Service

 

This sample uses the GetList operation of the Lists.asmx service to retrieve the configuration of the target list to query. It then loads the items of the list by using the GetListItems operation,providing a default query over the default view of the list.

String targetListName = "News";
String baseUrl = "http://local/_vti_bin/";
Lists wsLists = new Lists();
wsLists.Url = baseUrl + "Lists.asmx";
wsLists.Credentials = System.Net.CredentialCache.DefaultCredentials;
XElement listMetadata = XElement.Load(new XmlNodeReader(wsLists.GetList(targetListName)));
Guid targetListId = new Guid(listMetadata.Attribute("ID").Value);
XmlNode listItemsXmlNode = wsLists.GetListItems( targetListId.ToString(), // ID of the target list
String.Empty, // ID of the view or String.Empty for default view
null, // CAML query or null
null, // ViewFields or null
"200", // RowLimit as a string
null, // Query options
null // ID of the web site or null for root website
);

XElement listItemsXml = XElement.Load(new XmlNodeReader(listItemsXmlNode));
var xmlItems = from x in listItemsXml.Descendants("{#RowsetSchema}row")
select x;
foreach (XElement xmlItem in xmlItems) {
Console.WriteLine("{0} - {1}",
xmlItem.Attribute("ows_ID").Value,
xmlItem.Attribute("ows_Title").Value);
}

 

Both of the operations we invoked (Lists.GetList and SiteData.GetListItems) return a result in the form of XML; in fact, we use classes of LINQ to XML to read and parse them. While working with SharePoint SOAP services, you will need to be accustomed to managing different kinds of results, because it is common for XML results to be presented in various ways (XmlNode, String, arrays of custom types, and so on).

Tuesday, June 21, 2011

Main OOTB Services Published by SharePoint 2010

 

Alerts.asmx

Allows listing and deleting alerts subscriptions for users.


Authentication.asmx

Provides an operation for logging on to a SharePoint site that uses FBA. The Login operation returns a cookie that should be used in all subsequent calls to other services.


Lists.asmx

Provides operations to work with lists, content-types, list items, and files. For example, this service offers operations to check-in and check-out a file in a document library, or to query list data using CAML queries.


SiteData.asmx

Allows reading sites, webs, lists, and items. SiteData.asmx targets external search engines willing to crawl contents of a SharePoint site.


Sites.asmx

Allows creating, deleting, reading, exporting, and importing of SharePoint websites.


Webs.asmx

Provides operations to manage content-types, site columns, and features of a SharePoint website


Search.asmx

A service that allows querying the search engine of SharePoint Server.

Tuesday, May 31, 2011

Sample–Using ECMAScript Client Object Model

 

Below is a sample application page which uses ECMAScript client object model to retrieve a List instance and show its Title property.

<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>


<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ECMAScriptDemoPage.aspx.cs" Inherits="ECMAScriptDemo.Layouts.ECMAScriptDemoPage" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<SharePoint:ScriptLink ID="SPScriptLink" runat="server" LoadAfterUI="true" Localizable="false" Name="SP.js" />

<script language="javascript" type="text/javascript">
var clientContext;
var web;
var oContactsList;
function onQuerySucceeded(sender, args) {
alert('Title of the List: ' + this.oContactsList.get_title());
}

function onQueryFailed(sender, args) {
alert('Request failed ' + args.get_message() + '\n' + args.get_stackTrace());
}

function retrieveContacts() {


this.clientContext = new SP.ClientContext.get_current();
this.web = this.clientContext.get_web();
this.oContactsList = this.web.get_lists().getByTitle("News");
this.clientContext.load(this.oContactsList);
this.clientContext.executeQueryAsync(
Function.createDelegate(this, this.onQuerySucceeded),
Function.createDelegate(this, this.onQueryFailed));


}

</script>
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<input type="button" onclick="retrieveContacts()"
value="Click me to get the list!" />
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
ECMAScript Object Model Demo Page
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
ECMAScript Object Model Demo Page
</asp:Content>

Saturday, May 07, 2011

Retrieving SharePoint List data in blocks

 

To reduce the impact on the sever, you could use SPQuery object’s RowLimit property to get data from SharePoint list in blocks.

The below code shows how one could get data in block of 10s-

SPList list = web.Lists["News"];
SPQuery query = new SPQuery();
// Define the query
query.Query = "<Where><Contains><FieldRef Name=\"Title\" />
<Value Type=\"Text\">San</Value></Contains></Where>";


// Define the maximum number of results for each page (like a SELECT TOP)
query.RowLimit = 5;


do {
SPListItemCollection items = list.GetItems(query);
foreach (SPListItem item in items) {
}
// Set current position to make SPQuery able to set the start item of the next page
query.ListItemCollectionPosition = items.ListItemCollectionPosition;
} while (query.ListItemCollectionPosition != null);

The ListItemCollectionPosition property is of type SPListItemCollectionPosition. It offers a PagingInfo property of type String, which contains the following data:
Paged=TRUE&p_ID=10


The _ID is the unique identifier of the last item retrieved so that SharePoint can know the starting position of the next page.

Friday, April 29, 2011

Unexpected Behavior of LINQ to SharePoint

 

When using LINQ to SharePoint to query items in list folder and the folder path is invalid, the query seems to return item from all the folders recursively Sad smile

When using LINQ to SharePoint inside PageMethods, the code need to be run under elevated permissions Sad smile

Thursday, March 24, 2011

LINQ to SharePoint code under elevated permission

 

Use the following code to run your code under elevated permission…

string url = SPContext.Current.Site.Url;
HttpContext backupCtxt = HttpContext.Current;
try
{
    if (SPContext.Current != null) HttpContext.Current = null;
    SPSecurity.RunWithElevatedPrivileges(delegate()
    {
        using (SPSite sc = new SPSite(url))
        {
            using (SPWeb web = sc.OpenWeb())
            {
                HttpRequest httpRequest = new HttpRequest("", web.Url, "");
                HttpContext.Current = new HttpContext(httpRequest, new HttpResponse(new System.IO.StringWriter()));
                using (MyDataContext dc = new MyDataContext(web.Url))
                {

                          // YOUR CODE
 
                }
            }
        }
    });
}
catch
{
    throw;
}
finally
{
    if (SPContext.Current == null)
        HttpContext.Current = backupCtxt;
}

The one thing to note is that as SPContext is recreated, you will not be able to refer this in YOUR CODE. Also, any function which is called from YOUR CODE should also not use SPContext object.

Tuesday, October 12, 2010

7 free .net books for Programmers and Architects.

Foundations Of Programming

The Foundation Of Programming Series Free e-book By Karl Seguin is one of my favorites. It is simple, short and sweet. Especially for ‘casual’ programmers, this will give a better thought process – that’ll definitely enable them to code better and think better. This book covers the ALT.NET Philosophy, Domain Driven Development concepts, DI, TDD etc in a nice way. This book is close to my heart.

Microsoft Application Architecture Guide, 2nd Edition

Published by Microsoft, this is an essential read for any Microsoft.NET developer or Architect to understand the underlying architecture and design principles and patterns for developing successful solutions on the Microsoft platform and the .NET Framework. This guide neatly covers popular architecture patterns, best practices and common challenges you need to understand for developing .NET applications. Get a good grip on developing enterprise applications in .NET.

Rob Miles C# Yellow Book 2010

A nice action packed book that takes you through C# and .NET concepts. This book explains C# language and .NET library in general – with a clear focus on implementation thought process and best practices.

Threading in C#

A short, neatly written book from Joe Albahari about Threading in C#. This is a must read for any .NET programmer to understand more about threading in general, thread pooling, synchronization, Non blocking synchronization, etc. In this book, Joe even covers the Parallel Framework Extensions and Parallel programming in .NET

Improving .NET Application Performance and Scalability

This guide is again from Microsoft, and focuses on designing your applications with Performance and scalability in mind. It has sections relevant to architects, developers, testers, and administrators. Following the checklists and guidance in this book will ensure that there won’t be any unpleasant surprises in the end. Read this guide if you develop Enterprise applications in .NET

Applying Design Patterns

This is a quick introduction towards the thought process of applying design patterns. The objective of the book is to introduce design patterns in a simple way, so that developers can understand some common patterns and how to apply them. I wrote that some time back ;)

RefCardz from DZone

DZone has a number of awesome Ref Cardz (Quick reference sheets) on multiple technologies. You can go to DZone –> RefCardz to browse and download them (after getting a free DZone Id). Here are some of my recent favorites

 

Happy learning

Thursday, July 15, 2010

Understanding and Positioning of SharePoint Server 2010 for Technical Pre-Sales Professionals Course Completed

 

Finally managed to complete this pre-sales course and got certificate of completion from Microsoft Partner Academy…

Sunday, April 18, 2010

Fix for error Sql server 2005 reporting service add-in setup interrupted

 

To use Report Viewer web part in SharePoint 2007 64-bit environment, you need to install SQL Server 2005 Add-in. I downloaded the setup from Microsoft site and ran the MSI - “SharePointRSx64”.msi. The setup failed with the error as “sql server 2005 reporting service add-in setup interrupted”.  If you are having this issue, follow these steps:

  1. Open the command window (Start>Run type cmd and press enter)
  2. Navigate to the path where the installer (SharePointRSx64.msi) is stored
  3. Execute SharePointRSx64.msi SKIPCA=1 
  4. CD to %temp%. Look for rsCustomAction.exe. If not found, browse to the parent directory
  5. Execute rsCustomAction.exe /i  to auto-configure the installed files.

Once the installation will finish, you will be able to see the Reporting Integration section in Central Administration.

Wednesday, April 07, 2010

Presentation on Service Applications in SharePoint 2010

 

Check the slide show presented by me to Melbourne SharePoint user group on Service applications in SharePoint 2010

Presentation Link

 

Thursday, March 11, 2010

Running Hyper-V Disk Images on Windows 7

 

On Windows 7 you could install Virtual PC 64 bit but unable to run a 64 Bit guest operating systems. This is quite frustrating as you could not use Hyper-V VHD provided by Microsoft on Windows 7. The lack of Microsoft virtualization application lead us to use Sun VirtualBox.

VirtualBox includes support for 64-bit guest operating systems and applications. VirtualBox supports Windows 7 as a host OS. It also has no licensing costs as it is freely available as Open Source Software under the terms of the GNU General Public License. Another important feature is that VirtualBox natively supports Microsoft Hyper-V virtual disk image files (.VHD). This feature allows us to take a virtual machine built with Hyper-V and use it on a portable machine such as a laptop or desktop computer.

 

Download VirtualBox Binaries

Sun VirtualBox is available via download from the site http://www.virtualbox.org

Create a VirtualBox Virtual Machine

Creating a new virtual machine (VM) is performed by launching the New Virtual Machine Wizard.

  • Name the VM and select the OS Type as appropriate. The OS Version selected must indicate (64 bit). If you are unable to select a version with (64 bit), this likely means the CPU in your host is not 64 bit. You will not be able to run a 64 bit guest if the host CPU is not 64 bit. If you are running Windows 2008 R2 guest, select Windows 2008 (64 bit).

  • Select an appropriate memory allocation. The recommendation for a SharePoint 2010 server is 4096. Be sure to leave adequate memory for the host OS.

  • When configuring the disk, you need to specify the existing .VHD file. Click the icon to launch the Virtual Media Manager and add the existing .VHD.

  • After completing the wizard, click Settings to make a few adjustments:

    • Select the appropriate Network setting – see the VM Guest Network Configuration section below for guidance

    • It is suggested to disable Audio

Start the VM and Install the Guest Additions

After first starting the VM guest, it is strongly recommended to install the VirtualBox Guest Additions to improve performance and enable mouse/keyboard transitions between host and guest.

  • Click Start to launch the VM guest

  • Login to the VM (the CTRL + ALT + DELETE key sequence is RIGHT CTRL + DELETE)

  • If you need to release the mouse, press RIGHT + CTRL

  • At this time, ignore error messages indicating failure to load device drivers (installing the Guest Additions will take resolve these failures)

  • When prompted to restart the computer to apply changes, click Restart Now

  • Login again

  • Install the Guest Additions by clicking Devices, Install Guest Additions… (or pressing RIGHT + CTRL + D). When prompted, select Run VBoxWindowsAdditions.exe. Accept all defaults and accept prompts to install Sun Microsystems device drivers.

  • Restart when prompted

  • Login again

  • If desired, adjust the display resolution

  • If you have Internet connectivity, run Windows Update and install the latest security updates

  • Adjust the time zone as appropriate

Wednesday, March 10, 2010

Office 2010 and SharePoint 2010 planned for launched on 12th May

Watch Stephen Elop, President of the Microsoft Business Division, announce the launch of Office 2010 and SharePoint 2010 on May 12, 2010 at 11 a.m. EST. The live keynote focuses on the next wave of productivity that delivers:

End user productivity across the PC, phone and browser
IT choice and flexibility
A platform for developers to build innovative solutions
Join the virtual launch event with Microsoft executives, product developers, partners and customers to:

Find out how peers and partners are already seeing benefits to their business by leveraging the next wave of productivity.
Submit your questions through live Q&A.
Participate via blogs, tweets, social media networks, commenting, and more.
View on-demand breakout sessions showing how Office 2010 and SharePoint 2010 meet the unique challenges people and businesses are faced with today, and provide the solutions they need for tomorrow.

http://sharepoint.microsoft.com/businessproductivity/proof/pages/2010-launch-events.aspx#fbid=DI4gkPybuyL

Friday, February 26, 2010

Application variables empty in classic ASP when deployed on IIS 7.0

 

Last week, I went back in time when one of my friend asked me to help on his site developed in classic ASP. He wanted to deploy this on IIS 7.0 and was getting all his Application variables empty. First, I thought there will be one more global.asa in one of parent directory. But there was no other global.asa file and the worst part was all session variables were working. Finally, I was able to fix this by converting the site from Virtual directory to an Application in IIS 7.0.

So, to make your classic ASP site which is using Application variables work with IIS 7.0, deploy it as an application and not virtual directory. Glad ASP.NET came :-)