与SharePoint的authenticate.asxm网络服务身份验证 [英] Authenticate with SharePoint's authenticate.asxm web service
问题描述
我想用一个帐号我对SharePoint验证Web服务进行身份验证。
我得到一个错误说NotInFormsAuthenticationMode。
I am trying to authenticate with the sharepoint authenticate web service in an account I have. I get an error saying NotInFormsAuthenticationMode.
我要如何改变它从形式到无或Windows?
How do I change it from forms to none or windows?
我试着用:
myReference.Authentication AUTH =新myReference.Authentication();
myReference.AuthenticationMode = myReference.AuthenticationMode.None;
I tried with: myReference.Authentication auth = new myReference.Authentication(); myReference.AuthenticationMode = myReference.AuthenticationMode.None;
但它说myReference.AuthenticationMode是一个类型。这不是在给定的上下文中有效
but it says myReference.AuthenticationMode is a type. which is not valid in the given context.
建议?
任何帮助是AP preciated。
Any help is appreciated.
推荐答案
您SharePoint服务器需要进行修改...
Your sharepoint server needs to be modified...
请参阅步骤5,6和7的位置:
simple-talk.com/dotnet/windows-forms/configuring-forms-authentication-in-sharepoint-2007 /
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.
通常在其他asp.net应用程序,你会做这样通过web.config中看起来像这样:
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>
编辑:
好吧,如果你不能改变Windows身份验证,那么你需要改变你的身份验证方式。如果冒充在SharePoint网站比你可以通过编程模拟用户的认证功能。
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.
请参阅 http://msdn.microsoft.com/en-us/library /ms998351.aspx (通过使用LogonUser的假冒)
See http://msdn.microsoft.com/en-us/library/ms998351.aspx ("Impersonating by using LogonUser")
这篇关于与SharePoint的authenticate.asxm网络服务身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!