.NET Framework - Haarig! WCF Router mit Zertifikaten und MessageInspektor
Asked By jens d
19-May-10 10:01 AM

Hallo,
ich habe einen WCF Client und Service, welche per Nachrichten- oder
Transportsicherheit jeweils mit Zertifikaten verschl?sselt kommunizieren.
Jeder Nachricht wird mit einem Behavior ein zus?tzlicher Header
hinzugef?gt, in dem z.B. Sitzungsdaten enthalten sind.
Jetzt m?chte ich einen Router bauen (siehe hier:
http://bebugsblog.blogspot.com/2010/02/wcf-routing-service.html)
der aufgrund der Sitzungsdaten im Header ein Routing vornehmen kann und
gleichzeitig bei Ausfall eines Dienstes einen anderen anbieten kann.
(Falls es hier Links gibt, die mir Hinweise zum auslesen meines Headers
f?r das korrekte Routing bieten - bitte mit angeben! Danke!)
Ich habe inzw. nach dem obigen Beispiel einen Router implementiert, habe
aber nun das Problem, dass der Router scheinbar nicht mit dem Dienst
kommunizieren kann. Anfragen vom Client kommen aber an - dies kann ich
durch eine Konsolenausgabe bei der ReceiveRequest-Methode des Routers
und auch bei BeforeSendRequest sehen. Es kommt aber nichts beim Service an.
Ich habe keine Idee, woran es noch liegen k?nnte da ich die
Einstellungen f?r die direkte Kommunikation zwischen Client und Service
kopiert habe und auch keinen logischen Fehler finde..
BITTE HELFEN!
Fehlermeldung: {"The server did not provide a meaningful reply; this
might be caused by a contract mismatch, a premature session shutdown or
an internal server error."}
Hier die App.Config des Routers:
type="Company.ServiceModel.ServerMessageInspector, Company.ServiceModel,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
name="System.ServiceModel.Routing.RoutingService">
binding="netTcpBinding"
bindingConfiguration="SecNetTcpBinding" name="reqReplyEndpoint"
contract="System.ServiceModel.Routing.IRequestReplyRouter">
name="reqReplyEndpointMetadata"
contract="IMetadataExchange" />
baseAddress="net.tcp://appserver:9999/Company/Application" />
storeName="TrustedPeople"
x509FindType="FindBySubjectName" />
x509FindType="FindBySubjectName" />
filterTableName="FilterTable1" />
Windows Communication Foundation
(1)
BeforeSendRequest
(1)
WCF
(1)
ReceiveRequest
(1)
Header
(1)
Visual
(1)
Config
(1)
Service Station
(1)
Frank Dzaebel replied to jens d

Hallo Jens,
Naja, da gibt es nat?rlich einiges, aber da Du sagst.
eines Dienstes einen anderen anbieten kann."
sehe ich ja eigentlich eher eine <backupList> f?r Dich als angebracht,
die ich allerdings nicht in Deiner Konfiguration sehe.
[Videos]
[[What's new in WCF4] Routing Service - or: Look ma: Just one service to
talk to! - Christian Weyer's Blog]
http://weblogs.thinktecture.com/cweyer/2009/05/whats-new-in-wcf4-routing-service---or-look-ma-just-one-service-to-talk-to.html
[10-4 Episode 40: The New WCF Routing Service | 10-4 | Channel 9]
http://channel9.msdn.com/shows/10-4/10-4-Episode-40-The-New-WCF-Routing-Service/
[TechDays 2010 : What's new in WCF 4 | liese | Channel 9]
http://channel9.msdn.com/posts/liese/TechDays-2010--Whats-new-in-WCF-4/
[endpoint.tv - New in WCF 4 - System.ServiceModel.Routing | endpoint.tv |
Channel 9]
http://channel9.msdn.com/shows/Endpoint/endpointtv-New-in-WCF-4-SystemServiceModelRouting/
MSDN:
Alles unterhalb von:
[Routing]
http://msdn.microsoft.com/de-de/library/ee517421.aspx
[Routingdienst]
http://msdn.microsoft.com/de-de/library/ee517418.aspx
[<backupLists>]
http://msdn.microsoft.com/de-de/library/ee816883.aspx
[Vorgehensweise: Fehlerbehandlung]
http://msdn.microsoft.com/de-de/library/ee816886.aspx
------------------------------------------------------------------
Fiddler eignet sich da im Prinzip ganz gut.
Aber die Header sind doch aus den Unter-Eigenschaften
(zum Beispiel) des WCF-CLient-Proxies auslesbar ... etwa:
[Service Station: Erstellen eines WCF-Routers, Teil 2]
http://msdn.microsoft.com/de-de/magazine/cc546553.aspx#id0210053
Ansonsten sind Fragen dieses Themas nat?rlich
besser in spezialisierten Foren wie:
[Windows Communication Foundation Forum]
http://social.msdn.microsoft.com/Forums/en-US/wcf/threads
[Windows Communication Foundation (WCF) Forum]
http://social.msdn.microsoft.com/Forums/de-DE/wcfde/threads
aufgehoben.
--------------------------------------
ok, auch, wenn ich Deine WCF-Konfiguration jetzt nicht
100% (aus Zeitgr?nden) nachvollziehen kann, will ich Dir
ein paar Tips geben (und manches, was mir auffiel) , die man
auch recht allgemein in anderen WCF-Szenarien gelten, aber
f?r Dich hier dennoch zielf?hrend sein k?nnen.
**Zertifikate**
Wenn Du mit Zertifikaten arbeitest m?ssen die auf dem
Server auch installiert sein. Installieren tust Du die im
Entwickler-Szenario mit einem makecert-Befehl.
Unbedingt darauf achten, dass diese in "Trusted People"
(Vertrauensw?rdige Personen) landen ... manche Batch-
Beispiele aus der Doku oder in codeproject-Artikeln tun das
nicht richtig. Richtig sehen tust Du das Zertifikat normal am
besten ?ber die MMC (... Zertifikate-Snap-In hinzuf?gen).
**PeerTrust**
Vielleicht mal zun?chst mit [certificateValidationMode="None"] versuchen.
(das soll nicht hei?en, das es nicht funktioniert)
[WCF PeerTrust certificate configuration is not working properly]
http://social.msdn.microsoft.com/Forums/en/wcf/thread/6b2d6fca-7a0d-49e4-87ca-65e6b2529d4c
[Verwenden von Zertifikaten]
jens d replied to Frank Dzaebel
Hallo Frank,
danke f?r die Antwort.
Ich hab schon einige der Links angeschaut. Und der Router soll nachher
auch eine Backuplist bekommen - zun?chst wollte ich allerdings ?berhaupt
einen Zugriff hinbekommen..
Ich habe auf dem Server alle n?tigen Zertifikate installiert, daran kann
es leider nicht liegen.
ValidationMode = none hab ich eben auch probiert - gleiches Problem...
Ich schaue mir auch die anderen Foren an, aber wenn Dir noch etwas dazu
einf?llt, dann bitte nicht zur?ckhalten...
Danke
Jens
Am 19.05.2010 21:10, schrieb Frank Dzaebel:
jens d replied to Frank Dzaebel
Apropos Forums-Umstellung,
welches Forum ist das Pendant zu dieser Newsgroup?
MSDN.de-De.visualcsharpde?
LG
Jens
Am 19.05.2010 21:10, schrieb Frank Dzaebel:
FrankDzaebel replied to jens d
Hallo Jens,
Es kann ja jeder f=FCr sich selbst entscheiden,
aber offiziell:
[Visual C# Forum]
http://social.msdn.microsoft.com/Forums/de-DE/visualcsharpde/threads
Ansonsten Infos auch hier:
[Microsoft k=FCndigt Wechsel von Newsgroups (NNTP) zur Microsoft Foren-
Plattform an]
http://www.microsoft.com/germany/community/news/newsgroup_nntp_microsoft-fo=
ren.mspx
http://groups.google.de/group/microsoft.public.de.german.entwickler.dotnet.=
csharp/msg/2042adf3c47ec8a7
ciao Frank
--
Dipl.Inf. Frank Dzaebel [MCP/MVP C#]
http://Dzaebel.NET

Windows Communication Foundation - vb.net .NET Framework I have been teaching myself vb.net for a bit now suggest some books with good tutorials ? or some good online tutorials? Thanks Miro .NET Discussions Windows Communication Foundation (1) WCF (1) Visual (1) Louisiana (1) Lakewood (1) Avenue (1) Sorry, forgot to mention and includes, I hope, the details needed to introduce you to using WCF with both Windows Forms and ASPx, Web applications. Dick - - Richard Grier (Microsoft MVP - Visual Basic) Hard & Software 12962 for programming and other things and it should only be used when required? Miro keywords: Windows, Communication, Foundation, -, vb.net description: I have been teaching myself vb.net for a bit
Error installing .NET 3 .NET Framework When I try to install .NET 3 on a windows 2003 server R2 fresh machine (only SQL Server 2005 on it) I get an error. The error log contains [02 / 01 / 07, 12:39:58] Windows Communication Foundation: [2] Error: Installation failed for component Windows Communication Foundation. MSI returned error code 1603 [02 / 01 / 07, 14:29:54] Windows Communication Foundation: [2] Error: Installation failed for component Windows Communication Foundation. MSI returned error code
EW2 install failed - - Windows Communication Foundation is not inst .NET Framework I am trying to load EW on XP Pro OS install .net alone as well, and got same error. [02 / 24 / 07, 13:58:07] Windows Communication Foundation: [2] Error: Installation failed for component Windows Communication Foundation. MSI returned error code 1603 [02 / 24 / 07, 14:00:44] WapUI: [2] DepCheck
means and hiow to correct this? Error Message Reads: [12 / 07 / 07, 21:03:18] Windows Communication Foundation: [2] Error: Installation failed for component Windows Communication Foundation. MSI returned error code 1603 [12 / 07 / 07, 21:03:24] WapUI: [2] DepCheck indicates Windows Communication Foundation is not installed. [12 / 07 / 07, 21:03:24] WapUI: [2] DepCheck indicates Microsoft
try to install it I get the following errors: [09 / 11 / 08, 23:24:37] Windows Communication Foundation: [2] Error: Installation failed for component Windows Communication Foundation. MSI returned error code 1603 [09 / 11 / 08, 23:24:48] WapUI: [2] DepCheck indicates Windows Communication Foundation is not installed. [09 / 11 / 08, 23:24:48] WapUI: [2] DepCheck indicates Microsoft