When anyone create a normal "ASP.NET Web Site" and not an "ASP.NET Ajax Enabled Web Site" and try to use AJAX Controls this error occurs.
There are two key tags, that must exist on web.config:
under <assemblies> (possibly you already have this one)
<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
under <httpHandlers> (this is the new one)
<add verb="GET" path="ScriptResource.axd" Type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
If you use AJAX controls always try to create AJAX Enabled website.
If you already created Normal website and wish to use AJAX Controls you can copy following tag alongwith codes from WebConfig file from any AJAX Enabled website.
Copy assembly under assemblies tag;
copy httpHandlers tag and code under it; and
copy code under httpModules alongwith httpModules tag.
Tuesday, July 7, 2009
Tuesday, May 5, 2009
Where does cookies are stored in local Hard drive ?
This is one of the interesting things to find out the cookies in your local drive. First of all, From "Explorer Folder Option ", Select, show hidden files and folder.
Fig 1.2 : Show Hidden files and Folder Settings
Now Browse into document & settings of the current user and open the cookies folder. Now looks the picture.
Fig 1.3 : Reading Cooking info in local System
Friday, May 1, 2009
How to Read data from cookies ?
How to create cookies ?
For working with cookies we need to use namespace System.web

Now , have a look, on the code , that how can we create a cookies and add it with web response .3

The cookies which has been created will persist , until browser has been closed. we can persist the cookies. But how? Just after few point I have discussed it.
Advantages & Disadvantages of of Cookies
Advantages
Following are main advantages of using cookies in web application:
- It's very simple to use and implement.
- Browser's taking care send data.
- For multiple sites cookies, Browser automatically arranges them.
Main disadvantages of cookies are:
- Its store data in a simple text format. so it's not secure at all.
- There is a size limit of cookies data ( 4096 bytes / 4KB).
- Number if cookies also limited. Most Browser provides limits of storing cookies is 20. If new cookies came, it will discard the old one. Some of browser support up to 300.
- We need to configure browser. It will not work on a high security configuration of browser. [I have explained about this in details.]
How Cookies are started ?
When client request to the server, server send the cookies into client . The same cookies can be referred for subsequent request. As for example, if codeproject.com stores session id as a cookies, when any client hits first times on the server, server generates the session id and send it as a cookies to client. [As given in Fig 1.0]

Fig 1.0 : Initial state of cookie creation
Now for all other subsequent from the same client it uses the session-id from cookies, just like the picture below:
Fig 1.1 : Subsequent request for other pages
Browser and web server are responsible for exchange cookies information. For different sites, browser keeps cookies differently. If any pages need information from cookies, when that URL is being hit, first its search for local system for cookies information then its moved to server with that information.
What are Cookies ?
Cookies are the small files that are created on the client's system or client browser memory (if temporary). Its use for State management that I have already discuss on my view state article. So we can store small piece of information in a client system and we can use it when we needed. Most interesting thing is that Its works transparently with the user. It can be easily used any where of you web application. Cookies store information in a plain text format. If any web application using cookies, Server send cookies and client browser will store it. The browser then returns the cookie to the server at the next time the page is requested. The most common example of using a cookie is to store User information, User preferences , Password Remember Option etc. Cookies has many advantages and disadvantages. I will comes to this points , but first have a look how cookies are started.
Subscribe to:
Posts (Atom)


