简体   繁体   English

如何通过Ektron CMS400.NET Web服务API创建新的成员资格用户?

[英]How to create a new membership user via Ektron CMS400.NET web service API?

I am attempting to create new membership users in an Ektron CMS400.NET-based website by through calls to the User web service API from a remote site. 我试图通过从远程站点调用用户Web服务API在基于Ektron CMS400.NET的网站中创建新的成员身份用户。 One of the methods I intend to utilize, AddMembershipUser has a remark in the documentation indicating "A user with administrator privileges must be logged in to perform this operation.". 我打算使用的一种方法, AddMembershipUser在文档中有一个备注,指示“必须登录具有管理员特权的用户才能执行此操作”。 I am already providing the necessary credentials via the AuthenticationHeaderValue object for calling the web service remotely. 我已经通过AuthenticationHeaderValue对象提供了必要的凭据,以便远程调用Web服务。 I have also made a call to the LogInUser method, to login one of my admin users, and this appears to be working. 我还调用了LogInUser方法,以登录我的一个管理员用户,这似乎正在起作用。 The point at which I am stuck is figuring out how to execute the call to AddMembershipUser as the admin user whom I just logged in. I have requests out to Ektron support, and have been searching both the forums and documentation, but have yet to find any answers. 我遇到的问题是弄清楚如何以我刚刚登录的管理员用户身份执行对AddMembershipUser的调用。我已经请求Ektron支持,并且一直在搜索论坛和文档,但尚未找到任何答案。

Does anyone have examples of calling web service API methods as a programmatically logged in user, from a remote server? 有没有人有从远程服务器以编程方式登录用户调用Web服务API方法的示例?

I've done this with Ektron 6.13,6.15,6.18,7.03 and 7.04, in each version they radically changed/broke the API in many different and interesting ways. 我已经使用Ektron 6.13、6.15、6.18、7.03和7.04做到了这一点,在每个版本中,它们都以许多不同且有趣的方式从根本上更改了/破坏了API。 I can give you an answer for each of those versions, but my advice is to put a membership control on a page and use that to create a user while logging the SQL that happens with SQL profiler (also any other logging/inspection techniques you can think of). 我可以为您提供每个版本的答案,但我的建议是在页面上放置一个成员资格控件,并在记录SQL事件探查器发生的SQL时使用该控件创建用户(也可以使用任何其他日志记录/检查技术)考虑到)。 Then try the API methods and see how the API is doing it and compare the two, there's usually huge differences in the versions I've experienced. 然后尝试API方法,查看API的工作方式,然后将两者进行比较,我所体验的版本通常会有巨大差异。 For most of the cases I've had to deal with, I've had to let the API do its partial job and then go directly to the database to update the record correctly. 在大多数情况下,我不得不让API进行部分工作,然后直接进入数据库以正确更新记录。

From what I can make of their documentation you should be able to make the call as long as you path the login credentials via the AuthenicationheaderValue object. 根据我对他们的文档的了解,只要您通过AuthenicationheaderValue对象设置登录凭据的路径,就应该可以进行呼叫。 You might need to call login first as well, it is possible they are tracking session on their side somehow. 您可能还需要先致电登录,否则他们可能会以某种方式跟踪他们的会话。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM