Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error with security tables
Message
De
02/07/2007 08:43:04
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Error with security tables
Divers
Thread ID:
01237105
Message ID:
01237105
Vues:
65
Hi,

Not shaping up to be a good morning.
I:
Ran the MMSecurity.SQL against the Northwind database.
Set the 'SecurityEnbled' key to true in app.config.
Logged in to the sample app using the 'MM' user.
Checked the 'Security Setup' menu item.
Opened the 'Employees' form and clicked the security icon against the 'Phone' textbox.
Changed the Access level for the MM user to 'Read-only' and clicked OK.
Got the following error:

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_UserSecurity_Security". The conflict occurred in database "Northwind", table "dbo.Security", column 'SecurityPK'.
The statement has been terminated.

I'll start digging to try to identify what went wrong but it would be nice if this just worked 'out of the box'

UPDATE: Worked out the problem here. The txtPhone control ships with a ControlID already configured but there's no matching entry generated in the Security table. Guess you should either remove the GUID from the textbox or change the script to add the required row but at the end of the day this still seems a bit fragile - far too easy to end up with a ControlId somewhere with no matching table entry.....

Regards,
Viv
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform