Hi everybody,

I am using the following code in ASP.NET:

VB Code:
  1. Dim vApplication As SQLDMO.Application, _
  2.             vServerGroup As SQLDMO.ServerGroup, vServer As SQLDMO.RegisteredServer
  3.  
  4.             For Each vServerGroup In vApplication.ServerGroups
  5.                 For Each vServer In vServerGroup.RegisteredServers
  6.                 Next
  7.             Next

The outer loop is not entered and when I checked ServerGroups.Count in Debug mode, it showed a value of 0. However, the same code works in VB 6.0. What is the solution to this problem?