views:

642

answers:

1

The Sharepoint setup I am dealing with is as follows: - forms-authentication sharepoint server - with the users database stored on a remote sql server - we have a custom asp .net application put on tip of sharepoint, that is being run from the __layouts_ folder; the application gets all its content from a remote sql server (nothing to do with WSS_Content)

Basically, the user database is used only for permissions at the site level. But I need to use the same user credentials that have been used for logging in to the sharepoint web application when connecting to my remote sql server.

Is there a way to pass current sharepoint user credentials as sql server authentication login?

A: 

One way would be to write your on authentication provider which basiclly does the same thing as SQL Database authentication provider. In your custom authentication provider you should capture the user login information and then store to the web server session. You could then access it from session to do the sql server authentication.

Feels a bit hacky to me, but it should work.

JD