Author: kostat
Date: 2006-09-10 10:42:58 -0400 (Sun, 10 Sep 2006)
New Revision: 65173

Modified:
   
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web.Security/ChangeLog
   
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web.Security/SqlRoleProvider.cs
Log:
throw on empty connection string

Modified: 
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web.Security/ChangeLog
===================================================================
--- 
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web.Security/ChangeLog
    2006-09-10 14:12:02 UTC (rev 65172)
+++ 
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web.Security/ChangeLog
    2006-09-10 14:42:58 UTC (rev 65173)
@@ -1,3 +1,7 @@
+2006-09-10 Konstantin Triger <[EMAIL PROTECTED]>
+
+       * SqlRoleProvider.cs: throw on empty connection string.
+
 2006-09-26 Vladimir Krasnov <[EMAIL PROTECTED]>
 
        * Membership.cs: fixed GetAllUsers, typo bug

Modified: 
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web.Security/SqlRoleProvider.cs
===================================================================
--- 
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web.Security/SqlRoleProvider.cs
   2006-09-10 14:12:02 UTC (rev 65172)
+++ 
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web.Security/SqlRoleProvider.cs
   2006-09-10 14:42:58 UTC (rev 65173)
@@ -307,7 +307,9 @@
                        // XXX check connectionStringName and commandTimeout
 
                        connectionString = 
WebConfigurationManager.ConnectionStrings [connectionStringName];
-                       factory = connectionString == null || 
String.IsNullOrEmpty (connectionString.ProviderName) ?
+                       if (connectionString == null)
+                               throw new ProviderException (String.Format("The 
connection name '{0}' was not found in the applications configuration or the 
connection string is empty.", connectionStringName));
+                       factory = String.IsNullOrEmpty 
(connectionString.ProviderName) ?
                                System.Data.SqlClient.SqlClientFactory.Instance 
:
                                ProvidersHelper.GetDbProviderFactory 
(connectionString.ProviderName);
                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to