just solved it - Hosted() was the missing part..

On Jan 21, 4:52 pm, Filip Kinsky <[email protected]> wrote:
> I'm trying to migrate my web.config file WCF service registration into
> Castle WcfIntegration fluent API registration, but I'm not able to
> register service with WsHttpBinding and http-based address. I'm
> registering the service like this:
>
>                         Container.Register(
>                                 Component.For<ICustomerService>()
>                                         .ImplementedBy<CustomerService>()
>                                         .ActAs(new DefaultServiceModel()
>                                                 .AddEndpoints(
>                                                 
> WcfEndpoint.ForContract<ICustomerService>()
>                                                         .BoundTo(new 
> WSHttpBinding())
>                                                                 
> .At("http://localhost/MyApp/CustomerService.svc";)
>                                 );
>
> Than I have a svc file for IIS with this content:
>
> <%@ ServiceHost
> Service="MyApp.CustomerService"
> Factory="Castle.Facilities.WcfIntegration.DefaultServiceHostFactory,
> Castle.Facilities.WcfIntegration" %>
>
> and I just get this exception when trying to 
> accesshttp://localhost/MyApp/CustomerService.svcin my browser:
>
> [HttpListenerException (0x5): Access was denied]
>    System.Net.HttpListener.AddAll() +306
>    System.Net.HttpListener.Start() +149
>    System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
> +480
>
> [AddressAccessDeniedException: HTTP could not register URL
> http://+:80/ArchPrototype.WCF.IISHost/CustomerService.svc/. Your
> process does not have access rights to this namespace 
> (seehttp://go.microsoft.com/fwlink/?LinkId=70353for details).]
>    System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
> +1156
>    System.ServiceModel.Channels.TransportManager.Open
> (TransportChannelListener channelListener) +186
> .....
>    System.ServiceModel.Channels.CommunicationObject.Open() +33
>
> Castle.Facilities.WcfIntegration.WcfServiceExtension.CreateAndOpenServiceHo st
> (IWcfServiceModel serviceModel, ComponentModel model) in d:\horn\.horn
> \ioc\castle.facilities.wcfintegration\Working\src
> \Castle.Facilities.WcfIntegration\Service\WcfServiceExtension.cs:288
>
> Castle.Facilities.WcfIntegration.WcfServiceExtension.CreateServiceHostWhenH 
> andlerIsValid
> (IHandler handler, IWcfServiceModel serviceModel, ComponentModel
> model) in d:\horn\.horn\ioc\castle.facilities.wcfintegration\Working
> \src\Castle.Facilities.WcfIntegration\Service\WcfServiceExtension.cs:
> 256
>
> Castle.Facilities.WcfIntegration.WcfServiceExtension.Kernel_ComponentRegist 
> ered
> (String key, IHandler handler) in d:\horn\.horn\ioc
> \castle.facilities.wcfintegration\Working\src
> \Castle.Facilities.WcfIntegration\Service\WcfServiceExtension.cs:123
>    Castle.MicroKernel.DefaultKernel.RaiseComponentRegistered(String
> key, IHandler handler) +97
>    Castle.MicroKernel.DefaultKernel.RegisterHandler(String key,
> IHandler handler, Boolean skipRegistration) +119
>    Castle.MicroKernel.DefaultKernel.RegisterHandler(String key,
> IHandler handler) +42
>    Castle.MicroKernel.DefaultKernel.AddCustomComponent(ComponentModel
> model) +317
>
> Castle.MicroKernel.Registration.ComponentRegistration`1.Castle.MicroKernel. 
> Registration.IRegistration.Register
> (IKernel kernel) +1703
>    Castle.MicroKernel.DefaultKernel.Register(IRegistration[]
> registrations) +217
>    Castle.Windsor.WindsorContainer.Register(IRegistration[]
> registrations) +54
>    ArchPrototype.WCF.Configurator.RegisterWcfServices() in C:\Develop
> \Jachym vNext\design\archPrototype\ArchPrototype.WCF\Configurator.cs:
> 119
>    ArchPrototype.WCF.Configurator.ConfigureContainer() in C:\Develop
> \Jachym vNext\design\archPrototype\ArchPrototype.WCF\Configurator.cs:
> 99
>    ArchPrototype.WCF.Configurator.Configure() in C:\Develop\Jachym
> vNext\design\archPrototype\ArchPrototype.WCF\Configurator.cs:54
>    ArchPrototype.WCF.IISHost.Global.Application_Start(Object sender,
> EventArgs e) in C:\Develop\Jachym vNext\design\archPrototype
> \ArchPrototype.WCF.IISHost\Global.asax.cs:12
>
> [HttpException (0x80004005): HTTP could not register URL
> http://+:80/ArchPrototype.WCF.IISHost/CustomerService.svc/. Your
> process does not have access rights to this namespace 
> (seehttp://go.microsoft.com/fwlink/?LinkId=70353for details).]
>
> System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode
> (HttpContext context, HttpApplication app) +2722546
>    System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
> appContext, HttpContext context, MethodInfo[] handlers) +128
>    System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
> MethodInfo[] handlers, IntPtr appContext, HttpContext context) +188
>    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance
> (IntPtr appContext, HttpContext context) +295
>    System.Web.HttpApplicationFactory.GetPipelineApplicationInstance
> (IntPtr appContext, HttpContext context) +56
>    System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
> appContext) +231
>
> [HttpException (0x80004005): HTTP could not register URL
> http://+:80/ArchPrototype.WCF.IISHost/CustomerService.svc/. Your
> process does not have access rights to this namespace 
> (seehttp://go.microsoft.com/fwlink/?LinkId=70353for details).]
>    System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
> +8894031
>    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
> +85
>    System.Web.HttpRuntime.ProcessRequestNotificationPrivate
> (IIS7WorkerRequest wr, HttpContext context) +333
>
> Is there anything special I must do when registering WCF service using
> WSHttpBinding?

-- 
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