开发者

Authenticate with SharePoint's authenticate.asxm web service

开发者 https://www.devze.com 2023-01-02 15:46 出处:网络
I am trying to authenticate with the sharepoint authenticate web service in an account I have. I get an error saying NotInFormsAuthenticationMode.

I am trying to authenticate with the sharepoint authenticate web service in an account I have. I get an error saying NotInFormsAuthenticationMode.

How do I change it from forms to none or windows?

开发者_JAVA百科

I tried with: myReference.Authentication auth = new myReference.Authentication(); myReference.AuthenticationMode = myReference.AuthenticationMode.None;

but it says myReference.AuthenticationMode is a type. which is not valid in the given context.

Suggestions?

Any help is appreciated.


Your sharepoint server needs to be modified...

See steps 5, 6 and 7 here: simple-talk.com/dotnet/windows-forms/configuring-forms-authentication-in-sharepoint-2007/

This is all done in central administration.

Normally in other asp.net applications you would do this through the web.config to look something like this:

<!-- Web.config file -->
<system.web>
   <authentication mode="Forms">
      <forms forms="401kApp" loginUrl="/login.aspx" />
   </authentication>
</system.web>

Edit: Alright, if you cant change windows authentication then you need to change the way you're authenticating. If impersonate is enabled in the authentication of the sharepoint site than you can programatically impersonate a user.

See http://msdn.microsoft.com/en-us/library/ms998351.aspx ("Impersonating by using LogonUser")

0

精彩评论

暂无评论...
验证码 换一张
取 消