Thursday, March 3, 2011

Great online book for Javascript, Eloquent JavaScript

Online book with an interactive coding environment to try every each example.

Best way(s) for connecting SQL Server in ASP.NET?

  - Connect via SQL Server ID that is stored in web.config.
   Pro: simple.
   Cons: password in web.config; have to specifically configure SQL Server ID.

   - Connect via user NT ID via ASP.NET impersonation.
    Pro: no passwords in web.config; fine-grained control of security per user.
    Cons: administrative overhead of configuring user accounts in SQL Server; SQL Server monitoring of application is scattered across many accounts.

    - Run ASP.NET as a custom NT ID, and have that NT ID configured in SQL Server.
   Pros: connecting to SQL Server as one ID - simple; no passwords in web.config.
   Cons: complicated from a security perspective. Have to configure custom SPNs in Active Directory for Kerberos authentication.

How to solve problem "The data types varchar and varchar are incompatible in the modulo operator."

Check if double Apostrophe in SQL
Delete one Apostrophe

Example code for HTML5 features: media support

<video width="320" height="240" controls="controls" src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
Online example:

15 ASP.NET Job interview questions (junior to intermediate level)

  1. If I browse just the default.aspx and don't login, will there be a Session Id from me on the server?
  2. How does the server know if the request is coming from already existing session or a new one?
  3. How to store user information? (Have you used Membership.Profile)??
  4. How to block certain IP addresses from accessing your webpages??
  5. Can I access viewstate on one page from another page?
  6. How do you make sure the viewstate is available in a WebFarm Environment?
  7. If you need to store the list of Departments in a company (which changes very infrequently) - which object would you prefer Application or Cache or Session  and why??
  8. When you click on 'logout', what all actions you would perform on the server side??
  9. How to close the client browser on 'logout' click??
  10. Error Handling - Will you use both Application_Error() and <CustomError> or only one?? Why??
  11. How you would improve your website performance?
  12. Will Session_Start event be called for each request?
  13. Where does the server store Cache? Can I move it to SQL Server?
  14. Where does the server store Session Id? What is a cookieless Session?
  15. How would you do Server Side Paging? Is it different from doing inbuilt paging in GridView?? How??

You Owe it to Yourself to be Old-School