sHi folk,
I've been storing SQL connection strings in web.conf which is fine but now I need to store SMTP credentials somewhere protected. web.conf seems like the likeliest place since its protected but how can they be stored?
I've added the details to my web.conf but amnot sure how to reference them
<system.net>
<mailSettings>
...
Can someone tell me if there is a way for me to use the WebConfigurationManager.OpenWebConfiguration() using a remote server, port and virtual directory?
Examples cited in http://msdn.microsoft.com/en-us/library/ms228063.aspx and http://quickstart.developerfusion.co.uk/QuickStart/aspnet/doc/management/mgmtapi.aspx only use the virtual ...
Is there a way to find the name (and path) of the current application's config file from inside a class library?
E.g. in a web app this would be web.config, in a windows app or service this would be myapp.exe.config.
...
Hi there,
Does anyone know of a good link to explain how to use the web.config......
For example, i am using forms authentication... and i notice there is a system.web and then it closed /system.web and then below configuration there are additional location tags
here is an example, if you ntoice there is an authentication mode=forms ...
Hi folks,
I'm using asp.nbet membership which very handily gives you the choice of enforcing a min password length and the minimum numeric characters. Can you define others like there must be one upper-case character, etc?
cheers
...
For the system.web/httpHandlers section of web.config I can use the "configSource" attribute to specify an external configuration file, like so:
<system.web>
<httpHandlers configSource="App_Config\httpHandlers_iis6.config" />
</system.web>
This allows me to use the same set of handlers across all of my environments while only hav...
I'd like a streamlined methodology behind being able to run locally (work is done on more than one machine), deploy, and commit to version control where the sensitive information up to and including (password, username, port(s), hostnames, database name) are automatically absent(or removed) and imported based on which situation is happen...
In the event my project is deployed with an incorrect, incomplete or missing connection string i'd like an application startup check for db connectivity, and if there is none, direct all requests to a DatabaseConnectionError page of some sort, what are my options? I don't think there's a specific http error code that would fit this error...
Hello,
I'm messing around with MVC 2.0 on VS2010 and am having an issue getting the clean web config feature working.
Basically in my Web.debug.config I have
<connectionStrings xdt:Transform="Replace">
<add name="ApplicationServices"
connectionString="Server=localhost;Database=SITE_DB;User ID=dbuser;Password=P@ssw0rd;Trusted_C...
I have an ASP.Net web site (ASPX and ASMX pages) with a single web.config file. We have a development version and a production version. Over time, the web.config files for development and production have diverged substantially.
What is the best practice for keeping both versions of web.config in source control (we use Tortoise SVN but...
Hello everyone,
I am having an issue when I try and prevent inhertiance from a parent web.config down to a child specifically related to the node. My parent web.config contains about a dozen appSettings values while my child web.config contains none. Now, I originally began wrapping around only my system.net, web, etc nodes howeve...
I've got a server running Windows Web Server 2008 R2. The machine-level web.config has the following entries:
<location path="Preview">
<appSettings>
<add key="Environment" value="Preview" />
</appSettings>
</location>
<location path="Staging">
<appSettings>
<add key="Environment" value="Staging" />
</ap...
I have developed my own custom provider for the health monitoring; however, I use parameters in the constructor and this is not allowed when using the health monitoring from the web.config file.
Does anyone know if I can turn on/off the monitoring and have it watch properly through code (possibly in my global.asax file on application ...
I want the properties section of the Castle config to be included from another file. I.e:
<castle>
<include uri="file://properties.config" />
</castle>
The properties.config would then look like:
<properties>
<smtp>10.10.10.10</smtp>
<username>john</username>
</properties>
I can get the include to work for components but not ...
I have an ASP.NET project which has already some custom fields in it's web.config file. I've added in it three more fields and used them in my changes, and it's working great.
But where it needs to be used, there aren't these thre fields in the web.config (this was expected, I've just added by hand for tests and developing).
How do I c...
Hi, I have a framework 2.0 asp.net website, I want to change it's framework version to 3.5. Is it possible to do this manually from web.config file? I don't want to change from visual studio property pages. I need to change from web.config, what should I do?
...
I'm using MySql in my asp.net project. But I don't want to type every "using MySql.Data.MySqlClient;" statement in every aspx.cs/aspx.vb file. How can I define this lines in web.config file?
I've defined some namespaces like below but this only works for aspx pages:
<?xml version="1.0"?>
<configuration>
<system.web>
<compil...
I'm getting this error while running my ASP.NET app on IIS7. I've tried doing what it says to do but it doesn't help.
The WebResource.axd handler must be
registered in the configuration to
process this request.
> <!-- Web.Config Configuration File -->
>
> <configuration>
> <system.web>
> <httpHandlers>
> ...
I was reading a tutorial on ASP.NET and third party API's and it mentioned that the API KEY and SECRET KEY should be stored in the web.config file, for security on production servers, instead of in the classes that use them. However, I'm not quite sure what's more secure about a web.config file than a class? I understand the convenience ...
I am working in the new Visual Studio 2010 RTM and I would like to use web.config transforms.
My site is configured to use .NET 4.0 but it was formerly a Visual Studio 2008 web application project.
When I right-click on my web.config file I do not see the 'Add Config Transforms' option as I should. I also tried adding creating a new w...