Sunday, May 12, 2013

Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly

While deploying my application on a production server, I was facing the following issue:

Exception: System.TypeLoadException
Message: Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 

'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Stack Trace:    at AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference
(ScriptReferenceEventArgs e)


By looking into above details, it clearly shows that there is some problem in loading AjaxControlToolkit assembly.

I did some online search for issue and verified all possible things on production server:
  • Verify the correct version of AjaxControlToolkit dll on server.
  • Verify the assembly entry in <assemblies> section in configuration file on server with correct version.
But finally find out the missing thing on production server. Production server was missing 
ServicePack 1 for .NET 3.5. Because my local machine has .NET 3.5 SP1 where the release is build.

Although It took sometime to convince my System Admin for installing Service Pack 1 for .NET 3.5 on production machine :-).

So, In order the fix the above issue, verify the above mentioned items and install .NET 3.5 Service Pack 1.


Other Web Development Articles:


Monday, April 29, 2013

What's new in jQuery 2.0?


jQuery library has simplified and strengthen web development experience. jQuery lastest version 2.0 doesn't have a lot of new features but instead jQuery team has provided a number of previous version fixes.

Few new things are:
  • Eliminating support for previous versions of Internet Explore i.e. IE 6, 7 and 8. Even for IE 9 and 10, only compatibility mode is supported.
  • Size has also been reduced but its minor reduction. Its around 10% reduction in size.
  • Newer version is also equivalent with jQuery 1.9 API.
  • Custom build feature has also been refined in this new version.

Tuesday, April 23, 2013

Top 10 HTML 5 Interview Questions


1.What's new HTML 5 DocType and Charset?
As HTML 5 is now not subset of SGML so its DocType is simplified as follows:
                  <!doctype html>
And HTML 5 uses UTF-8 encoding as follows:
                 <meta charset="UTF-8">

2.How can we embed Audio in HTML 5?
HTML 5 comes with a standard way of embedding audio files. Supported audio formats are MP3, Wav and Ogg.
<audio controls>
    <source src="jamshed.mp3" type="audio/mpeg">
    Your browser does'nt support audio embedding feature.
</audio>

3.How can we embed Video in HTML 5?
Same like audio, HTML 5 defined standard way of embedding video files.Supported video formats are MP4, WebM and Ogg.

<video width="450" height="340" controls>
  <source src="jamshed.mp4" type="video/mp4">
   Your browser does'nt support video embedding feature.
</video>

4.What are the new media element in HTML 5 other than audio and video?
HTML 5 has strong support for media. Other than audio and video tags, it comes with the following tags:
  • <embed> acts as a container for external application.
  • <track> defines text track for media.
  • <source> is helpful for multiple media sources for audio and video.

5.What is the usage of canvas Element in HTML 5?
<canvas> is an element in HTML5 which we can use to draw graphics with the help of scripting (which is most probably JavaScript).
This element behaves like a container for graphics and rest of things will be done by scripting. We can draw images, graphs and a bit of animations etc using <canvas> element.

<canvas id="canvas1" width="300" height="100">
</canvas>

6.What are the different types of storage in HTML 5?
HTML 5 has the capability to store data locally. Previously it was done with the help of cookies.
Exciting thing about this storage is that its fast as well as secure.

There are two different objects which can be used to store data.
  • localStorage object stores data for a longer period of time even if the browser is closed.
  • sessionStorage object stores data for a specific session.

7.What are the new Form Elements introduced in HTML 5?
There are a number of new form elements has been introduced in HTML 5 as follows:
  • datalist
  • datetime
  • output
  • keygen
  • date
  • month
  • week
  • time
  • number
  • range
  • email
  • url

8.What are the deprecated Elements in HTML5 from HTML4?

Elements that are deprecated from HTML 4 to HTML 5 are:
  • frame
  • frameset
  • noframe
  • applet
  • big
  • center
  • basefront

9.What are the new APIs provided by HTML 5 standard?

HTML 5 standard comes with a number of new APIs. Few of it are as follows:
  • Media API
  • Text Track API
  • Application Cache API
  • User Interaction
  • Data Transfer API
  • Command API
  • Constraint Validation API
  • History API
  • and many more....

10.What is the difference between HTML 5 Application Cache and regular HTML Browser Cache?

One of the key feature of HTML 5 is "Application Cache" that enables us to make an offline version of a web application. It allows to fetch few or all of website contents such as HTML files, CSS, images, javascript etc locally. This feature speeds up the site performance. This is achieved with the help of a
manifest file defined as follows:

<!doctype html>
<html manifest="example.appcache">
.....
</html>

As compared with traditional browser caching, Its not compulsory for the user to visit website
contents to be cached.


Related Web Development Tutorials: