I'm trying to write a little web.config reading class, and want it to be available for all .net framework solutions I am writing.
Everything is going fine, except for .net 1.1 and below I need to use System.configuration.configurationsettings.appsettings and for after 1.1 am using
System.configuration.configurationmanager.appsettings.
...
Has anyone made an attempt at something like similar to the Fluent-Nhibernate project except for web.config? Is this even plausible?
...
Hi,
Is there a way write code in web.config file using preprocessed function. Say I created environment variables like %Temp%, %WINDIR%. order to read these I can use the configurationManager class. But I dont want to use it. I woudl like to use a preprocessed function similar to timeStampPattern="{timestamp(local)}". Here timestamp(loc...
My C# application has three testing stages: alpha, staging and production. Each stage for my application has a sibling web service. The APIs for all three web services are the same.
How could my application use the appropriate sibling web service based solely on alterations to the web.config file?
The goal being to have very little dup...
Hi Guys,
I'd like to use the built in directory security features built into the web.config to restrict access to child pages of a parent page. My structure is as follows:
Members
Members/News
Members/Press
Members/Movies
Users should be able to have access to the members parent page, but not child pages. My problem is, because I ...
I am using Microsoft Commerce Server 2007 and a custom ASP.NET 2.0 website. Everything works well in Classic Pipeline, but when I try to use the Integrated pipeline, it fails with the following error:
Server Error in '/' Application.
Request is not available in this context
Description: An unhandled exception occurred duri...
I have a connection string that all of the applications on my site need to know about. I know that I can put it in machine.config or root-level web.config but let's say that those options are not available to me and the only thing I can do is to modify applicationHost.cofig.
I have tried this and the connection string does appear in the...
When executing this line:
Dim roleRedirectSection As LoginRedirectByRoleSection = DirectCast(ConfigurationManager.GetSection("loginRedirectByRole"), LoginRedirectByRoleSection)
...I get the following error:
Message: "An error occurred creating the configuration section handler for loginRedirectByRole: Could not load type 'sitename.Lo...
I have a project ("The Project") that references an external web service. I am then referencing that project in an ASP.Net web application ("The Web Application"). When I reference "The Project" in "The Web Application" the app.config is not copied over, which isn't a problem. Does "The Project" take care of know what endpoint to use? Ca...
I want to configure IIS 7 logging options (log file format, request fields included, log file rollover, etc.) using a site-level Web.config file. Is this possible? I assumed system.webServer/httpLogging would let me do what I need, but there are only two attributes available on that element and no child elements.
...
Hi,
I am building a application which will use DI Framework to load components to fetch data, from various sources like external web service or DB. Now components will need some of application configuration like web service url or database connection string. Keeping all that stuff in Web.Config and passing it via constructor parameters i...
Hi,
I got this error message
Could not find the specified membership provider
Here's my web.config setting:
<connectionStrings>
<add name="MyConnectionString" connectionString="Data Source=MyHostName;Initial Catalog=MyDB;User ID=userid;Password=*****" providerName="System.Data.SqlClient" />
<add name="ADConnectionString" con...
Can I create app.config or web.config file that applies only to my developer machine, as opposed to using the default configuration files that are checked into source control?
...
I'm having some difficulty connecting to an ADAM instance from my Commerce Server 2007 ASP .NET solution, and I believe it relates to my config file somehow. The short version is that I can connect to ADAM through ADAM-ADSIEdit with my current username/password, but when I put this in my web.config i get "Parser Error Message: Logon fa...
How do I avoid the same hard-coded string "applicationName="membershipSampleApp" that appears in multiple places in my web.config?
<membership defaultProvider="AspNetSqlMembershipProvider">
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembe...
Hi
I've got 3 connection strings in my app:
<add name="DBConnectionString" connectionString=""/>
<add name="ADConnectionString" connectionString="" />
<add name="TestDBConnectionString" connectionString="" />
now in the code i do:
public static string DefaultConnection
{
get
{
// this is used so ...
Ok. This one must be silly: We have just migrated a project to Visual Studio 2010 (Release Candidate) + .Net 4 + MVC2. One of the reasons was that the customer has record IDs that include the "/" character, and using encoded slashes as route parameters was not allowed until .Net 4.
(See http://stackoverflow.com/questions/591694/url-enco...
Following on from my earlier question around loading views from DLLs under ASP.NET MVC, I've come across the issue of having Views and Controls be strongly typed. An exception is thrown indicating that the type cannot be resolved.
I found this article which describes implementing a web.config section which allows that strongly typed vi...
My web application depends on a web.config entry being a certain value (like FEATURE_ACTIVATED=true) so how do I test the function that reads this web.config entry?
I'd like to avoid copying the web.config entries to an app.config in the unit testing project, as it takes extra effort to synchronize the files.
...
Hi All,
I've got a page in an ASP.Net app (its Mvc actually but not important) and I would like to only allow connections to this page from the local machine. I would love to do something like this in Web.config:
<location path="resources"><system.web><authorization><allow ips="local"/></authorization></system.web></location>
I kn...