【发布时间】:2015-11-07 20:53:56
【问题描述】:
我正在做一个内容迁移项目,从Ektron 9到EpiServer 8,第一个任务是迁移特定页面的内容,为了实现这一点,我正在遵循Ektron's API指导Ektron Developer API
1- 我正在以正确的方式处理此迁移?现在我刚刚在我的应用程序中添加了 Ektron Dll 作为参考。我尝试使用他们的网络服务,但它没有我需要的数据(特定页面的内容)。Ektron Web Services
这是我的代码的 sn-p:
GetAllTemplatesRequest cc = new GetAllTemplatesRequest();
//var UserCRUD = new Ektron.Cms.Framework.User.UserManager();
var UserCRUD = new UserManager();
string Token = UserCRUD.Authenticate("admin", "password");
if (!string.IsNullOrEmpty(Token)) // Success
{
try
{
//Create the Content Object set to observe permissions
Ektron.Cms.Framework.Content.ContentManager ContentAPI
= new Ektron.Cms.Framework.Content.ContentManager(ApiAccessMode.Admin);
//Retrieve the content
Ektron.Cms.ContentData contentData;
contentData = ContentAPI.GetItem(30);
//Output the retrieved item's content
var cs = contentData.Html;
}
catch (Exception _e)
{
throw _e;
}
}
else // Fail
{
}
【问题讨论】: