web-config

How is the order of execution for HttpModules determined?

Suppose that both FirstModule and SecondModule handle the Application_BeginRequest event. Will it execute in the order defined in the web.config? <httpModules> <add type="MyApp.FirstModule, MyApp" name="FirstModule"/> <add type="MyApp.SecondModule, MyApp" name="SecondModule"/> <add type="OtherApp.OtherModule, OtherApp" name="Other...

Custom RoleProvider with MVC 2.0 webconfig

I have a custom MembershipProvider and a custom RoleProvider. I created the custom MembershipProvider by creating a SimpleMembershipProvider class which implements the MembershipProvider class. After that I changed my web.config and works. So I used the same approach creating a custom RoleProvider. Nothing special, just creating a Sim...

XMLPoke a referenced assembly's appconfig value?

I have an assembly built that uses appSettings in the app.config...pretty straight forward. however, I'm referencing this assembly in a web service, and that web service contains the nAnt build file for this service plus being the entry point for everything. Ideally I'd like to be able to set the assembly's appConfig values from the bu...

Error in Encrypting web.config connection string

Hi everybody, I am encrypting web.config file. My code is below. Configuration config = WebConfigurationManager.OpenWebConfiguration("~"); ConfigurationSection section = config.GetSection("connectionStrings"); if (!section.SectionInformation.IsProtected) { section.SectionInformation.ProtectSection("RSAProtectedConfigurationProvider...

Removing modifications from the web.config file with a path=configuration/system.web/compilation/assemblies

i did a feature that allow me to add and remove modifications to the web.config file. So i am able remove all modifications except those with a path equal to: configuration/system.web/compilation/assemblies and i don't know how to fix this. so any idea ...

Can you pull the connectionString for a log4net AdoNetAppender from elsewhere in a web.config file?

Hey all. This is my first StackOverflow question. I'm already have a db connection string in my web.config file. I scanned the log4net docs, but can't seem to find a way to use it within the log4net section of my web.config file. Is is possible to do something like this? <connectionStrings> <add name="connStr" connectionString="...

Editing a web.config file through web application will cause any security problem?

We developed an application to edit the web.config settings. The user has to locate the web.config file which they like to edit. Once their task is completed they can download the web.config file with the changes made by them. Since the web.config file has the database server information and passwords I have a concern that will it cause ...

Web.config encryption/decryption

In my applications we.config file I have a connection string stored. I encrypted it using '---open the web.config file Dim config As Configuration = _ ConfigurationManager.OpenWebConfiguration( _ Request.ApplicationPath) '---indicate the section to protect Dim section As ConfigurationSection = _ conf...

Encrypting the connection string in web.config file in C#

I have written the name of my database, username and password in my web.config file as connection string. I want to encrypt this data. How can I do it? <connectionStrings> <add name="ISP_ConnectionString" connectionString="Data Source=JIGAR; Initial Catalog=ISP;Integrated Security=True; User ID=jigar;Passwor...

Specifying different page base classes for different directories in your web.config file

I have a website (coded in vb.net) with an "admin" section (the admin section being a folder in the actual site)... So in every page of the site I'm using my own custom class as the page base (which has been set in the web.config file) but I want to inherit from different class for the files in the "admin" folder... Is there any way to i...

Instantiate a ConfigurationSection from a different source

Is it possible and how to instantiate a custom System.Configuration.ConfigurationSection derived class from a different source (not dependent on App.config)? Here is what i want to get: [TestMethod] public void WorkWithALoadedConfiguration() { ProjectConfiguration projectConfiguration = LoadProjectConfiguration(filenameOrStreamOrXE...

Storing LDAP Credentials

What's the ideal way to store login and password for LDAP membership providers in the web.config? Having the login and password stored in the provider under connectionUsername/connectionPassword attributes does not go well with me because, I would want to encrypt the connection string later on. Don't have much experience with this, and...

Update ASP.NET web.config while still in process of client request

What happen if web.config gets updated while ASP (ASP.NET 2.0) server still process client request? - Will the process be killed? - If not, will the process read the updates in web.config. thanks for any input ...

Custom error handling Asp.Net

On my web application, I had configured my web.config file to set customerrors to ON, so here it is: <customErrors mode="On" defaultRedirect="Error.aspx"> <error statusCode="403" redirect="Error.aspx" /> <error statusCode="404" redirect="Error.aspx" /> </customErrors> For explaining propouses I only captured the 403 and 404 ...

Configuring ASMX Web Service End Points - web.config

I have set up references to 2 web services in a separate assembly TestProj.Core. I reference this Project in a Web Application Project called TestProj.Web. When I setup the references in TestProj.Core the wizard gave me an app.config and through an application settings section into it. How do I get these settings to my web app? Copy an...

What is the difference between customErrors and httpErrors?

Hi All What is the difference between the customErrors and httpErrors sections of the web.config file in ASP.NET MVC applications? What are the guidelines for using each section? Thanks. Alan T ...

Entity Spaces connect to mySQL and Access in same website

Hi all, I have a website built that uses MySql for data management. Everything works great there, however, I am now trying to add our web statistics to it - we have a generic standard that we use. This requires a connection to an MS Access database for login - user name and password, checks acess to that specific site. The stats w...

Publishing to live website

Hey there, My friend and I are collaborating on a ASP.NET powered website. To develop it locally, we use Visual Web Developer Express (good enough for our needs). Subversion (using Tortoise SVN) is our source control of choice with the repository residing on Unfuddle.com. We run into problems when we need to update the live site - sinc...

ASP.NET - Dynamically register an HttpHandler in code (not in web.config)

Is there a way I can dynamically register an IHttpHandler in C# code, instead of having to manually add it to the system.web/httpHandlers section in the web.config. This may sound crazy, but I have good reason for doing this. I'm building a WidgetLibrary that a website owner can use just by dropping a .dll file into their bin directory,...

The configuration file has been changed by another program.

I am receiving the following error where the system believes the web.config file is being modified. The actual file shows no changes to the web.config file modified date since the site was last published. The issue shows up when being redirected to another page, though the pages where the issue occurs will change and the error will exis...