web-config

are all parts of the web.config required once compiled

Hi, hopefully this doesn't sound ridiculous, but are some parts of the web.config not required once the web application (or website) has been pre-compiled (published)? I'm thinking of things like user control declarations...or others? thanks heaps! ...

Separating web.config sections using configsource in a server farm

Looking ahead in the likely event we will build a server farm rather than maintaining individual servers etc I am looking into ways to reduce the task required for running an asp.net web application on a server farm. With regards web.config files, I belive that all the web.configs need to be same on each machine. I assume that in the ca...

TFS 2008, remove file from source control but leave it in the project

We are using Scott Hansleman's suggestion for multiple web.configs from his post here. The problem we have is that we have to check out the Web.Config. If we remove it from the project, when we publish, no web.config is pushed. So we need to remove the source control bindings just from the web.config, but leave it in the project, and ...

Problems with Web.config and App.config

Intro: Normally we store ConnectionStrings and some other settings (<appSettings> <add key...) in the Web.config or App.config. My scenery: Web application using factory pattern with direct injection to read data providers. In the web.config I have the key that tells me which DLL (provider) will I use to retrieve my data. I can h...

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...

Add additional namespace to SubSonic 2.2 generated files

I think it should be possible to add additional namespaces to the generated classes without modifing SubSonic's core or the CS_ClassTemplate.aspx, but instead with a SubSonic config parameter. But atm I can't find any example. Does anyone know how this config option (if any) is called? ...

ASP.NET development server unwilling to upgrade to .NET 3.5

I had an ASP.NET 2.0 web project. Worked fine. I decided to upgrade the site to 3.5. The upgrade worked fine. I have added a IHttpHandler that required to include the following line in the web.config: <add verb="GET,POST" path="MyOperation.asmx" type="MyClass"/> This line in the web.config generates the following error: "Parser Error ...

Storing Smtp from email friendly display name in Web.Config

I'm storing my mailsettings in the web config like so... <mailSettings> <smtp from="[email protected]"> <network host="smtp.findremovalcompanies.com" userName="[email protected]" password="password" /> </smtp> </mailSettings> Now when I create a new var smtp = new SmtpClient(); smpt ha...

Find web.config location

Given virtual directory and port can you find the actual path of a web application? I can get the virtual directory and port via a visual studio setup project, and I'd like to make some modification to the web.config file after install (using a custom action). ...

How to stop Visual Studio adding assemblies to my web.config?

Every time i build, or publish, a web-site, Visual Studio attempts to check out the web.config file so that it can add numerous assemblies that are not required. In other words: web.config before: <configuration> <system.web> <compilation> <assemblies> </assemblies> </compilation> </system.web> </co...

How can accept a *.aspx file any HTTP verb?

I want that my default.aspx accept all HTTP verbs like GET, POST, OPTIONS, PROPFIND, etc. Per default it accept only the verbs GET,HEAD,POST and DEBUG. If I change it over the GUI of the IIS Manager then i receive a web.config like: <?xml version="1.0" encoding="UTF-8"?> <configuration> <location path="default.aspx"> <system.webS...

Virtual Directory in Web Config

I am trying to add a virtual directory to my web config file so I can share master pages and images accross different applications. I have found very limited information and would apperciate any ideas you may have. Thanks ...

Differentiating web.config between dev, staging and production environments

Anyone have any good tips on handling differences in web.config settings between environments? I've considered creating a 'config' folder in our source control system but outside of the web hierarchy, and having the deployment process copy the appropriate config files (web.dev.config,web.staging.config, web.production.config) into the we...

Programatically set an ASP.NET website bindings for an IIS7 site?

Hi folks, i've got a simple ASP.NET website that i end up publishing/running on an IIS7 server. Is it possible to to add into my web.config file some 'binding' information, instead of having to set it manually through the site in IIS7. eg. imagine i have the following bindings http://foo.mysite.com 80 http://bar.mysite.com 80 http:/...

web.config and quotes in connectionStrings

I have the following connection string, and you will notice "Provider's.Tests", notice the single quote, how do I enter this in to the web.config to make it valid? <connectionStrings> <clear/> <add name="Provider" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Projects\Provider's.Tests\app_data\db.mdf";Integrate...

Using the database to hold application settings

I am looking at ways to make our application more extensible and easier to manipulate without having to alter the web.config (or, in our case, application.config files, which contain the appsettings node). One way I have thought about is keeping the app settings in the database table that has a sqlcachedependancy. This means that: Any...

ASP.NET compilationMode Auto vs Never

Let's assume my ASPX page has no inline C# code blocks. So, I can safely set <pages compilationMode="Never" /> ...in my web.config file and not worry about compilation errors. Performance-wise, would there be any penalty to using the following setting? <pages compilationMode="Auto" /> i.e. does the "auto" detection take any signi...

Error while deploying

I am getting the following error while deploying the web application Server Error in '/FormRelease' Application. -------------------------------------------------------------------------------- Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the de...

Default duration of Cache.Insert in ASP.NET

If I have the following line, when should I expect the cache to expire? System.Web.HttpRuntime.Cache.Insert("someKey", "Test value"); ...

SubSonic - dividing up web.config

I'm trying to divide up my web.config into multiple config files so that when I import the DLL to other projects, the .config files will also be imported. Issue is with SubSonicService: I've defined: configSections *section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/* /**configs...