从控制台应用程序使用 EPiServer 社区 API?
我想编写一个与 EPiServer 数据库交互的控制台或 winforms 应用程序。因为我不想在数据库的深处搞乱,所以我想使用 EPiServer API。
但是,所有示例都使用“CommunitySystem.CurrentContext”,在网站外部运行时该“CommunitySystem.CurrentContext”为空。
现在,我要将大量数据从遗留系统传输到 EpiServer Community,我真的不想从网页执行此操作,而是从我有更多控制权的应用程序执行此操作。
有什么方法可以从 Web 上下文之外使用 API 吗?
I'd like to write a console or winforms application that will interact with the EPiServer database. Since I don't want to muck about in the deep inards of the database I'd like to use the EPiServer API.
However, all the examples are using the "CommunitySystem.CurrentContext" which is null when running outside the website.
Now, I'm going to transfer a large amount of data from a legacy system to EpiServer Community and I really don't want to do that from a web page but from an application I have a little more control of.
Is there any way I can use the API from outside the web context?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我对社区模式不太熟悉。但是...我通过网络表单(或控件)运行大量导入没有任何问题。关键(除了禁用执行和数据库超时之外)是通过站点服务器上的 Internet Explorer 运行它,并将站点的域名映射到 HOSTS 文件中的 127.0.0.1。它可以运行数小时,同时在发送响应之前将进度记录到表或文本文件中。
I'm not that familiar with the community model. But... I've had no problems at all running huge imports through a web form (or control). The key (besides having disabled execution and database timeouts) has been to run it through Internet Explorer on the site's server and have the site's domain name mapped to 127.0.0.1 in the HOSTS-file. It can run for hours and hours while logging progress to a table or text-file before sending the response.
我的同事 Jarle 弄清楚了最后一点,在此处记录了整个过程 因此,如果您想在 IIS 之外运行 EPiServer API,那就从这里开始。效果就像一个魅力!
My colleague Jarle figured out the last bits and blogged the whole process here So if you want to run the EPiServer API outside of IIS, that's the place to start. Works like a charm!