ndimov


Hi all,
first, I'm sorry for my basic english, I'm from Argentina so it's not my native language.
I have to solve aa very weird situation.
I must do a "manual" login from inside a web part.
The following scenario is what I have:

The user log into sharepoint site with a generic user (the site has annonymous access, to allow this behaviour)
From my custom webpart I can get valid user credentials to log into sharepoint, so, then I want to "do" de login (change the current user) from inside the webpart.

Was I clear
Thank you !







Re: Force login inside Custom Sharepoint WebPart (manual login)

SharePointing


So you want the rest of the session to work under these newly logged on rights

Are these Domain Accounts If not (SQL Membership Provider, etc..) you will have to configure the site for that auth provider in the web config to program against the membership provider, etc...

Sounds like you have anonymous access turned on, as far as SharePoint is concerned, you will always be the user defined as the anonymous user in IIS. The easiest way that I know to accomplish this woul dbe to configure Forms Based Authentication and just get the users to log in the standard way.

My Two Cents.






Re: Force login inside Custom Sharepoint WebPart (manual login)

ndimov

Hi Steve, Thanks for your answer.

Its very hard to explain what I am trying to do.
I will try again.

Forget all I tell you previously.

What I am trying to do, is the following:

" Manually log a user in sharepoint inside a web part " , I mean, do it by coding a custom web part to do this.
The authentication method could be anyone, but may allow me to do what I want.
In the previous post I mistake my explanation.. The site has no annonymous access, because in that case will be impossible change the logged user. I'm sorry about that.

Imagine that you login in sharepoint web site with your user (eg: username: steve, pass: steve)
so, an inital page is display who have a custom webpart which is a form to submit a user and a password.
USER:___________
PASS:___________
| Submit |

Here is the key:
You are now logged in, but with my custom web part I want to change the currrent logged user (you) and log a new user (when you press the submit button).
But this acction I wanna do it inside the custom form WebPart who submit the user and password and DO the login in sharepoint for new user.
I want to know if this is possible.

Thanks !
You can call me crazy if you want !
Good Bye!