Sunday, October 21, 2012
Tuesday, July 10, 2012
Biomass Briquetting

Biomass briquettes are a bio-fuel substitute to coal and charcoal. They are used to heat industrial boilers in order to produce electricity from steam. The most common use of the briquettes are in the developing world, where energy sources are not as widely available. There has been a move to the use of briquettes in the developed world through the use of co-firing, when the briquettes are combined with coal in order to create the heat supplied to the boiler. This reduces carbon dioxide emissions by partially replacing coal used in power plants with materials that are already contained in the carbon cycle. Manufacturers mainly use three methods to create the briquettes, each depending on the way the biomass is dried out. Although biomass briquettes are usually manufactured, biomass has been used throughout history all over the world from simply starting campfires to the mass generation of electricity.
Following are the advantages of briquette
• This is one of the alternative methods to save the consumption and dependency onfuel wood.
• Densities fuels are easy to handle, transport and store.
• They are uniform in size and quality.
• The process helps to solve the residual disposal problem.
• The process assists the reduction of fuel wood and deforestation.
• Indoor air pollution is minimized
For More Information Visit http://mmgreenfuel.in/
Friday, June 29, 2012
Web config Example, Web.config ASP.Net 2.0 & 3.5
When the site goes live change the debug setting to false which will make the site have a little better performance.
<compilation defaultLanguage="C#" debug="true" />
Customer errors can be handled be turned off but I prefer them to be turned on as below.
<customErrors mode="Off" />
You can also do per page tracing so that you can turn off application Tracing and have trace="true" at the top of a single page.
<trace enabled="true" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true"/>
ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ConnectionInfo" value="server=(local);database=Northwind;Integrated Security=SSPI" />
</appSettings>
</configuration>
Multiple File Configuration
The appSettings element may contain a file attribute that points to an external file. Let’s change our web.config to look like the following
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings file="dbsettings.config"/>
</configuration>
Next, we can create the external file ‘dbsettings.config’ and add an appSettings section with our connection information.
<appSettings>
<add key="ConnectionInfo" value="server=(local);database=Northwind;Integrated Security=SSPI" />
</appSettings>
If the external file is present, ASP.NET will combine the appSettings values from web.config with those in the external file. If a key/value pair is present in both files, ASP.NET will use the value from the external file.
Session States:
Session in Asp .net web application is very important. As we know that HTTP is a stateless protocol and we needs session to keep the state alive. Asp .net stores the sessions in different ways. By default the session is stored in the asp .net process. You can always configure the application so that the session will be stored in one of the following ways
Session State Service
There are two main advantages of using the State Service. First the state service is not running in the same process as the asp .net application. So even if the asp .net application crashes the sessions will not be destroyed. Any advantage is sharing the state information across a Web garden (Multiple processors for the same computer).
Lets see a example of the Session State Service.
<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:55455" sqlConnectionString="data source=127.0.0.1;user id=sa;password='' cookieless="false" timeout="20"/>
The attributes are self explanatory but I will go over them.
mode: This can be StateServer or SqlServer. Since we are using StateServer we set the mode to StateServer.
stateConnectionString: connectionString that is used to locate the State Service.
sqlConnectionString: The connection String of the sql server database.
cookieless: Cookieless equal to false means that we will be using cookies to store the session on the client side.
SQL Server
The final choice to save the session information is using the Sql Server 2000 database. To use Sql Server for storing session state you need to do the following:
Run the InstallSqlState.sql script on the Microsoft SQL Server where you intend to store the session.
You web.config settings will look something like this:
<sessionState mode = "SqlServer" stateConnectionString="tcpip=127.0.0.1:45565" sqlConnectionString="data source="SERVERNAME;user id=sa;password='' cookiesless="false" timeout="20"/>
SQL Server lets you share session state among the processors in a Web garden or the servers in a Web farm. Apart from that you also get additional space to store the session. And after that you can take various actions on the session stored.
The downside is SQL Server is slow as compared to storing session in the state in process. And also SQL Server cost too much for a small company.
InProc:
This is another Session State. This one is mostly used for development purposes. The biggest advantage of using this approach is the applications will run faster when compared to other Session state types. But the disadvantage is Sessions are not stored when there is any problem that occurs with the application, when there is a small change in the files etc., Also there could be frequent loss of session data experienced.
Error Handling:
<customErrors mode = "On">
<error statusCode = "404" redirect = "errorPage.aspx" />
</customErrors>
Security:
The most critical aspect of any application is the security. Asp.net offers many different types of security method which can be used depending upon the condition and type of security you need.
No Authentication:
No Authentication means "No Authentication" :) , meaning that Asp.net will not implement any type of security.
Windows Authentication:
The Windows authentication allows us to use the windows user accounts. This provider uses IIS to perform the actual authentication, and then passes the authenticated identity to your code. If you like to see that what windows user is using the Asp.net application you can use:
User.Identity.Name;
This returns the DOMAIN\UserName of the current user of the local machine.
Passport Authentication:
Passport Authentication provider uses Microsoft's Passport service to authenticate users.
Forms Authentication:
Forms Authentication uses HTML forms to collect the user information and than it takes required actions on those HTML collected values.
In order to use Forms Authentication you must set the Anonymous Access checkbox checked. Now we need that whenever user tries to run the application he/she will be redirected to the login page.
<authentication mode="Forms">
<forms loginUrl = "frmLogin.aspx" name="FAutho" timeout="1"/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<customErrors mode="Off" />
You can also do per page tracing so that you can turn off application Tracing and have trace="true" at the top of a single page.
<trace enabled="true" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true"/>
ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ConnectionInfo" value="server=(local);database=Northwind;Integrated Security=SSPI" />
</appSettings>
</configuration>
Multiple File Configuration
The appSettings element may contain a file attribute that points to an external file. Let’s change our web.config to look like the following
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings file="dbsettings.config"/>
</configuration>
Next, we can create the external file ‘dbsettings.config’ and add an appSettings section with our connection information.
<appSettings>
<add key="ConnectionInfo" value="server=(local);database=Northwind;Integrated Security=SSPI" />
</appSettings>
If the external file is present, ASP.NET will combine the appSettings values from web.config with those in the external file. If a key/value pair is present in both files, ASP.NET will use the value from the external file.
Session States:
Session in Asp .net web application is very important. As we know that HTTP is a stateless protocol and we needs session to keep the state alive. Asp .net stores the sessions in different ways. By default the session is stored in the asp .net process. You can always configure the application so that the session will be stored in one of the following ways
Session State Service
There are two main advantages of using the State Service. First the state service is not running in the same process as the asp .net application. So even if the asp .net application crashes the sessions will not be destroyed. Any advantage is sharing the state information across a Web garden (Multiple processors for the same computer).
Lets see a example of the Session State Service.
<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:55455" sqlConnectionString="data source=127.0.0.1;user id=sa;password='' cookieless="false" timeout="20"/>
The attributes are self explanatory but I will go over them.
mode: This can be StateServer or SqlServer. Since we are using StateServer we set the mode to StateServer.
stateConnectionString: connectionString that is used to locate the State Service.
sqlConnectionString: The connection String of the sql server database.
cookieless: Cookieless equal to false means that we will be using cookies to store the session on the client side.
SQL Server
The final choice to save the session information is using the Sql Server 2000 database. To use Sql Server for storing session state you need to do the following:
Run the InstallSqlState.sql script on the Microsoft SQL Server where you intend to store the session.
You web.config settings will look something like this:
<sessionState mode = "SqlServer" stateConnectionString="tcpip=127.0.0.1:45565" sqlConnectionString="data source="SERVERNAME;user id=sa;password='' cookiesless="false" timeout="20"/>
SQL Server lets you share session state among the processors in a Web garden or the servers in a Web farm. Apart from that you also get additional space to store the session. And after that you can take various actions on the session stored.
The downside is SQL Server is slow as compared to storing session in the state in process. And also SQL Server cost too much for a small company.
InProc:
This is another Session State. This one is mostly used for development purposes. The biggest advantage of using this approach is the applications will run faster when compared to other Session state types. But the disadvantage is Sessions are not stored when there is any problem that occurs with the application, when there is a small change in the files etc., Also there could be frequent loss of session data experienced.
Error Handling:
<customErrors mode = "On">
<error statusCode = "404" redirect = "errorPage.aspx" />
</customErrors>
Security:
The most critical aspect of any application is the security. Asp.net offers many different types of security method which can be used depending upon the condition and type of security you need.
No Authentication:
No Authentication means "No Authentication" :) , meaning that Asp.net will not implement any type of security.
Windows Authentication:
The Windows authentication allows us to use the windows user accounts. This provider uses IIS to perform the actual authentication, and then passes the authenticated identity to your code. If you like to see that what windows user is using the Asp.net application you can use:
User.Identity.Name;
This returns the DOMAIN\UserName of the current user of the local machine.
Passport Authentication:
Passport Authentication provider uses Microsoft's Passport service to authenticate users.
Forms Authentication:
Forms Authentication uses HTML forms to collect the user information and than it takes required actions on those HTML collected values.
In order to use Forms Authentication you must set the Anonymous Access checkbox checked. Now we need that whenever user tries to run the application he/she will be redirected to the login page.
<authentication mode="Forms">
<forms loginUrl = "frmLogin.aspx" name="FAutho" timeout="1"/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
After your application has authenticated users, you can proceed to authorize their access to resources. But there is a question to answer first: Just who is the user to whom your are grating access?
<authorization>
<allow .../>
<deny .../>
</authorization>
allow : Adds to the mapping of authorization rules an authorization rule that allows access to a resource.
deny : Adds to the mapping of authorization rules an authorization rule that denies access to a resource.
Configurable locations
<authorization>
<allow .../>
<deny .../>
</authorization>
allow : Adds to the mapping of authorization rules an authorization rule that allows access to a resource.
deny : Adds to the mapping of authorization rules an authorization rule that denies access to a resource.
Configurable locations
- Machine.config
- Root-level Web.config
- Application-level Web.config
- Virtual or physical directory–level Web.config
Wednesday, June 27, 2012
THE MAKING OF A WARRIOR
Another cluster of 678 brave men (including 21 from friendly nations) joins Army today to give their precious years and all they have to keep us safe. We salute every 1 GC who becomes an officer today and congratulate the 130 regular course IMA that passes out today as they are now a part of the prestigious INDIAN ARMY
# 'Sword of Honour' -Bhanu Pratap Singh Mankotia
# The silver medal for standing second in the merit order in regular course given to Sandip Kumar Yadav
Welcome to the party boys!
Make the Motherland proud!
Jai Hind
Save Water
Feel yourself RICH:
If you have clothes to cover your full body,
If you sleep under a Roof,
If you can travel in or on any vehicle,
If you have something to wear in you feet while walking on the burning land,
.
or
.
If you can Drink the Water in a Glass,
Because not everyone is lucky enough to have all this.
And final message is clear from this Image....
Don't Waste WATER, Save it for not someone else but your own next generation...
Tuesday, June 19, 2012
State Management in an ASP .Net application
State Management in an ASP .Net applicationWhen users visit Web sites it becomes necessary to maintain session related and controls related information. In an HTTP exchange between a browser and a remote host, session related information which identifies state, such as a unique session ID, information about the user's preferences or authorisation level is preserved. Note that sessions are maintained in the data being exchanged.
State Management is the process by which we maintain session related information and additional information about the controls and its state. The necessity of state management arises when multiple users request for the same or different Web Pages of a Web Site.
State management can be accomplished using Client Side options or the Server side options.
Client Side State Management Options
State Management is the process by which we maintain session related information and additional information about the controls and its state. The necessity of state management arises when multiple users request for the same or different Web Pages of a Web Site.
State management can be accomplished using Client Side options or the Server side options.
Client Side State Management Options
Client Side State Management involves storing information either on a Web page or on a Client computer. There are four ways to manage states.
View State
Hidden Form Fields
Cookies
Query String
View State
View State
Hidden Form Fields
Cookies
Query String
View State
In this method, the ViewState property that is inherited from the base Control class is used to automatically save the values of the page and of each control prior to rendering of the page. ViewState is implemented with a hidden form field called the _VIEWSTATE, which is automatically created in every Web Form page. When ASP.Net executes a Web page on a Web Server, the values stored in the ViewState property of the page and controls on it are collected and formatted into a single encoded string. The encoded string is then assigned to the Value attribute of the hidden form field _VIEWSTATE and is sent to the client as a part of the Web page.
Hidden Form Fields
Hidden Form Fields
In ASP.Net we can use the HTML standard hidden fields in a Web Form to store page-specific information. A hidden field does not render in a Web browser. However, we can set the properties of the hidden field. When a page is submitted to the server, the content of the hidden field is sent in the HTTP Form collection along with values of other controls.
Cookies
Cookies
A cookie is a small data structure used by a Web server to deliver data to a web client. A cookie contains page specific information that a Web server sends to a client along with Page output. Cookies are used to keep track of each individual user who accesses the web page across a HTTP connection.
Query String
Query String
The Query string is a part of the request that appears after the Question mark (?) character in the URL. A query string provides a simple way to pass information from one page to another.
Server Side State Management Options
Application State
Server Side State Management Options
Application State
ASP.Net provides application state as a means of storing global application specific information. The information in the application state is stored in a key value pair and is used to maintain data consistency between server round trips and between pages.
Session State
Session State
In this option session state used to store session specific information for a Web site. In session state, the scope fo session state is limited to the current browser session. In case, many users are accessing the same Web application, each will have a different session state. If a user exits from a Web applicatin and returns later, it will be a different session state.
Database SupportAnother option is the database support option. Database support is used in combination with cookies or session state. The database used is usually a relational database.
Database SupportAnother option is the database support option. Database support is used in combination with cookies or session state. The database used is usually a relational database.
DotNet Interview Questions
Web.config file is used...
To store the global information and variable definitions for the application
The first event triggers in an aspx page is.
The first event triggers in an aspx page is.
Page_Init()
Difference between Response.Write() andResponse.Output.Write().
Difference between Response.Write() andResponse.Output.Write().
Response.Output.Write() allows you to write formatted output
Which method must be overridden in a custom control?
Which method must be overridden in a custom control?
The Render() method
How do we create a FileSystemObject?
How do we create a FileSystemObject?
Server.CreateObject("Scripting.FileSystemObject")
Which tool is used to manage the GAC?
Which tool is used to manage the GAC?
GacUtil.exe
What class does the ASP.NET Web Form class inherit from by default?
What class does the ASP.NET Web Form class inherit from by default?
System.Web.UI.Page
Caching type supported by ASP.Net?
Output Caching and Data Caching
Why is Global.asax is used?
Implement application and session level events
Which DLL translate XML to SQL in IIS?
SQLISAPI.dll
Default Session data is stored in ASP.Net.?
InProcess
Default scripting language in ASP.?
VBScript
How do you get information from a form that is submitted using the "post" method?
Request.Form
Which object can help you maintain data across users?
Application object
Which ASP.NET object encapsulates the state of the client?
Session object
Which object is used along with application object in order to ensure that only one process accesses a variable at a time?
Synchronize()
You can have only one Global.asax file per project.
Yes
Which element in the web.config file to run code using the permissions of a specific user
< identity> element
Which is a special subfolder within the windows folder that stores the shared .NET component.
GAC
Which property affects how the .Net Framework handles dates, currencies, sorting and formatting issues.
CurrentCulture
Where do we include the user lists for windows authentication?
< authorization>
Where do we include the user lists for Form authentication?
< credential>
Which of the following authentication is best suited for a corporate network?
Windows
What attributes do you use to hide a public .Net class from COM?
ComVisible attributes
By default, code written with the Debug class is stripped out of release builds.
Yes
Which tests make sure that new code does not break existing code.
Unit tests
Which is used to cache multiple responses for a single web form based on HTTP POST parameter or query string?
VaryByParams
Subscribe to:
Posts (Atom)

