我有一个C#dll.代码如下:
public class Calculate
{
public static int GetResult(int arg1, int arg2)
{
return arg1 + arg2;
}
public static string GetResult(string arg1, string arg2)
{
return arg1 + " " + arg2;
}
public static float GetResult(float arg1, float arg2)
{
return arg1 + arg2;
}
public Calculate()
{
}
}
Run Code Online (Sandbox Code Playgroud)
现在,我打算C++通过这种方式调用这个dll .
[DllImport("CalculationC.dll",EntryPoint="Calculate", CallingConvention=CallingConvention::ThisCall)]
extern void Calculate();
[DllImport("CalculationC.dll",EntryPoint="GetResult", CallingConvention=CallingConvention::ThisCall)]
extern int GetResult(int arg1, int arg2);
Run Code Online (Sandbox Code Playgroud)
这是函数,其中称为GetResult
private: System::Void CalculateResult(int arg1, int arg2)
{
int …Run Code Online (Sandbox Code Playgroud) 来自行星Tridion的所有人类的一个大"嗨":).
我正在尝试在SDL Tridion UI 2012中编辑组件链接.
我有一个组件包含多值组件链接作为字段之一.
当我在DWT中放下后
<!-- TemplateBeginRepeat name="componentLink" -->
<!-- TemplateBeginIf cond="TemplateRepeatIndex<3" -->
<li>
<a href="#" tridion:href="@@RenderComponentField(FieldPath+"componentLink",TemplateRepeatIndex)@@">
Link${TemplateRepeatIndex}
</a>
</li>
<!-- TemplateEndIf -->
<!-- TemplateEndRepeat -->
Run Code Online (Sandbox Code Playgroud)
在Template Builder中,我得到了以下内容:
<li><a href="#" tridion:href="<tcdl:ComponentField name="componentLink" index="0">tcm:8-625</tcdl:ComponentField>">Link0</a></li>
<li><a href="#" tridion:href="<tcdl:ComponentField name="componentLink" index="1">tcm:8-626</tcdl:ComponentField>">Link1</a></li>
<li><a href="#" tridion:href="<tcdl:ComponentField name="componentLink" index="2">tcm:8-627</tcdl:ComponentField>">Link2</a></li>
Run Code Online (Sandbox Code Playgroud)
正如预期的那样,页面级别的"默认完成操作"出现错误
无法找到tridion的正确值:href
是否需要在以前的某个操作中提取C#TBB中的组件链接,或者以任何其他方式解决此问题(为SDL Tridion UI启用组件链接)?
我正在尝试在某些测试(默认)页面上建立新的SDL Tridion UI 2012功能.尽管我多次点击"更新预览",但我不断检索"此页面的预览不是最新"警告.我正在使用虚拟图像,所以除了我自己以外,其他任何人都无法编辑页面.无论哪个组成部分发生变化 我在"会话预览"Web服务端查看了cd_core.log文件,发现这些节点很有趣:
INFO WritableODataClaimProcessor - No session wrapper is installed, not allowing modification operations
DEBUG HandleSessionContentUtil - There are no session wrappers into storage config file!
DEBUG HandleSessionContentUtil - There are no session wrappers into storage config file!
DEBUG WebContext - setCurrentClaimStore: com.tridion.siteedit.preview.PreviewClaimStore@dc60af, thread: Thread-59
DEBUG WritableODataClaimProcessor - Removing sessionId claim from ClaimStore!
DEBUG ClaimStore - remove: uri=taf:claim:contentdelivery:webservice:preview:sessionid
DEBUG WebContext - setCurrentClaimStore: null, thread: Thread-59
Run Code Online (Sandbox Code Playgroud)
最有趣的部分是会话包装器被添加到"会话预览"Web服务端的cd_storage_conf.xml中.Bellow是"会话预览"cd_storage_conf.xml的一部分:
<Storages>
<Wrappers>
<Wrapper Name="SessionWrapper">
<Timeout>120000</Timeout>
<Storage Type="persistence" Id="sqlServerDb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
<Pool …Run Code Online (Sandbox Code Playgroud) 我无法使用CoreService SessionAwareCoreServiceClient删除任何项目.我能够创建/读取组件,创建文件夹...... 作为一个错误,我得到"对象引用未设置为对象的实例".我想请注意,我在Tridion Content Manager机器之外的应用程序中使用核心服务.以下是来自CM服务器的日志:
用户:NT AUTHORITY\NETWORK SERVICE
StackTrace信息详细信息:位于Tridion.UGC.EventHandler.UGCEventHandler.DeleteItemStats(TcmUri tcm)的Tridion.UGC.EventHandler.UGCEventHandler.GetDataSourcesForTCM(String [] tcm)
在System的System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo方法,Object target,Object []参数,SignatureStruct&sig,MethodAttributes methodAttributes,RuntimeType typeOwner)中的Tridion.UGC.EventHandler.UGCEventHandler.HandlerForComitted(IdentifiableObject subject,DeleteEventArgs args,EventPhases阶段). System.Reflection.RuntimeMethodInfo.Invoke中的RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo方法,Object目标,Object []参数,Signature sig,MethodAttributes methodAttributes,RuntimeType typeOwner)(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化,在Tridion.ContentManager.Extensibility.EventSubscription.DeliverEvent(IEnumerable)的System.Delegate.DynamicInvokeImpl(Object [] args)处的布尔值skipVisibilityChecks)1 subjects, TcmEventArgs eventArgs, EventPhases phase) at Tridion.ContentManager.Extensibility.EventSystem.DeliverEvent(IEnumerable1受试者,TcmEventArgs EventArgs的,EventDeliveryPhase deliveryPhase)
在Tridion.ContentManager.Extensibility.EventSystem.DeliverEvent(IdentifiableObject受试者,TcmEventArgs EventArgs的,EventDeliveryPhase deliveryPhase)
在Tridion.ContentManager.IdentifiableObject.Delete(DeleteEventArgs deleteEventArgs)在Tridion.ContentManager.IdentifiableObject.Delete( )在Tridion.ContentManager.CoreService.CoreServiceBase.Delete(String id)
在SyncInvokeDelete(Object,Object [],Object [])上的System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(对象实例,对象[]输入,对象[]和输出)在Tridion.ContentManager.CoreService.TransactionSupportInvoker.Invoke(Object实例,对象[]输入,对象[]和输出)在System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&rpc)的System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&rpc)处于System.ServiceModel.Dispatcher.ImmutableDispatchRuntime. ProcessMessage41(MessageRpc&rpc)位于System.ServiceModel的System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&rpc),位于System.ServiceModel的System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&rpc).位于System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&rpc)的System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&rpc)上的Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&rpc),位于System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&rpc) )在System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)rpc)at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)rpc)at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
使用已使用的帐户,我可以手动删除项目,这意味着我拥有正确的权限.任何帮助/建议都不仅仅是可用的......
_client = new SessionAwareCoreServiceClient("wsHttp_2011");
bool useWindowsCredentials = bool.Parse(Environment.EnvironmentUserSettings.UseWindowsCredentials);
var credentials = CredentialCache.DefaultNetworkCredentials;
if (!useWindowsCredentials)
{
string password=Environment.EnvironmentUserSettings.Password;
credentials = new NetworkCredential(Environment.EnvironmentUserSettings.UserName, …Run Code Online (Sandbox Code Playgroud)