要添加的角色 资源文件 来源:\Portals\_default\DotNetNuke.template
<roles>
    <role>
      <rolename>Administrators</rolename>
      <description>Portal Administration</description>
      <billingfrequency />
      <servicefee>-3.40282347E+38</servicefee>
      <trialfrequency />
      <trialperiod>-1</trialperiod>
      <billingperiod>-1</billingperiod>
      <trialfee>-3.40282347E+38</trialfee>
      <ispublic>false</ispublic>
      <autoassignment>false</autoassignment>
      <roletype>adminrole</roletype>
    </role>
    <role>
      <rolename>Registered Users</rolename>
      <description>Registered Users</description>
      <billingfrequency />
      <servicefee>-3.40282347E+38</servicefee>
      <trialfrequency />
      <trialperiod>-1</trialperiod>
      <billingperiod>-1</billingperiod>
      <trialfee>-3.40282347E+38</trialfee>
      <ispublic>false</ispublic>
      <autoassignment>true</autoassignment>
      <roletype>registeredrole</roletype>
    </role>
    <role>
      <rolename>Subscribers</rolename>
      <description>A public role for portal subscriptions</description>
      <billingfrequency />
      <servicefee>-3.40282347E+38</servicefee>
      <trialfrequency />
      <trialperiod>-1</trialperiod>
      <billingperiod>-1</billingperiod>
      <trialfee>-3.40282347E+38</trialfee>
      <ispublic>true</ispublic>
      <autoassignment>true</autoassignment>
      <roletype>subscriberrole</roletype>
    </role>
  </roles>


添加角色脚本 来源:\Providers\DataProviders\SqlDataProvider\01.00.00.SqlDataProvider
/* Insert scripts for table: [dbo].[Roles] */
PRINT 'Inserting rows into table: [dbo].[Roles]'

SET IDENTITY_INSERT [dbo].[Roles] ON

INSERT INTO [dbo].[Roles] ([RoleID], [PortalID], [RoleName], [Description], [ServiceFee], [BillingFrequency], [TrialPeriod], [TrialFrequency]) VALUES (0, 0, 'Administrators', 'Portal Administration', NULL, '4', NULL, NULL)
GO
INSERT INTO [dbo].[Roles] ([RoleID], [PortalID], [RoleName], [Description], [ServiceFee], [BillingFrequency], [TrialPeriod], [TrialFrequency]) VALUES (11, 0, 'Registered Users', 'Registered Users', NULL, '0', NULL, NULL)
GO

SET IDENTITY_INSERT [dbo].[Roles] OFF

有事,先写到这里