Hi,
I'd like to allow my user's to switch between different databases on the login page at runtime.
I've currently got the ConnectionString stored in my App Settings file and all the dataset's refer to this setting.
I have tried modifying this setting at runtime, but this seems impossible.
How is the best way to do this?
Thanks,
...
Suppose I have several services represented by classes ServiceA, ServiceB, ServiceC etc.
These services have configuration and other data in SQL, in for example a ServiceConfiguration table.
Are there any best practices for linking ServiceA to it's corresponding configuration and data in SQL other than hard-coding the Id in the class?
...
I've to domain names pointing to the same IP.
What I want to do is:
When visited by domain_name1,make document_root:/usr/local/apache/htdocs1
when visited by domain_name2,make document_root:/usr/local/apache/htdocs2
how to do this job?
...
i am trying to deploy my website to my host and get following error message on my web. config file:
The configuration section
'connectionStrings' cannot be read
because it is missing a section
declaration
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse respon...
I have an application that connects to a number of SQL Servers for monitoring and other tasks. Currently, I only support trusted authentication, since I don't have to store anything sensitive. I want to add the ability to use SQL Authentication (username/password).
What's the best approach to storing this sensitive data between sessions...
I'm trying to use Google Guice with the @Inject and @Singleton properties as follows:
I have:
A Module with an empty configure() method.
An interface IFoo
A class Foo (implementing IFoo), annotated with @Singleton, with a parameter-less constructor annotated with @Inject. This is the single annotated constructor.
The classes, constr...
Hi,
I need to monitor and report on all changes (folders and directories added, permissions changed, registry entries added) that are made during the installation of a software program. Can anyone suggest a tool that is capable of doing this?
Thanks, MagicAndi.
...
I have been looking for a way to register a factory class in autofac using XmlConfiguration but the documentation seems a bit slim.
What I want to accomplish is to do the following in my configuration instead:
builder.Register(c => MyFactory.GetMyObject()).As<IMyObject>();
Are there any good way of doing this?
...
I'd like to be able to extend ConfigurationManager so that I have an app.config some like the following:
<configuration>
<databases>
<add name="db1" server="someServer" dbName="superDB" userName="" password=""/>
<add name="db2" server="anotherServer" dbName="ordinaryDB" userName="dba" password="dba"/>
</databases>
</configurat...
I've been given a windows service which references a COM component that only runs on 32-bit.
My machine is x64, so the service tries to start, fails to create the COM component, and dies.
I don't have the source, just the .exe file. Is there any way to force a service to start in 32-bit mode on a win64 machine?
...
I'm trying to get started with Hibernate, and when executing my program I get an error during initialization.
The exception is thrown by this class, copied from here:
package net.always_data.bastien_leonard;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
public class HibernateUtil {
private static fi...
I have a Django project which seemed to work pretty well with settings.py, which also imported a local_settings.py without problem.
I've now added the following lines at the end of the settings file :
try:
from extras import *
except ImportError, e:
print "import extras failed :: " + `e`
extras.py is a file of extra configura...
Hi all,
While i am trying login to the application i am getting this error "Cannot open database requested in login 'HealthCare'. Login fails. Login failed for user 'HOME-7A082AE66C\Sumit'." Here is my code:
protected void Button1_Click(object sender, System.EventArgs e)
{
//string uid = TextBox1.Text.Trim();
//string ...
Hi,
I have two services, configured via a config file. Each of them listens to one http and one https address. The problem is how to configure the ports. If I configure the http ports to the same value and the https ports to another value, when debugging the whole project I get the following error message in WCF Service Host:
Status...
Is there a recommended way to integrate Hamcrest into the JUnit configuration in Eclipse? Currently Eclipse's JUnit comes with Hamcrest-core only. I want to edit that configuration to include Hamcrest-all. How should I do this?
...
I am writing a configuration system in which the app.config file is dynamically constructed from various config fragments distributed across multiple locations. The system currently works as follows:
Bootstrapper builds configuration file.
Bootstrapper initializes new AppDomain with new config file as the configuration file.
As a resul...
Hi, I'm looking for an alternave to the parse_ini_file() function in php. I want a simple way to store config settings, but want the flexibility to store unlimited levels of multiple arrays, special characters, etc. Any ideas?
...
I'm currently using Microsoft Code Contracts in an ASP.NET MVC application without any issues but I can not seem to get it quite running in a basic ASP.NET Web site. I'm not entirely sure it was made to work with this type of project (although it shouldn't matter) so I wanted to bring it up to everyone.
I can compile the contracts just ...
I am trying to write some simple Java web services so we can call Java code from .NET. So far, I got a proof-of-concept working under Glassfish. Pretty straightforward when the IDE does all the work.
Now I'm really bogging down on stuff in Java that should be really simple. For example, I want to externalize my configuration so I can...
I am long time-vim user and recently discovered that emacs has viper-mode, offering best of both worlds (at least for me). However one thing is really bothering me since I am mostly coding in python and mixing of tabs and spaces is a big deal.
When in insert mode I would like to insert viper-shift-width spaces instead of TAB when I pres...