Open GoogleCodeExporter opened 8 years ago
Did you try adding another entry to this with a different user and role name?
<userSettingTemplates cloneAnonProfileEnabled="true"
cloneRegisteredProfileEnabled="true">
<templates>
<clear />
<add key="anon_template" userName="anon_user@yourdomain.com"
password="changeme" roleNames="Guest" templateRoleName="Guest" />
<add key="registered_template" userName="reg_user@yourdomain.com"
password="changeme" roleNames="RegisteredUser"
templateRoleName="RegisteredUser" />
</templates>
</userSettingTemplates>
You can create different user, setup the page, and then use that user's ID here
as a
template.
Original comment by omaralzabir@gmail.com
on 30 Apr 2010 at 6:24
I tried adding another user template and ran setup.aspx but I get the error
below:
A referential integrity constraint violation occurred: A property that is a
part of referential integrity constraint cannot be changed when the object has
a non-temporary key.
in the file:
DropthingsDataContext2.cs
public void ApplyReferencePropertyChanges(
IEntityWithRelationships newEntity,
IEntityWithRelationships oldEntity)
{
foreach (var relatedEnd in oldEntity.RelationshipManager.GetAllRelatedEnds())
{
var oldRef = relatedEnd as EntityReference;
if (oldRef != null)
{
// this related end is a reference not a collection
var newRef = newEntity.RelationshipManager.GetRelatedEnd(oldRef.RelationshipName, oldRef.TargetRoleName) as EntityReference;
oldRef.EntityKey = newRef.EntityKey; <<< ERROR HERE
}
}
}
Original comment by b1ad...@gmail.com
on 4 Oct 2010 at 3:34
What's the newRef.EntityKey value and what's the newRef.TargetRoleName?
Original comment by omaralzabir@gmail.com
on 13 Dec 2010 at 2:41
newRef.EntityKey value > null
newRef.TargetRoleName > "aspnet_User"
Original comment by b1ad...@gmail.com
on 25 Jan 2011 at 3:31
from research I think the error is related in updating a foreign key which is a
primary key as well.
Original comment by b1ad...@gmail.com
on 25 Jan 2011 at 4:17
Original issue reported on code.google.com by
ravisoft...@gmail.com
on 27 Apr 2010 at 1:09