Questions tagged [spring.net]
Spring.NET is an open source application framework for developing .NET enterprise applications.
631
questions
0
votes
0
answers
20
views
Spring.NET read Environment Variable from C# script
I have this script :
namespace App.api.security
{
public class EnvVariable
{
public static string ENV_CONNECTION_USER => Environment.GetEnvironmentVariable("C_USER");
}...
0
votes
0
answers
29
views
Connect c# spring.net with oracle 21 database
I have to update the oracle client for our c# application, which is still using spring.net to oracle v.21c. But I can´t figure out, where in the spring.net settings/files I have to configure this.
The ...
0
votes
1
answer
82
views
Where can I find Spring.NET documentation?
Is there any working documentation for Spring.NET, as website, files, working sources?
Documentation on official site throws 5XX errors in most places.
Documentation from GitHub project is not ...
0
votes
1
answer
332
views
How to configure xml file for Spring.Net property injection
I need to use spring.net to inject dependencies for the implementation of interfaces, using property injection. I am not really familiar with it, can someone kindly explain it to me?
So in the config ...
0
votes
0
answers
29
views
How does one implement an attribute-triggered advice in spring?
I am looking to use AOP to do some timing of calls. I want to statically decorate the methods with a custom attribute and then have the advice invoked (around) so that it takes a timestamp, makes the ...
0
votes
1
answer
853
views
how can i pass enum as a property to app.config file in c# with spring.net
i have the following enum:
enum ELogLevel
{
INFO = 1,
DEBUG = 2,
WARNING = 3,
ERROR = 4,
FATAL = 5
}
and i have the following class:
class Test
{
private ELogLevel logLevel;}...
0
votes
0
answers
227
views
WebApplicationContext.cs not found, System.Web.HttpException: Request not available in this context
I am running a .NET website using IIS-7 from Visual Studio 2019. I am running into the following error: https://i.stack.imgur.com/imH8t.jpg
I made sure that all of the projects that are part of the ...
0
votes
0
answers
25
views
how can implement constructor,property and method injection by codeconfig using spring.net?
I want to implement a constructor, property and method injection using the codeConfig file in spring.net.
anyone know then please help me and share the link.
0
votes
0
answers
72
views
Unit test cases are not executed in Visual Studio with NUnit and Spring
I am not able to execute test cases in Visual Studio. I have reinstalled Visual Studio and ReSharper, but still it is not working. Please give some suggestion to execute test cases in Visual Studio.
...
0
votes
1
answer
630
views
DbNull always coming back as a return value from SQL Server stored procedure in C# Spring.NET
I have a simple stored procedure that only returns the number 100 right now. Executing it from C# gives me DBNull when I check the returnvalue parameter when debugging. I know my stored procedure to ...
3
votes
0
answers
228
views
Spring Data for NHibernate 5
Is there a Spring.NET solution for NHibernate 5.0? I have tried to update nhibernate 5, but it was not possible because spring data only supports nhibernate <=4. Can you help me?
0
votes
0
answers
234
views
Spring net error
Hi i have problem with following error in spring net
An exception of type 'System.Configuration.ConfigurationErrorsException' occurred in Spring.Core.dll but was not handled in user code
Additional ...
0
votes
1
answer
120
views
Why use "value" but not "ref" for property value in spring.net config
Recently when I read the Spring.net's documentation. I found there is one place that is quite confusing to me. In 5.3.2.1.1, the doc said as below:
<object id="theTargetObject" type="..."> ....
0
votes
1
answer
90
views
Can Spring.NET AOP be used with Unity container?
It is possible to use Spring.NET's aspect-oriented capabilities without using the Spring DI container? Specifically, in an app that uses Unity for IoC/DI, will Spring's AOP work?
I'm reading through ...
1
vote
1
answer
914
views
How can I set current date in a property of an object in XML v1.0 using Spring-objects?
This my current code which works fine for set the dates but I want to set the current date as default how can I get this value?
It's possibly to use system.DateTime.Now as a class of an object for ...
0
votes
1
answer
160
views
Spring.net ContextRegistry.GetContext fails with 2 interface implementations
I have a .net application, that uses Spring.net.
Also there are 2 implementations of one interface. Which one should be used - it is based on configuration file.
The bootstrap for Spring has
<...
0
votes
1
answer
495
views
Using Sql parameters on Ingres Database error
Exception:
Local variable/parameter ':your-param-name' can only be used within a database procedure.
In MSSQL, the param character is @. In INGRES Database, really is : ? I cannot find official ...
1
vote
0
answers
110
views
AutoFixture and AutoData with Spring.net
In our projects we are using spring.net and nhibernate to persist our domain-entities. Out Test Data Builder partly persists entities, so they are also using spring.net.
I came across AutoFixture and ...
0
votes
0
answers
292
views
Method not found: 'System.Collections.IDictionary Spring.Objects.Factory.IListableObjectFactory.GetObjectsOfType(System.Type)'
I have a web application in C# using Ado.net and the following code throws a MissingMethodException
DbParameters prms = new DbParameters(Ado.AdoTemplate.DbProvider);
The exception message is : ...
0
votes
1
answer
634
views
named query in NHibernate with not equal operator
NHibernate throw exception with sql server not equal to operator <>.
<sql-query name="Select">
<return alias="OrderStock" class="OrderStock"/>
select * from OrderStock WHERE dh....
1
vote
1
answer
99
views
How to instantiate a type with many constructors with the same amount of parameters in Spring.Net
I want to instantiate a System.Net.IPEndPoint with Spring.Net.
Here is my xml code:
<object id="MulticastAddress" type="System.Net.IPAddress" factory-method="Parse">
<constructor-arg ...
2
votes
2
answers
3k
views
Quartz.net Scheduler memory leak
I have a scheduler windows service running in the server with different schedule time each job.
There are two problems that came up:
During the week the service is running correct doing all the jobs ...
8
votes
4
answers
398
views
Why my system is trying to load a type from an invalid version of the assembly?
I'm working on an old system that is using NHibernate 3 and spring for DI, I have to do some refactor on this solution. some of the projects of the solution was using NHibernate 1.2, I changed them to ...
0
votes
1
answer
104
views
Spring.Net inject into instantiated windows service? Is it possible?
I have a windows service that uses top shelf and in the main method of the service I have,
static void Main(string[] args)
{
//TopShelf
if (args != null && ...
0
votes
1
answer
619
views
How to do property injection for TypeAliases using spring.net
I am facing issues in creating object using spring.net and need solutions to that.
Setup Description:
I have below configuration file for TypeAliases.
<objects xmlns="http://www.springframework....
1
vote
1
answer
106
views
Spring.Net: How to initialise a multi-dimensional array?
I want to initialise a multi-dimensional array with spring.net. How to define the array?
I tried this
<object type="string[][][]" id="my_array" name="my_array">
<constructor-arg>
&...
1
vote
1
answer
115
views
DryIoc, Spring.Net's GetObjectsOfType equivalent?
With Spring.Net, it's possible to query all objects of a certain (ancestor) type.
var ctx = ContextRegistry.GetContext();
var setUsers = ctx.GetObjectsOfType(typeof(ISetUser)).Values....
14
votes
2
answers
12k
views
Is Spring.NET project dead?
We are considering using Sprint.NET as AOP framework along with other solutions. Spring.NET is a known framework, at least by name like in my case.
I try to find the informations about latest ...
0
votes
1
answer
182
views
Unable to expose more than one Service - Spring WebServiceExporter
Hi I am still fairly new to Spring in general. I have been using WebServiceExporter to expose my WebServices. However, when I tried to add another WebService to my Web.xml I get the following error:
[...
1
vote
0
answers
528
views
Spring.Net throwing "Cannot activate transaction synchronization - already active" for nested transations in a multithreaded application
Background:
We are using Spring.Net 2.0 to manage our transactions with nHibernate 3.3.1. The application follows the the publisher-subscriber pattern. Each subscriber runs in a separate thread and is ...
0
votes
1
answer
31
views
Validating children of a collection property
I've inherited an application that heavily utilises Spring.NET for everything including validation. Right now I'm trying to figure out how to validate the children of a collection property, so given a ...
0
votes
1
answer
166
views
Unable to get spring dependency injection to work on a simple web application
After much effort I have been unable to create a simple example of DI between my application and business layers.
Here is the spring snippet from my web.config:
<configSections>
<...
0
votes
1
answer
93
views
Is there any way to "reinstantiate" an instance on Spring.net
I'm using a Service instantiated by a CustomFactory of Spring.net that reads a configuration stored in database. Sometimes, an administrator user can change the configuration used by this service, and ...
0
votes
1
answer
158
views
WebApplicationContext in Spring.NET - Is it thread safe?
I'm dealing with some tech debt on a web project I inherited. Instead of using the context provided thru Spring.NET's WebContextHandler, I am instantiating the Spring application context ...
0
votes
1
answer
259
views
Spring .NET Inheritance implementation
I am getting exception Multiple objects found for type: A --> EQUITY_SWAP_EQUITY_RESET_VIEWMODEL,EQUITY_SWAP_INTEREST_RATE_RESET_VIEWMODEL. No objects will be resolved. Instance of derived object is ...
1
vote
1
answer
219
views
Using Spring.Net with HangFire
We're using spring.net to manage our dependency injections but when we get to the method ran by hangfire, the dependency classes are null. Using other IoC containers are not an option yet- please dont ...
0
votes
1
answer
575
views
Spring.Web.Mvc5 2.0.1 won't work with System.Web.Mvc 5.2.2
I've been updating packages in an .NET MVC 5 application that uses Spring.NET, and I'm trying to get Spring.Web.Mvc5 version with Microsoft.AspNet.WebApi.Core 5.2.3. I getting the following in the ...
2
votes
1
answer
605
views
how to applicate interceptor in a controller on a project MVC WebAPI?
I try to use an interceptor in my project
I received a error classic in spring.net when I try to call a method of controller
stack trace :
An error has occurred.","ExceptionMessage":"Unable to ...
0
votes
1
answer
450
views
How can I get all the object identifiers from Spring context?
In a project I am using Spring.NET and I have a unit test where I want to get from the Spring context all the identifiers of the objects.
How can I do such a thing?
At the moment I have a private ...
1
vote
2
answers
1k
views
How to initialize a Spring.net GenericApplicationContext after adding Object Definitions
Given a GenericApplicationContext and adding some ObjectDefinitions programatically. What do I need to do (others than calling Refresh()) to proper initialize the context?
The Problem is, that even ...
0
votes
1
answer
601
views
Get object by attribute value [duplicate]
I have a set of classes which implement a common interface and are annotated with a business domain attribute. By design, each class is annotated with different parametrization
[Foo(Bar=1)]
public ...
1
vote
1
answer
2k
views
SetUp : Spring.Objects.Factory.ObjectDefinitionStoreException : Error registering object with name 'NHibernateSessionFactory' defined in 'assembly
When I run a unit test, this is the error I'm getting:
SetUp : Spring.Objects.Factory.ObjectDefinitionStoreException : Error registering object with name 'NHibernateSessionFactory' defined in '...
0
votes
1
answer
493
views
Spring.net + Hibernate error while upgrading ASP.NET version to .net 4.5
I am new to new to .Net. I have to upgrade my application from .Net 3.5 to .Net 4.5. This application uses spring.net with nHibernate. I am getting null reference error right on the first page of the ...
0
votes
0
answers
77
views
URL WCF RestFul .net with spring
I need to call my service with the standard url restful:
http://localhost/users : getall user
http://localhost/user/1 : get user with id 1
But the standard URLs in WCF looks like:
http://localhost/...
2
votes
1
answer
2k
views
How to integrate WebApi 2 with Spring.Net
Im trying to integrate WebApi 2 with Spring.Net with not success. This is what i have tried:
public class MvcApplication : SpringMvcApplication
{
protected void Application_Start()
{
...
1
vote
1
answer
166
views
Using spring.net in web api to instantiate controller
I want to learn how to make Spring instantiate a Web API controller. I would like to know 2 things:
What I should add to my WebApiConfig classroom and controllers?
How do I declare my controller in ...
1
vote
1
answer
1k
views
Web Api Spring.Net Configuration
I have a null object reference when I call spring. I use just web api whit nhibernate
UserController
namespace Work.WebServices
{
public class UserController : ApiController
{
...
0
votes
1
answer
115
views
How to programatically change databases in Spring.net (use AdoTemplate)?
How to programatically change databases in Spring.net (use AdoTemplate)?
(Spring.net have not AbstractRoutingDataSource )
0
votes
1
answer
2k
views
Spring.Net 2, NHibernate 4 Error "Could not load type from string value 'Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate'."
I'm attempting to upgrade a project from Spring.Net 1.3.2, NHibernate 3.2 to Spring.Net 2, NHibernate 4.
I get the error "Could not load type from string value 'Spring.Data.NHibernate....
0
votes
1
answer
34
views
Spring.Net: Client referring to previous version of class
I'm trying to learn how to use Spring.Net by coding up a trivial example of one project calling another.
The project to be called is a class library project containing a single class and its ...