configuration

Managing asp.net membership in production

I have been using the 'Web Site Administration Tool' that you can bring up in Visual Studio to manage users and roles in our dev and staging environment. Currently we have no way of managing users and roles when the app goes to our production servers. for now we have been calling stored-procedure in the membership database to manually ...

Modify Web.config during/after Web Setup project

How do I modify the web.config of a web site during the setup's execution? I would like to have the user construct a connection string and then store that in the web config. ...

Programmatically configure an EntLib CAB CacheManager

Currently I'm having to include a significant chunk of XML in the app.config to get the CAB CacheManager going and I'd rather hide the configuration away in my code. Is there any way to programmatically configure an Enterprise Library Caching Application Block's CacheManager? ...

asp.mvc view enteres #IF DEBUG in release configuration

I have an ASP MVC view where have the following statement #if DEBUG //section 1 //do stuff #else //section 2 //do other stuff #endif When in visual studio I choose the release configuration from the dropdown to do the build, the code still steps through section 1. In the solution configuration properties all subprojects of th...

In Perl, how can I handle continuation lines in a configuration file?

So I'm trying to read in a config. file in Perl. The config file uses a trailing backslash to indicate a line continuation. For instance, the file might look like this: === somefile === foo=bar x=this\ is\ a\ multiline statement. I have code that reads in the file, and then processes the trailing backslash(es) to concatena...

Nested app.config (web.config) files

Is it possible to have two app.config files where one app.config serves as a container for second (nested) app.config file? I would like to reference specific sections of a nested file from the outer one. Why I need this is because of source control issue. For detailed description see this Any other solution for the root problem is gre...

Simple FluentNHibernate parent/child mapping

New to FluentNHibernate =D I have a parent/children classes as follows: public class Parent { public virtual int ID { get; private set; } public virtual string Name { get; set; } public virtual IList<Child> Children { get; set; } } public class Child { public virtual int ID { get; private set; } public virtual stri...

configuring asp.net to start a method before each application start on IIS

hi all. how I Can Configure IIS to start a method (I define it) before starting each asp.net's application on it? i just want to do someting with IIS (not each application) so that any application that starts on Server executes a method that i Defined it. in fact i want to create a threat that do something. for example i can create this...

GC Not Cleaning Up (was: Tempfile Not Deleting Automatically, Ruby)

Ruby tempfile instances automatically delete their corresponding file when the references are released. However, I have one machine on which this is not the case. The code is irb> require 'tempfile' => true irb> t = Tempfile.new('test32') => #<File:/tmp/test32.27778.0> irb> exit on all of my test machines, this results in test32 getti...

How do I check if SqlCacheDependency is enabled at runtime?

I am using SqlCacheDependency with polling in an ASP.NET project. Sometimes, I need to disable SqlCacheDependency, which I do as follows: <caching> <sqlCacheDependency enabled="false" pollTime="10000"> <databases> <!-- ... --> </databases> </sqlCacheDependency> </caching> However, this causes an error in my code whe...

Configure log4net to send errors to different appenders based on level

I want to send Info Level & above to the XML appender and Error/Fatal Level to the EventLog appender. I gather that I need to modify the root element of the config but I'm struggling with the syntax. What is the configuration syntax to direct logs to the correct appender for a given level or range of levels? This is the configuration s...

web.config email query

In my web.config file there are below entries. It seems like it is used to send mails from my website. How i know maiks has been sent from my website? <add key="emailFromAddress" value="[email protected]"/> <add key="emailTo_StoreAuthorise" value="[email protected]"/> ...

Port IIS 7 Setup to another machine

What's the fastest and most efficient way of porting over an IIS setup on one machine to a blank IIS 7 install on another? Including all the sites, applications, virtual directorys, ftp accounts, etc? Thanks. ...

How do I include a php.ini file in another php.ini file?

How do I include a php.ini file in another php.ini file? ...

configuration filename convention

Hi, Is there a general naming conventions for configuration files for a simple python program? Thanks, Udi ...

.Net desktop program suddenly starts erroring out

A long time ago I wrote a little FTP utility for a client, and it has been working just fine for over a year. The other day, they tell me that they "updated" their machines (including the server where this was installed). Suddenly, my tiny little desktop app started erroring out. Here is the error message: The configuration section '...

Why does hibernate not find properties when I have hibernate.cfg.xml in my default package classpath?

I am having a bitch of a time getting this simple application working. I've got a configuration file in my default class path, using annotations with the correct class entries in the config file, and a default Session factory class that generated by the hibernate eclipse plug in tool. If I only rely on the default classpath config file, ...

Git - Committing Machine Specific Configuration Files

A common scenario when I develop is that the codebase will have several config files which require machine specific settings. These files will be checked into Git and other developers will always accidentally check them back in and break someone else's configuration. A simple solution to this would be to just not check them in to Git, o...

PHP cannot find my php files if not under htdocs folder

By someone's advice I've put all my PHP files in a separate folder (inc) on the same level as htdocs. Only index.php is left in htdocs. So, it's like this: C:\myproject\htdocs - index.php C:\myproject\inc - login.php - util.php - register.php ... Now, when I go to localhost in my browser index.php is processed and shown correctly. But...

Why can't my WCF Web Service see it's own web.config Connectionstrings?

I have written an ASP.Net 3.5 WCF service and when I created this project VS gave me a web.config file to go with it. Having done this the app now seems entirely blind to connectionstrings, a big problem as the app will be heavily reliant on reformatting and spitting out SQL Server DB data in various web friendly formats. Most of the re...