Last post Jul 25, 2008 02:30 PM by strungmind88
Jul 25, 2008 01:41 PM|deanh|LINK
I have seen countless amounts of information on this and can not seem to find anyone trying to do this within an Intranet environment, using only Active Directory (Windows) Authentication. There is no need to create separate user accounts within the aspnetdb,
infact I am not even sure I need the aspnetdb if I am not going to use the Forms Authentication. I have gotten everything to work with Windows Authentication up until I push the "Finish" button on posting a new ad. I get this error:
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Ads_Members". The conflict occurred in database "Classifieds", table "dbo.Members", column 'Id'.
The statement has been terminated.
I guess what I am looking for is probably fairly simple. Will the .cs pages need to be rewritten to reflect the fact that there is no need to use Forms Authentication?
After looking at the relationships between the tables it seems that I might be better off starting from scratch rather than using this app. I am just trying to get a simple Items For Sale area set up for in-house use only within our Domain.
Any help anyone can provide would be greatly appreciated.
Jul 25, 2008 01:46 PM|Jeev|LINK
Looks like a data issue and not an authentication issue. My guess is that you have a members table whose ID is a foreign key in the Ads. You are now trying to insert an ad for a member whose id does not exist in the members table.
Jul 25, 2008 01:54 PM|strungmind88|LINK
Could you give us an example of how you are inserting the value. The error you are getting is because you have a Foreign Key Restrains between classified and members or some similair table. You must first update the members table with a member with the
proper ID, and then from there use that members ID to insert the ad.
Jul 25, 2008 02:16 PM|deanh|LINK
I think that is where my problem is. I want to be able to have the members table auto populated with the "Domain\Username" of the individiual when they first go to the page. After that, it is just a check to make sure it doesn't put in a duplicate. But
the way all the code is written in the back end .cs pages, they are a lot of references to the aspnetdb stored procedures. I know this app was specifically written with Forms Authentication in mind, but it would be nice to get it to work on our Internal network
with out having folks register for it. They are already authenticated on the network, so no need to have them authenticate to this Web App again. I hope I am making sense. Been a long day!!!
Jul 25, 2008 02:30 PM|strungmind88|LINK
Here is a great little blog posting about windows authentication that I think would be of great interest to you...
Hope it helps,