Ich arbeite mit dem Core Service auf SDL Tridion 2011 und verbinde den Client-Computer mit dem Tridion-Server. Ich bekomme einen Fehler, während ich versuche, es auszuführen.Fehler beim Zugriff auf den Core Service von einem Client-Computer
Beispielcode
namespace coreservice1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
using (ChannelFactory<ISessionAwareCoreService> factory = new ChannelFactory<ISessionAwareCoreService>("wsHttp_2011"))
{
ISessionAwareCoreService client = factory.CreateChannel();
ComponentData comp = (ComponentData)client.Create(component, new ReadOptions());
...
//steps to create component
}
}
catch (Exception ex)
{
Response.Write(ex.StackTrace);
Response.Write("exception is " + ex.Message);
}
}
}
}
Meine web.config für die wsHttp_2011 ist
<wsHttpBinding>
<binding name="wsHttp" transactionFlow="true" maxReceivedMessageSize="10485760">
<readerQuotas maxStringContentLength="10485760" maxArrayLength="10485760"/>
<security mode="Message">
<message clientCredentialType="Windows"/>
</security>
<endpoint name="wsHttp_2011" address="http://serveraddress:1000/webservices/CoreService2011.svc/wsHttp" binding="wsHttpBinding" bindingConfiguration="wsHttp" contract="Tridion.ContentManager.CoreService.Client.ISessionAwareCoreService">
<identity>
<dns value="serveraddress"/>
</identity>
</endpoint>
Fehler:
Server Error in '/' Application.
________________________________________
Could not load file or assembly 'Tridion.Logging' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
Mein Client-Code wird referrring zu Tridion.Logging. Diese Assembly existiert in meinem Code. Unabhängig von seiner Existenz bekomme ich den Fehler. Und die DLL-Versionen, auf die ich im Client-Code verweise, sind genau dieselben wie auf dem Server.
Kann jemand helfen, was alle Änderungen, die ich tun muss?
Ich habe auch die Ereignisprotokolle in tridion Server überprüft. Ich habe dort kein Logbuch gefunden.
Der Code funktionierte einwandfrei, wenn er auf dem Server ausgeführt wurde.
Protokolle der Ereignisanzeige sind wie folgt von der Client-Maschine:
ConfigurationErrorsException
Could not load file or assembly 'Tridion.Logging, Version=6.1.0.25, Culture=neutral, PublicKeyToken=ddfc895746e5ee6b' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() at System.Web.Compilation.BuildManager.CallPreStartInitMethods() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) Could not load file or assembly 'Tridion.Logging, Version=6.1.0.25, Culture=neutral, PublicKeyToken=ddfc895746e5ee6b' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) Could not load file or assembly 'Tridion.Logging' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() at System.Web.Compilation.BuildManager.CallPreStartInitMethods() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
ich fand kein Ereignis im Protokoll auf dem Server.
Ausnahme Sie sehen, ist es auf dem Client auf der Serverseite? Siehst du irgendetwas im Ereignisprotokoll? Können Sie angeben, welches Betriebssystem und welche Architektur Sie verwenden? Verwenden Sie Service-Referenz oder CoreService.dll? Ist Ihr Client auf demselben Computer wie der Server? –
Ich verwende CoreService.dll. Mein Client ist nicht derselbe wie der Server. Es ist anders. – Patan
mit Tridion.ContentManager.CoreService.Client; mit Tridion.ContentManager.ContentManagement.Fields; mit Tridion.ContentManager.CommunicationManagement; mit Tridion.ContentManager.ContentManagement; mit System.Text; mit Tridion.ContentManager.CoreService; mit System.ServiceModel.Channels; mit System.IO; mit System.Collections; mit System.Text.RegularExpressions; – Patan