I've created a portals group in order to share content between them.
All work fine but for some mudules the copy of the module shared is only visible to admin user, for all user I'm no able to show it because if I go in module settings I'm no able to set view permission for all users. When update I receive an exception:
Error: is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException:
Impossibile inserire la riga di chiave duplicata nell'oggetto
'dbo.ModulePermission' con indice univoco 'IX_ModulePermission_Roles'.Il
valore della chiave duplicata è (-1, 656, 1).
L'istruzione è stata interrotta. --->
System.Data.SqlClient.SqlException: Impossibile inserire la riga di
chiave duplicata nell'oggetto 'dbo.ModulePermission' con indice univoco
'IX_ModulePermission_Roles'.Il valore della chiave duplicata è (-1, 656,
1).
L'istruzione è stata interrotta.
at System.Data.SqlClient.SqlConnection. (SqlException
exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection. (SqlException
exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString)
at
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader
ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method, TaskCompletionSource`1 completion, Int32 timeout, Task&
task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at PetaPoco.Database.ExecuteScalar[T](String sql, Object[] args)
at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteScalar[T](String
connectionString, CommandType type, Int32 timeout, String sql, Object[]
args)
at DotNetNuke.Data.SqlDataProvider.ExecuteScalar[T](String
procedureName, Object[] commandParameters)
at DotNetNuke.Data.DataProvider.AddModulePermission(Int32 moduleId,
Int32 portalId, Int32 permissionId, Int32 roleId, Boolean allowAccess,
Int32 userId, Int32 createdByUserId)
at
DotNetNuke.Security.Permissions.PermissionProvider.SaveModulePermissions(ModuleInfo
module)
at
DotNetNuke.Security.Permissions.ModulePermissionController.SaveModulePermissions(ModuleInfo
module)
at
DotNetNuke.Entities.Modules.ModuleController.UpdateModule(ModuleInfo
module)
at
DotNetNuke.Modules.Admin.Modules.ModuleSettingsPage.OnUpdateClick(Object
sender, EventArgs e)
--- End of inner exception stack trace ---
Any Idea to solve?