I have a website "A" that is password protected with credentials stored in the DB and another website "B" with a single set of credentials stored in the web.config. I would like to give access to site B to the users of site A after they login. I know I should change the way the credentials are handled in site "B" and manage one set of shared credentials for both sites but I am wondering if there is a way to access site "B" from site "A" with a link without having to recode the access credentials logic of site"B". Is it possible to pass the credentials within the link between two asp.net websites?
2 Answers
It is possible to use sign sign on credentials. You need to set machinekeys in the Config to be the same as a start. You should then be able to share auth tickets IIRC.
Have a read through this.

- 722
- 4
- 15
-
Thank you. It looks quite interesting. I will study the reference. – FeliceM Nov 14 '13 at 20:19
I suppose that what you ask cannot be done. Site B wants to check the user's credentials in order to provide him with the respective priveleges (this is the meaning of authentication). This is not possible if site B does not have access to the credentials repository of A.
On the other hand, if B has access to the A's users repositoty, you could just use it for users to authenticate directly in site B, building the respective functionality in site B. If A is using normal ASP.NET membership API, this should be fairly easy. Otherwise, you could implement your own membership API provider, using any kind of custom credentials repository. You could check this for ASP.NET Membership API.
Hope I helped!

- 5,293
- 5
- 21
- 36
-
Thanks but as I said in my question, before I start coding the access logic of site B I like to investigate on alternatives. Otherwise I could simply rebuild the access on site B and share the same database of site A for credentials. The answer from ThelTGuy could be a viable alternative. – FeliceM Nov 14 '13 at 20:42