Thursday, October 11, 2007

Include Multiple .Config Files in ASP.NET Web Application

From the basis a web.config file is a nothing but a simple XML configuration file. So it is a theoretical as well as practically possible to keep more than one configuration file in a single ASP.NET web application

Microsoft ASP.Net provides a configuration system that can be used to keep our applications flexible at run-time. In this article, mentioning how to manage more than one .config file in a single ASP.Net web application. The usage of multiple configuration file makes the application more secure and manageable and flexible.

Web.config exposes an <appSettings> element that can be used as a place to store application settings like connection strings, file paths, etc. Using the web.config is an ideal method of creating a robust application that can quickly adapt to changes in its environment. For instance, if the connection string is stored in web.config and is being called from the web-pages from there, then changes in the connection string will have to be made in web.config only. Otherwise, the user would have to go to each page individually and update the connection string.


 

Web.Config file

<?xml
version="1.0"?>

<configuration>

    <appSettings/>

    <connectionStrings/>

    <system.web>

        <compilation
debug="false"
strict="false"
explicit="true" />

    </system.web>

    <appSettings>

      <add
key="myConnInfo" value="server=_;database=_;user=_;pass=_;" />

    </appSettings>

</configuration>


 

Multiple Config Files

The appSettings element can contain a file attribute that points to an external file. Just change my web.config file to look like the following: 

<?xml
version="1.0"?>

<configuration>

    <appSettings/>

    <connectionStrings/>

    <system.web>

        <compilation
debug="false"
strict="false"
explicit="true" />

    </system.web>

    <appSettings
file="externalSettings.config"/>

</configuration>


 

Next, we can create the external file "externalSettings.config" and add an appSettings section with our connection information and any other settings that we want to use.

If the external file is present, ASP.Net combines the appSettings values from web.config with those in the external file. If a key/value exists in both files, then ASP.Net will use the setting from the external file.

This feature is useful when one keeps user-specific or environment-specific settings in the external file. It is better to design web.config to contain those settings that are global, while each user setting is contained in an external file. This approach makes it easier to move around global web.config changes.

One caution to this approach is that ASP.Net runtime does not detect when the external file changes. Thus to launch a new version of the application with all changes in effect, one will need to make changes to the web.config itself.


 


 

Microsoft Office SharePoint Server 2007 top 10 benefits

Microsoft Office SharePoint Server 2007 top 10 benefits


 

Provide a simple, familiar, and consistent user experience.

Office SharePoint Server 2007 is tightly integrated with familiar client desktop applications, e-mail, and Web browsers to provide a consistent user experience that simplifies how people interact with content, processes, and business data. This tight integration, coupled with robust out-of-the-box functionality, helps you employ services themselves and facilitates product adoption.

  

Boost employee productivity by simplifying everyday business activities.

Take advantage of out-of-the-box workflows for initiating, tracking, and reporting common business activities such as document review and approval, issue tracking, and signature collection. You can complete these activities without any coding. Tight integration with familiar client applications, e-mail, and Web browsers provide you with a simple, consistent experience. Modifying and extending these out-of-the-box workflow processes is made easy through tools like Microsoft Office SharePoint Designer 2007 (the next release of Microsoft Office FrontPage).

  

Help meet regulatory requirements through comprehensive control over content.

By specifying security settings, storage policies, auditing policies, and expiration actions for business records in accordance with compliance regulations, you can help ensure your sensitive business information can be controlled and managed effectively. And you can reduce litigation risk for your organization. Tight integration of Office SharePoint Server 2007 with familiar desktop applications means that policy settings are rendered onto client applications in the Microsoft Office system, making it simpler for employees to be aware of and comply with regulatory requirements.

  

Effectively manage and repurpose content to gain increased business value.

Business users and content authors can create and submit content for approval and scheduled deployment to intranet or Internet sites. Managing multilingual content is simplified through new document library templates that are specifically designed to maintain a relationship between the original version and different translations of a document.

  

Simplify organization-wide access to both structured and unstructured information across disparate systems.

Give your users access to business data found in common line-of-business systems like SAP and Siebel through Office SharePoint Server 2007. Users can also create personalized views and interactions with business systems through a browser by dragging configurable back-end connections. Enterprise-wide Managed Document Repositories help your organizations store and organize business documents in one central location.

  

Connect people with information and expertise.

Enterprise Search in Office SharePoint Server 2007 incorporates business data along with information about documents, people, and Web pages to produce comprehensive, relevant results. Features like duplicate collapsing, spelling correction, and alerts improve the relevance of the results, so you can easily find what you need.

  

Accelerate shared business processes across organizational boundaries.

Without coding any custom applications, you can use smart, electronic forms–driven solutions to collect critical business information from customers, partners, and suppliers through a Web browser. Built-in data validation rules help you gather accurate and consistent data that can be directly integrated into back-end systems to avoid redundancy and errors that result from manual data re-entry.

  

Share business data without divulging sensitive information.

Give your employees access to real-time, interactive Microsoft Office Excel spreadsheets from a Web browser through Excel Services running on Office SharePoint Server 2007. Use these spreadsheets to maintain and efficiently share one central and up-to-date version while helping to protect any proprietary information embedded in the documents (such as financial models).

  

Enable people to make better-informed decisions by presenting business-critical information in one central location.

Office SharePoint Server 2007 makes it easy to create live, interactive business intelligence (BI) portals that assemble and display business-critical information from disparate sources, using integrated BI capabilities such as dashboards, Web Parts, scorecards, key performance indicators (KPIs), and business data connectivity technologies. Centralized Report Center sites give users a single place for locating the latest reports, spreadsheets, or KPIs.

  

Provide a single, integrated platform to manage intranet, extranet, and Internet applications across the enterprise.

Office SharePoint Server 2007 is built on an open, scalable architecture, with support for Web services and interoperability standards including XML and Simple Object Access Protocol (SOAP). The server has rich, open application programming interfaces (APIs) and event handlers for lists and documents. These features provide integration with existing systems and the flexibility to incorporate new non-Microsoft IT investments.


 


 

Reference:

http://office.microsoft.com/


 


 

Monday, July 30, 2007

Creating a Multi language Site in ASP.Net using Localisation

Learn how to create culture-aware and locale-specific web content with no additional code. Use the Resource Editor to create page-level and application-level resources.


View Video Tutorial: http://download.microsoft.com/download/3/6/0/3604c3d2-0db9-4726-910d-b3b8f93a86e4/hilo_localization_final.wmv


Source: www.microsoft.com