Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error with security tables
Message
From
02/07/2007 08:43:04
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error with security tables
Miscellaneous
Thread ID:
01237105
Message ID:
01237105
Views:
66
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
Next
Reply
Map
View

Click here to load this message in the networking platform