web-config

Web.config values passed through tiers

I have a .NET 2008 solution with a project that acts as WCF Service host. That project has a web.config file with settings that will be replaced by the installer when the project is complete. Those setting are components that make up the connection string and a few others. This WCF project references a Business Logic project(class libra...

Modifying SharePoint app Web.config file with Forms Based Authentication

We have a SharePoint application where we want the user to be able to modify the web.config by activating a feature. The application is extended, so we have an AD based web application and another that uses Forms Based authentication (FBA), with the FBA application being the "main" user application. We use the SPWebConfigModification cl...

performance problem after adding machinekey in web.config

Does adding a machinekey in the system.web of your web.config cause any performance problems? I added something like this to my web.config: <system.web> <machineKey validationKey="aaa" decryptionKey="bbb" validation="SHA1" /> </system.web> and now it seems to run quite a bit slower. I am using firebug to see how fast the page is lo...

Set Path dynamically in Forms Authentication

Here's the problem we facing. In a hosted environment setup, we're hosting the same project multiple times. We currently manually specify a Path in the forms config section of our web.config. However, to smooth out our deployment process, we'd like to set the Path depending on the Virtual Directory name. Is there a way for us to dynami...

How to get configuration element

Helo Can anybody explain me how to get configuration element from .config file. I know how to handle attributes but not elements. As example, I want to parse following: <MySection enabled="true"> <header><![CDATA[ <div> .... </div> ]]></header> <title> .... </title> </MySection> My c# code looks like this so far: public cla...

Could StackTrace be utilized when <compilation debug="true"> in web.config ?

I know I check it programmatically from ConfigurationSection configSection = (CompilationSection) ConfigurationManager.GetSection( "system.web/compilation" ); I know that it is also somewhat slower to have in production ... yet if we are in a kind of beta it does not harm yet ... ...

Is there any way to add sections to .config files that will not be parsed by ConfigurationManager.

Hello I don't want to create separate configuration file for my app but store the data in the web.config. I just want to put some XML there and manually parse it because current implementation of ConfigurationManager isn't appropriate for my case. However, without dummy classes and properties I can't add my XML there without getting ...

Read IIS7 configuration from within web application?

Here's what I want to do: My web application is very slow at first until all pages have been precompiled and the cache has been populated. I want to 'warm up' the application in Global.asax by triggering a few HTTP requests to the slowest pages. The problem is that I don't know which port the application is running on. Could be 80 (m...

Castle Windsor Ioc Resolving Generic classes in the web.config

I have an interface declared as IRetrievable<T, idT> where T is the retrieved type and IdT is the argument passed. How do I configure the castle windsor IoC container to resolve that to a specfic Implementation. Such as a class defined as FooRetriever : IRetrievable<Foo, string> I found an example that showed how to resolve a sing...

Problem removing codeSubDirectories elements in sub-application

I have an ASP.NET application with a <codeSubDirectories> section in web.config. My main project is in VB.NET but I have a CSCode subdirectory under App_Code written in C#. Now for every new sub application I create I have to create a CSCode folder under App_Code. Microsoft's documentation says there is a <clear /> element but I get a...

Detect win or web forms

Any reliable elegant way of detecting whether the current app is a win or web forms (or other) application? We have a common config class which needs to open either app.config or web.config. Currently, I'm catching ArgumentException when I try OpenExeConfiguration but it's not very elegant and might mask other issues. ...

share same dll through different web applications without copying

I have two different asp.net web applications both referencing the same dll e.g. SharedLibrary.dll. I want to know if there is a way of adding some web.config setting to one of the application's config files to avoid the need to have two copies of the dll lying around. My [simplified] directory structure is as follows: \root \Adm...

ASP.NET Membership Configuration Tool - Change Password?

How do I change my user's password with the ASP.NET configuration Tool? I can't and I guess its because I need to do something to the web.config? ...

Web.config in a virtual directory... permission denied on root directory web.config?

Hey all, Under IIS 6 Win23k. At the root directory of a website there is a web.config (I think the root website is actually a sharepoint site). I create a virtual directory and plunk in my asp.net application and it's web.config. My application runs as a specific user id, and one that doesn't happen to have rights to the root directory'...

Using Oracle session state, and SessionStateStoreProviderBase in my web.config

Hey guys, Does anyone know or ran into an issue with images not getting rendered when using a custom session state. (I'm using oracle session provider) <sessionState cookieless="UseUri" timeout="20" mode="Custom" customProvider="MyOracleSessionStateStore" regenerateExpiredSessionId="true"> <providers> <add name="MyOracleSessionStateSto...

In Visual Studio 2008 - how long before a web.config change "takes"?

I have some settings in a web.config file that I want to override when I'm testing the ASP.NET app locally on my machine. The main part looks like this: <appSettings file="WebAppSettings.config"> <add key="DEBUG" value ="False"/> <add key="PROD" value="TrueInMainConfigFile"/> </appSettings> Now, in my local "WebAppSetting...

Can someone point me to a really easy to understand guide to web.config?

I'm really interested in gaining an in-depth understanding of the format and structure of the web.config file for ASP.NET web development. I'd like to know if there's some really easy to comprehend material (apart from the MSDN docs) which can provide me a ground-up understanding of the web.config file and its different sections. Any su...

Issues occured when changing a Project to a Website in Asp.net

Hi, After changing a Project to Website, i got an error while running the application.The error is as follows:- It is an error to use a section registered as allowDefinition ='MachineToApplication' beyond application level.This error can be caused by a virtual directory not being configured as an application in ISS. How can i solve th...

Placing a web.config file in a view directory

I am having the standard issue timeout exception in my production environment whereby, after 90 seconds, the thread will be killed. For the vast majority of my site this isn't a problem. However, my sitemap generator is an exception to the rule. Because it relies on the routes created in the application, I have chosen to create it ins...

Need help with some web.config settings.

I'm trying to play with my IIS7 compression settings in my web.config file. I'm trying to enable HTTP 1.0 requests to be gzip. MSDN has all the info about it here. Is it possible to have this config info in my own website's web.config file? Or do i need to set it at an application level? Currently, I have that code in my web.config... ...