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="email@example.com", 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="firstname.lastname@example.org" /> <oSite domain="xyz.com" defaultSiteTitle="This is Site XYZ" emailFromAddress="email@example.com" /> </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?
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 have built an ASP.NET (.NET v4) application in VS 2010. It is working just fine. But when I try to create deployment package (so I can deploy it in our test IIS 7.5 Server), it gives me error like this,
Error 1 Could not open Source file: Could not find file 'C:11-2 estobjDebugCSAutoParameterize ransformedWeb.config'. 0 0 test
Thing is in past, I had deployed the SAME application using the SAME method.
i'm working in vs2010 and am just about ready to deploy a Web sitei've read elsewhere that i should be able to add a web.release.config file and should be able to select it for the release buildso i added a web.release.config file right below my web.config file but it doesn't show up in my Configuration Manager
I want to publish my website from the development machine to QA server. Do I need to create a new web.config file which has the new data connection strings and copy it on the QA server or is there a better way of doing this, so that every time I publish modified files, the web.config does not get overwritten.
retrieve appsettings from the app.config file stored in a DLL directory?
I have read many posts on this and it appears as though it's not possible. I've tried all configurationmanager options without success.
Of course, when my .net web app runs, it configurationmanager pulls the settings from the web.config which I understand. I would just like to have a configuration file dedicated to the dll. (like app.config).
If I encrypt something in my config file using aspnet_regiis.exe -pef "appsettings" "path" which i think will use my logged in id's credentials. If i deploy this application on some other machine where some other user id is used to login. Will there be any issues or .......?