I not speak english I'm learning.
My service works when I set it in the codebehind, but when I set it with
.xml occurs failure as I said before.

2010/2/24 Craig Neuwirt <[email protected]>

> I am not sure what you mean by
>
>
> The problema only occurs when I try set my service with string, because
> when I try set service with codebhind it works fine.
>
> Can you explain what you mean?
>
>
> On Tue, Feb 23, 2010 at 2:09 PM, Diego Dias <[email protected]> wrote:
>
>> I'm trying host my service as in samples of the project
>> "WcfIntegration-vs2008", but I'm had problem to set my service.
>>
>>             //set
>>             using (new WindsorContainer()
>>                 .Install(Configuration.FromXml(new
>> StaticContentResource(xmlConfiguration))))
>>             {
>>                 IServiceFacility client =
>> ChannelFactory<IServiceFacility>.CreateChannel(
>>                     new NetTcpBinding(),
>>                     new
>> EndpointAddress("net.tcp://localhost:6501/ServiceUserFacility"));
>>
>>                 var result = client.ListUsers();
>>             }
>>
>>         //configurations
>>         private static string xmlConfiguration = @"<?xml version='1.0'
>> encoding='utf-8' ?>
>>             <configuration>
>>                 <facilities>
>>                     <facility id='wcf'
>>
>>  type='Castle.Facilities.WcfIntegration.WcfFacility,
>>                                     Castle.Facilities.WcfIntegration' />
>>                 </facilities>
>>
>>                 <components>
>>                     <component id='ServiceFacility'
>>                                    service='Service.IServiceFacility,
>> Service'
>>                                    type='Service.ServiceUserFacility,
>> Service'
>>                                    wcfServiceHost='true'>
>>                     </component>
>>
>>                     <component id='settings'
>>                           service='Domain.Model.ISettings, Domain.Model'
>>                           type='Domain.Model.SettingsPortal,
>> Domain.Model'>
>>                         <parameters>
>>                             <token>0987654321</token>
>>                         </parameters>
>>                     </component>
>>                 </components>
>>             </configuration>";
>>
>>            //service
>>         private readonly ISettings _settings;
>>
>>          public ServiceUserFacility(ISettings settings)
>>         {
>>             _settings = settings;
>>         }
>>
>>         public IList<Usuario> ListUsers()
>>         {
>>             Console.WriteLine("Token: {0}", _settings.Token);
>>
>>             return new List<Usuario>()
>>                        {
>>                            new Usuario()
>>                                {
>>                                    IdUser=1,
>>                                    Nome="nome 1"
>>                                },
>>                                new Usuario()
>>                                {
>>                                    IdUser=2,
>>                                    Nome="nome 2"
>>                                }
>>                        };
>>         }
>>
>>
>> The message error is:
>> The service 'Service.ServiceUserFacility' has no endpoint application
>> (without infrastructure).This may be because there has been no
>> configuration file for your application or because no service element
>> matching the service name could not be found, or because no endpoints were
>> defined in the service element
>>
>> The problema only occurs when I try set my service with string, because
>> when I try set service with codebhind it works fine.
>>
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Castle Project Users" group.
>> To post to this group, send email to
>> [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<castle-project-users%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/castle-project-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected]
> .
> To unsubscribe from this group, send email to
> [email protected]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to