I am designing a web application for Leave Application of our faculties. There is a form in my website which represent the existing paper-back leave application form. Users(faculties) have to fill-up this web form and after validation an email will be send to the email address of our principal/hod. I hope that email address(s) will be provided to our group members. Now I want to know that what will be the required configuration of the web.config file? I found this blog ScottGu's Blog. Here the given configuration is:
But I think this is not acceptable for my project as the smtp from="firstname.lastname@example.org", userName, password are unknown to me. So what should I do. Am I able to understand my requirement to you?
I've been thinking about this for a couple days but still would like some feedback on the best way to go about this:
I have multiple sites (domains) that will be running the same code. However, there are a couple settings I have in the appsettings web.config file which are relative to each site. (ie: defaultSiteTitle, emailFromAddress, etc).
I would like to deploy this application in only one location (folder) and point the domains in IIS to that one directory.
To do this, I believe I cannot use the web.config file to hold these settings...
So, I decided to make a SiteSettings.xml file and load the site settings in there:
<sites> <oSite domain="abc.com" defaultSiteTitle="This is Site ABC" emailFromAddress="email@example.com" /> <oSite domain="xyz.com" defaultSiteTitle="This is Site XYZ" emailFromAddress="firstname.lastname@example.org" /> </sites>
So when I need to access the site settings I just call a function in my datalayer that reads this xml file and via the httpRequest I pass it it determines which site settings to use.
Okay, that works when I call it from a page where I have the httpRequest...
Howver, now when I'm into some business layer functions say sendEmail and I need to find the emailFromAddress from the SiteSettings.xml file, I don't have the httpRequest. I know I could probably hack something together and pass it someway...
But I'm trying to figure out the best way to do this...
I don't really want to store it into session.
Is it possible to tell IIS what web.config file to look at, if I had multiple web.config files? (I don't think this is possible).
I have few settings which I could place in a separate XML file and have them accessed in the Web app. Then I thought (thinking of one additional file to deploy), why not have them in the web.config itself. However, just because I need to have custom nodes, I can not have the settings under . So, I am thinking of creating a custom config handler following this. Would that be better than having a separate XML file? Is It going to be an overkill or performance wise? Is there a better way to go?
I have a few app settings I want to update from within my web site and to do this I use this code:
This works fine in my development enviroment but when using IIS7 I get an exception while saving these settings:Access to the path 'C:InetpubwwwrootNSiteCOMweb.config' is denied.How can I configure IIS7 to allow my application to update web.config?
Web.config is the main settings and configuration file for an ASP.NET web application. The file is an XML document that defines configuration information regarding the web application. The web.config file contains information that control module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as database connection strings
<!-- This is an example Web.config file -->
Step 1: Create a new ASP.NET website. Add a button control to the Default.aspx.
Step 2: Right click the project > Add New Item > Web Configuration File
Add the following sample entry to the appSettings section in the web.config between the <configuration> tag as shown in the example 1:
<add key="var1" value="SomeValue"/>
<input type="button" value="Get" onclick="ReadConfigSettings();" /> That's it. Run the application and click the button. The value of the key in the appSettings will be displayed in the alert window. I hope you liked this short article.
I'm starting to consider creating a class library that I want to make generic so others can use it. While planning it out, I came to thinking about the various configuration settings that I would need. Since the idea is to make it open/shared, I wanted to make things as easy on the end user as possible. What's the best way to setup configuration settings without making use of web.config/app.config?
What it best location to store various configuration settings of a web site modules. Creating class (that inherit ConfigurationSection) that map the settings in web.config file?Or creating some DAL and BLL clases that work with database?
This is a general question and is not about any particular issue that I am facing right now.As configuration settings in the child level can override the ones in parent level,errors can occur when you have 2 web.config files one redefining configuration settings that you cannot override such as authentication or session state.Issue happens when you have authentication / session state set on the lower level web.config and also in higher level web.config. Is there any other configuration settings like these ?
My asp.net app has is using a web.config for common configuration. I also have a section that maps some data objects to connection strings, and that section is going to be couple thousand of lines. I want to move that section to another config file "dataMappings.config", so I don't bulk up web.config - is there a standard mechanism of accessing that config file?
We are experiencing some strange behaviour on one of our ASP.NET web servers (Windows 2003 64-bit). After some activity, two third-party controls are unable to run correctly. One is log4net (it does not write error messages out) and the other is a menu control (it displays eval message instead of picking up its license). The one common thread is that both controls pick up their config from external config files (linked to from web.config).
Just wondering if anyone has any thoughts on this or experienced this in any way. Is it related to file/folder rights? The server has been running fine for a while and just started exhibiting this behaviour. Perhaps it occurs around the time the worker processes are recycled.
I want to delete location path using parameter textbox and allow user ..
location path = textbox1 allow user = textbox2
explanation : i enter name of location path in the texbox1 and allow user in the texbox2, when i click button delete then location path based on parameter textbox1 and textbox2 in web config will be remove..