Monday, 29 April 2013

How to add WEB.CONFIG File in ASP.NET


HOW TO ADD WEB.CONFIG FILE IN ASP.NET ?


This is the basic structure of web.config file . 




<?xml version="1.0"?>
<configuration>
  <appSettings></appSettings>
  <connectionStrings> </connectionStrings>
    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
</configuration>



APPSETTINGS

   <appSettings>
      <add key="name" value="abc@domain.com" />
      <add key="password" value="password" />
  </appSettings>

CONNECTION STRING 


 <connectionStrings>
    <add name="con1"   
    connectionString="Server=servername;Database=databasename;Integrated Security=true;" />
  </connectionStrings>

SYSTEM.WEB

<system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>

Custom Error : 


 <customErrors mode="RemoteOnly"  defaultRedirect="ErrorPage.aspx">

      <error statusCode="403" redirect="default.htm" />
      <error statusCode="404" redirect="defaultPage.aspx" />
 </customErrors>




Standard Configuration Tags


Standard Configuration Tags 

THREE MAIN CONFIGURATION GROUP : 



  • ASP.NET Application Configuration
  • ASP.NET System Configuration
  • ASP.NET Security Configuration



  • SESSION STATE  :   <sessionState> Allows configuration of the System  session state HTTP module.
  • TRACE :  <trace> Allows configuration of the ASP.NET Application  trace service.
  • TRUST : <trust> Allows configuration of the code Security  access security permission set used to run your  application.
  • WEB REQUEST MODULE : <webRequestModules> Allows configuration of ASP.NET’s System use of modules for request processing based on the prefix.
  • WEB SERVICES : <webServices> Allows configuration of ASP.NET System  Web Services settings.


WEB CONFIGURATION FILE (WEB.CONFIG FILE )

WEB CONFIGURATION FILE : 


WEB CONFIGURATION  FILE  IS USED TO MANAGE THE  WEBSITE /APPLICATION  SETTINGS .

THESE ARE BASICALLY XML FILES THAT IS SEPARATED  FROM THE APPLICATION CODE i.e configuration settings  set independently from the code . 


WEB.CONFIG FILES CAN BE MULTIPLE.


NOTE :  Web site contains a single Web.config  file and that file  is  stored inside the application's root directory.






The Framework Class Library in ASP.NET OR BCL(BASE CLASS LIBRARY )


THE FRAMEWORK CLASS LIBRARY OR BCL(BASE CLASS LIBRARY )


   BCL(Base Class Library )  is the core component of the .Net   Framework  we can refer it as a building
   block  of .Net .

   It is collection of types   for eg:  primitive types,classes,interfaces etc.  that optimize the development                    
   process.

  In simple form we can say that it provides the consistent base types  that are used across all .Net          
  Languages.








Sunday, 28 April 2013

ASP.NET : COMPILATION AND EXECUTION

COMPILATION AND EXECUTION  : 


Code is expressed in a form of bytecode called  MSIL—Microsoft Intermediate  Language 

Thursday, 25 April 2013

ASP.NET - PRACTICAL TUTORIAL (How to Create First Application in ASP.NET ? )


ASP.NET - PRACTICAL  TUTORIAL 

How to Create First Application in ASP.NET ? 

Creating  First Application :  To create application  you should be aware of the following things ...


DEVELOPMENT TOOLS   AND FRAMEWORK  :  Microsoft  Visual Studio 2010/2012 Software

.Net Framework (3.5 /4.0) 

Programming Languages : ASP.NET (4.0) , C# , VB.NET 


VISUAL STUDIO 2010 Professional Software  :  



We will now create ASP.NET EMPTY WEBSITE  and  we  will select .Net Framework 4 , file system and give the name to our website and and specify the location where we want to store it like C:/














Now we will add a web form to start with so , from solution explorer ,  we will select add new item option and we will select add  WEB FORM .  and name it as Default.aspx



After adding a default.aspx we will see that  default.aspx  page appears ,  which have two sections / views one is Design View and other is Code view .



       
Now Run this application(F5) or start debugging (F5)  : We will see the result as shown below .


ASP.NET -.NET FRAMEWORK


.NET FRAMEWORK :

  COMMON TYPE SPECIFICATION 

   CTS  generally defines that how the types are defined ? how they are managed ? and how they are used .

   for e.g : classes, interfaces , public , private ,methods etc. 

    So , for this we have  CLS (COMMON LANGUAGE SPECIFICATION )  : 
    This enables the cross-  language  integration . 

   CTS  is the  communication bridge between the multiple languages. 

    

For example:  CTS uses the data type system. int32 to 
represent a 4 byte integer value  and  Visual Basic uses the alias integer for the same, whereas  C# uses the alias int.








ASP.NET - .NET FRAMEWORK


.NET  FRAMEWORK :



 CLR (Common Language Runtime ) :  In simple sense we can say that it is the environment where    application  / code gets executed . So technically its a runtime environment which loads , executes and locates the .Net Types . 

CLR  FUNCTIONALITIES :  
  • SECURITY 
  • VERSIONING 
  • MEMORY MANAGEMENT (AUTOMATIC): garbage collection
  • EXCEPTION HANDLING 
  • CODE VERIFICATION 


 CLR can also be stated as execution engine as it supports  execution  for multiple  languages.











Wednesday, 24 April 2013

Asp.Net Tutorial (What is ASP.NET ?)


What is Asp.net ?




  • Asp.net is  nothing but a server side technology . Its used for development purposes.
  • Asp.Net  known as active server pages technology is the latest version which incorporates .net framework 4.0. Its main functionality lies on the fact that it generates both the dynamic view of pages which are very interactive.
  • Asp .net  runs on the web server .it is also known as server side scripting language
  • Asp.net support the file system therefore in it we can store any location such as c:/ ,E:/ etc.
  • In asp.net ~ IIS is inbuilt (already  installed in VS2010)
  • Asp.net is installed on home edition operating system .
  • Asp.net is used by developers but when its deployment time we use both the IIS  and asp.net



Requirements for Asp.net :


  • Microsoft environment
  • .Net framework
  • Web Server 

Asp.net - Guidance

Hi ,

 This guidance tour  will  cover each and every topic for  Asp.net.


 Firstly , we will go through the simple  theory  of what is     asp.net ..???
 Secondly we will  .Net Framework and will explain in simple language .
 and this will carry on .....

 Hope this will help  to understand the basic things in very simple language .