22 May 2008

Web Application and Security Issues

Web Security Tips For Beginners

I am going to explain the very basic security issues and solutions for the beginners while creating a web application.
For E.g.: We have two types of users Admin & members. All pages related to admin is present inside the folder named admin... "www.mysite.com\admin\" and all members’ specific pages are Present inside members folder... "www.mysite.com\member\" Handling some master records like Products etc... in the Database.

Authentication

The Authentication is based on your UserId saved inside your session (or token in a little advanced authentication) or some times in cookies, what ever the UserId must be present. Each and every page must have an authorization check in the page load event, and if session is ended you need to redirect to the login page. This Check is not only for !IsPostBack because page may be posted after a long time and your session may be ended with in this time. The URL to redirected after Login can be saved in either session or by Passing as a Query String with URL-Encoded form, after successive login you can redirect to this location. One thing better you save the full URL instead of saving the Page Name only.

Authorization

The Autorisation is the checking that whether the user have right permission to requested resource or use the resource , the resource mentioned here is not only the page but also the data manipulated using this page. Here all the pages inside admin folder must be accessible only for the admin users. If the member user login in and try to access the admin pages then the request bust be denied .so the user type checking is one of the authorization method.

Security Issues

Query String & Security
Suppose you have a page which is used to edit any master record like product and you are passing the product id through QueryString it is easy to access any product by any user, Just by changing the id in the query-String and can make changes .It is simple To prevent this situation by changing the select criteria in SQL, just use a UserId check in the SQL (your UserId will present in the session or where it is saved ) i.e. “select * from produt where ProductID=@ProductID and UserId=@UserId " so one user can't access the Other user's resources. This Issues is not only for Query String(Request Paramerters) but also for all type of parameters like posts like combo-Box , Text-Box etc.. So user UserId checking along with all data manipulation Queries because Hackers have many options to access these resource with in the http protocol.

Upload & Security Issue

If you are providing file system for the users i.e. user can upload any file in to their own folder the you have to strictly check the extensions allowed. Because if the application in asp.net your users may upload an aspx file which contain codes to damage or hack your server and they can call this page through the browser’s if you are allowing the user to upload to an open site folder then extension check must be done (not only for asp but for all server side scripting page extensions like (php, jps , or any server side executable extension).

UserId & Security No

If you are saving user information, like UserId inside the cookies , instead of session. Then the UserId must be encrypted. And /Or use a security Checking No like a random no along with the UserId, which must be saved in the data base and need to cross check. E.g.:
(UserId=1 & securityNo=34345243545) ,(UserId=2 & securityNo=23847223), (UserId=3 & securityNo=6767546).. etc.
The benefit of using this mechanism is that if any resource can access using a security hack can be prevented for multiple users. the security no is generated and saved along with user creation with in the table (do not confused with security No & Password both are different Security No is almost hidden from user it is an auto generated No). It is widely used in open Request & accepts Procedure like friends Request.
These are some of the security tips for beginners while creating a web application with any type of server side scripting languages.

10 May 2008

Flash as Frontend & Dot Net as Backend

Why we need to blocked in HTML limitations ?. Flash give a wide range of freedom in web applications as client.In html lot of factors we need to take care of to make a robust design from different browsers, we limited to use sound , videos and animations.Flash gives a development freedom like desktop application.Sure there are limitations in flash ,but these limitations can be overcome with the help of server side scripting,flash request resource from server and give a user interface for the clients.i am interested to use these combination,i am using the communication medium as XML ,because both flash and .net give resources to use xml.

Here i am attaching a sample flash application which consumes .net at server side.

This is a Text-To-Speech & Lips Sync Application Developed in Flash with ActionScript 2. This is a module(under construction) of my project .
Pls Check It..

25 April 2008

ASP.Net & DataSource Controls


Data Source Controls & Data Source Consumed Controls

Generally it is not recommended to use data source controls. This is because of a believe that we will be limited inside the datasource framework.This is not true, datasource controls gives an abstract way of data manipulation , we can handle the process with the help of events provided by data source controls.
DataGridView is the most useful control which consumes datasource controls,it gives the options like sorting, paging etc.. in all of these events gridview will automatically call data-source control to retrieve data, in manual coding we need to call all proper query for all these events.
In some situations the SqlDatasource control can't use properly , at these situation we can use ObjectDataSource which is the powerful of all data source controls. It allow us to query a bulk record for paging .
We can even create a complete project without a single line of coding with ds-controls not only listing (selecting) records from table but also all data manipulation operation (insert update and delete ) with the help of DS-Controls. FormView-Control is the DS-Consumed Control that allow all the data manipulation operations with a windows form like environment.
Most people will leave this technology because of the customization problems arise with this technology,but actually it is very easy to handle these difficulties if you think a little different way .....
I will some tips that help you customize the data source controls and data-source consumed controls to achieve some risks you may find with coding .

Data-Source Controls and Parameters
For generating dynamic result with datasource controls we can pass parameters (control parameter , Query-string Parameter etc..)
Suppose you need to create a Search result from user table with a search patter from a TextBox named "FilterTextBox" , and your query is like this
" Select * From Users Where UserName like '%'+@Search +'%' "
so the parameter is @Search , Add a Select(Filter) Parameter with Name @Search and type as Control-Parameter and control-name as FilterTextBox
.
Control-Parameter is easy way to pass parameters , you can add a asp:label with visible=false as the parameter to hide sensitive informations like userId and you can pass the userId to this asp:label at the page_Load() event.

Nested DataSource Controls
Another benefit of datasource control is that we can place DataSource & Consumed-Controls inside a DataSource-Consumed Controls. We can pass Control-parameters To this controls from the derived data values.

20 April 2008

Shyam Krishnan

Me Shyam Krishnan

i need my blog in google search by the keyword "Shyam Krishnan".
Let me check whether this post with label Shyam Krishnan give me that postion in google ...
also i giving my address here .

Shyam Krishnan
Angamaly , Ernakulam (dt)
Kerala India
Email : malayalammail@gmail.com

16 April 2008

SEO - The Search Engine Optimization Tips

Search Engine Optimization


The term Search Engine Optimization or SEO is now common in the world of web.
To list you site top in the search from any search egine is the objective of seo. As a big percent of queries are from search engine it is now important to list you site top.You need to design & develop your site in such a way that search engines can catch the content in a friendly way.There are lot of factors affecting in seo. some of then are mensioning here.
Search Engine Optimization Kerala


SEO & Title of Page

Title (Title tag) of each and every page is a majour factor for search engine .The Title Tag must be Compact ,Sensible , and must be very much related to the content of your page. Pls do not use short story with your title !!. make title compact and raise your index up.

SEO & Description Meta Tag


(Description Meta Tag) of each and every page is a majour factor for search engine .The Description Tag will help you list in google search.

SEO & Page Name

PageName is also a factor of seo, name your page with a relevant keywords like "Search-Engine-Optimization.html".Query (?id=123) have no importance in seo. Try to split your contend with more pages and you will get more options for optimization. I am repeating the same thing about the title "do not try to create a story with your page name".

SEO & Domain Name

Domain name is one of the important factor in seo ,consider a domain name "seokerala.com" have more importance in the keyword "seo kerala" ,but subdomains have no much importance except blog sites like blogspot.com.

SEO & Page Content

Page Content is the main factor that affect seo .try to add unique content in your page, Content inside flash can't read by search engines so a full flash site is difficult to get optimized.Keep your contend meaningful & unique (do not copy paste contend from other sites ) .Now contend for seo is created by contend writers optimized for seo.


SEO & Domain Age

Age of domain and page is also a big factor in seo , search engines give more importance for aged domain and pages.Google have high preference in domain age ,thats why Google optimization is a hard thing.Don't worry about this, domain age is just one of hundreds of factors affecting SEO.
SEO Kerala

SEO & HTML Standards


There are lot of standards in creating a html or xhtml page mainly W3 standards ,The html must be in w3 standars, errors from this standards will cause your index down.Eg: missing of alt tags , Proper closing of tags, etc..,For more about w3 standards for html or xhtml visit w3schools.com Keep w3 standards and make search engine friendly


SEO & Location Of Domain Hosted


This is a reality that a domain hosted in india will get more preference for search with a keyword india. Also it will help you to make you listed while searching in google.co.in and pages from india in google.

27 March 2008

Programmer Kerala Cochin India

Programmer Kerala Cochin India

it's not a useful post . it's just a check... how this post give preference in kewords like "Programmer Kerala" ,"web programmer kerala" , "Programmer Cochin" etc ... in Google search.