Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8485521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:40:29+00:00 2026-06-10T20:40:29+00:00

We are having problem with Spring.Net Dependency Injection when we added a second service

  • 0

We are having problem with Spring.Net Dependency Injection when we added a second service contract.

Here’s the setup:

One WCF project with two Service Contract (SVC file)
Service1 and Service2

Here’s the Web.config

 <services>
  <service behaviorConfiguration="DefaultBehavior" name="CrestService">
    <endpoint address="https://localhost/Service1.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" name="BasicHttpEndpoint" contract="WCF.IService1" />
  </service>
  <service behaviorConfiguration="DefaultBehavior" name="CrestClientService">
    <endpoint address="https://localhost/Service2.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" name="BasicHttpEndpoint" contract="WCF.IService2" />
  </service>
</services>

Here’s the Spring.Config

<object id="Service1" type="WCF.Service1, WCF" singleton="false">
    <property name="ObjectA" ref="ClassA"/>
</object>
<object id="Service2" type="WCF.Service2, WCF" singleton="false">
    <property name="ObjectA" ref="ClassA"/>
</object>

Here’s the Service1.svc markedup

<%@ ServiceHost Language="C#" Debug="true" Service="Service1" Factory="Spring.ServiceModel.Activation.ServiceHostFactory" %>

Here’s the Service2.svc markedup

<%@ ServiceHost Language="C#" Debug="true" Service="Service2" Factory="Spring.ServiceModel.Activation.ServiceHostFactory" %>

Here’s the problem we are having.

With the setup display above we are able to get Service1 working properly and getting dependency injecting properly as well. But for Service2 we get a runtime error:

The type ‘Service2’, provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

I’ve tried declaring the service name with fully qualified name in Spring.config, Web.config and SVC Mark-up to WCF.Service1 and WCF.Service2. By doing this I was able to get both web service running without error, but the dependency injection fail to inject the objects in the web service.

I believe this is because the object id doesn’t accept full qualified name in the spring config.

Does anyone have any clues to what might be the problem here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:40:30+00:00Added an answer on June 10, 2026 at 8:40 pm

    Updated to the latest version of Spring .NET 1.3.2 seem to fixed the problem. Might of been bad reference or problem with the downloaded files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having the following problem. I created a application context file for spring.net. The
im having a problem in my ASP .NET calculator project. I'm using VB10, all
I'm having a problem parsing my parameters in ASP.Net Here's what i'm doing Sub
Recently, we've been having a problem with our WCF service. This is how it's
I am having problem using mvc:resources in spring 3.1 configuration. Initially i was working
I am having a problem assigning a default value to my Spring Form input
I'm having a problem with data entry since switching to .NET 4.0. In my
Hey, I am having a problem deserializing base64 json back into the .net object
We are having an odd problem with .NET Remoting. Basically, we have a server
I am having a problem of a partial page update on Asp.net mvc 3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.