Fenja
04-28-2009, 08:50 AM
Hi. Im trying whole day to solve one problem. So I would really apriciate if somenone knows the answer.
My flex 3 application is working upon Sharepoint services. So, I need to recognize which user is logged on SPS so user will not have to log on my application also.
I found some code for .NET webservice like this:
SPWeb web = SPControl.GetContextWeb(Context);
SPUser sUser = web.CurrentUser;
return sUser.LoginName;
Thing is that web will always be NULL?!?!
Then I found that I need to set credentials, but I dont understand how and where. Im not so good programmer, so can somebody give me full sulution for this? (webservice method + flex 3 code with credentials thing:))
Thanks.
My flex 3 application is working upon Sharepoint services. So, I need to recognize which user is logged on SPS so user will not have to log on my application also.
I found some code for .NET webservice like this:
SPWeb web = SPControl.GetContextWeb(Context);
SPUser sUser = web.CurrentUser;
return sUser.LoginName;
Thing is that web will always be NULL?!?!
Then I found that I need to set credentials, but I dont understand how and where. Im not so good programmer, so can somebody give me full sulution for this? (webservice method + flex 3 code with credentials thing:))
Thanks.