Component“ICT.RCS.Modules.Client.MainMenu.MainMenu” is not recognized by the URI resource“/ICT.RCS.Modules.Client.MainMenu;component/mainmenu.xaml”

Aug 26, 2014 at 10:35 AM
Edited Aug 26, 2014 at 10:41 AM
Hi,

Do you still remember this problem? I asked you about it a few days ago.
 Component“ICT.RCS.Modules.Client.MainMenu.MainMenu” is not recognized by the URI resource“/ICT.RCS.Modules.Client.MainMenu;component/mainmenu.xaml”
I would like to send you a simple demo,but the demo alway run normally and I don't readlly know the reasons.However,when I added the Shuttle into my project,it will still have the problem.

I spent the whole day to find this reason.Now I will try to express it clearly.

ICT.WPF.Client.MainFramework( the Subscriber port ),is one name of my project.It will work with the WCF and arcgis Map Service,so the "App.config" will be like this:
 <?xml version="1.0" encoding="utf-8" ?>
  <configuration>
   <configSections>
 <section name="serviceBus" type="Shuttle.ESB.Core.ServiceBusSection, Shuttle.ESB.Core"/>
  </configSections>
  <connectionStrings>
 <clear/>
 <add name="Subscription" connectionString="Uid=sa;Pwd=123456;Initial Catalog=shuttle;Data Source=172.22.51.119;Connect Timeout=900" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <serviceBus>
 <inbox
  workQueueUri="msmq://./pubsub-MainClient-inbox-work"
  errorQueueUri="msmq://./shuttle-pubsub-error"/>
</serviceBus>
<startup>
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<runtime>
 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <probing privatePath="bin;..\..\Release\Program.MainFramework\Services;..\..\Release\Program.MainFramework\Modules;..\..\Release\Program.MainFramework\Interfaces"/>
 </assemblyBinding>
</runtime>
<appSettings>
<!--arcgis Map -->
<add key="alarmArcServerUrl" value="http://wxy-f9cic5ku08d:8399/arcgis/services" />
<!--arcgis Map ServiceName -->
<add key="alarmArcServerName" value="bj140814" />
<add key="istestMode" value="true"/>
<add key="ClientSettingsProvider.ServiceUri" value="" />
  </appSettings>

  <system.serviceModel>
  <behaviors>
  <endpointBehaviors>
    <behavior name="bhc">
      <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
    </behavior>
    </endpointBehaviors>
  </behaviors>
  <bindings>
    <wsHttpBinding>
    <binding name="WSHttpBinding_WcfService" closeTimeout="00:01:00"
         openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
         bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
         maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
         messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
         allowCookies="false">
      <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
          maxBytesPerRead="409600" maxNameTableCharCount="16384" />
      <reliableSession ordered="true" inactivityTimeout="00:10:00"
          enabled="false" />
      <security mode="None">
        <transport clientCredentialType="Windows" proxyCredentialType="None"
            realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true"
            establishSecurityContext="true" />
      </security>
    </binding>
  </wsHttpBinding>
  </bindings>
  <client>
    <endpoint address="http://172.22.51.172:8080/Services.svc"
            binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_WcfService"
            contract="ICT.RCS.Modules.Interface.IServices" name="Service" />
 </client>
</system.serviceModel>
  </configuration>
In the project "ICT.WPF.Client.MainFramework",we have a WPF window form named "MainWindow".When it loaded, we will run this code:

new ConnectionStringService().Approve();
        var subscriptionManager = SubscriptionManager.Default();

        subscriptionManager.Subscribe(new[] { typeof(OrderCompletedWindEvent).FullName });
        var bus = ServiceBus
            .Create(c => c.SubscriptionManager(subscriptionManager))
            .Start();

        Console.WriteLine("Sub A started.  Press CTRL+C to stop.");
        Console.WriteLine();

When the Service Bus instance is created, just like the "var bus = ServiceBus.Create(c => c.SubscriptionManager(subscriptionManager)).Start();"
It will send me this wrong message.
Do you know why?
Coordinator
Aug 26, 2014 at 6:52 PM
Hello,

I have a sneaky suspicion it may have something to do with WPF and not Shuttle. It is not impossible that Shuttle has a hand in it I just cannot seem to replicate it. I'll e-mail you the sample that does exactly what you are describing and then we can tackle it through e-mail.

Regards,
Eben
Aug 27, 2014 at 7:28 AM
Edited Aug 27, 2014 at 7:28 AM
Hi,

I've already done a demo: in a WPF project using the Shuttle ESB,it can run normally.

Now when I add the WCF and Arcgis' configration into "App.config",it will send me some wrong messages,just like what I said above.

I've already debug it.When I create the Service Bus, just like "var bus = ServiceBus.Create(c => c.SubscriptionManager(subscriptionManager)).Start()" ,it will send me the wrong messages.
Maybe it is the problem about WCF or Arcgis.

Here is my e-mail adress : liu614005125@gmail.com .

Thank you very much for all your Support and help.

Regards,

Spring
Sep 1, 2014 at 3:27 AM
Hi,

sorry,man.I have to bother you again.I have tryed all the ways to find out the reason about the problem,but finally I failed.

I got to say,my dear god,I can't even find the reason why it will send me this wrong messages.

So if it is possible,we can talk with the remote connection.How about the QQ?

here is my QQ number:614005125.

Or you can tell me other chat tools.I need your help.

Thank you very much.
Coordinator
Sep 1, 2014 at 5:04 AM
Hi,

We can use Skype. My name is j.wocky

I will, unfortunately, only be able to assist you after 19h00 South African time. I do not know how that will impact you. As an alternative I may be able to do between 6h00 and 7h00 SA time one morning.

However, I do not know WPF at all but we can have a look.

Regards,
Eben