Asp.net Interview Questions for 2 years or 3 years experiance

Asp.net Interview Questions for 2 years or 3 years experiance

    Days ago my friend want me to write asp.net, iis, sql server interview questions, so that he can conduct an interview  
with candidate having 2-3 years experiance. Here are those questions. 

Q1.  One day you notice your ms sql database is taking lots up CPU and memory resources you also notice the website is running slower than normal 
      what you would do in this situation ?

Q2.  How two computers can communicate with each other using System.Net.httpWebRequest or System.Net.WebClient,
       webservices, TcpIpclient or socket programming.

Q3. What is web.config and how it works? What if I don't add web.config file in my web application, will it run or it will throw an error?

Ans:  The ASP.NET configuration section schema contains elements that control how ASP.NET Web applications behave. Where a default value is specified for an attribute, the 
        default value is set in the Machine.config file that is located at systemroot\Microsoft.NET\Framework\versionNumber\CONFIG\Machine.config.
        web.config file overrride the default values storde in machine.config.


Q4. Have you worked on HttpModule. What interesting stuff you had done with IHttpModule?
 
Q5.  How will you store images in DB and render it ?
Ans. You can reffer http://www.revenmerchantservices.com/page/asp-net-image-upload.aspx

Q6.  Have you worked on HttpHandler ? how to use IHttpHandler?

Q7.  In what situation do you think you need to use HttpHandler?

Ans. you can use it for generating siteMaps that you submit to search engines or for rendering images or tracking emails or 
       RSS or ATOm feed.

Q8. How authentication and authorzation works in ASP.net?
Ans. Authentication means validating user against his credentials with data base. 
       To valid user we give authority to see appropriate area of web thats nothing but an authorization.

Q9. Can you describe your web application project where you used ASp.net MembershipProvider?
Ans.You need to implement these steps on your machine to know how exactly it works
      http://www.revenmerchantservices.com/page/ASpnet-20-step-by-step-Membership-Provider-.aspx

Q10.  What is form authentication / windows / active directory?  In what scenario you will choose what authntication mechanisum ?

Q11. Have you ever used widgets ? Personalisation ? Master pages, Themes and Skins?

Q12. Have you registered assembly in GAC ? if yes why ?

Q13. What is Machine key?

Q14. What is single sign on? Can you tell us web sites who uses this feature.
Ans. e.g. Once you login to google you don;t need to login to again for gmail, orkut, feedburner or any other google product.

Q15. How will you prevent loged-in users from login again using different machines or browsers?
Ans. You can refer above membership provider based model.

Q16. How to refer assemblies from GAC in ASP.net project ? or How will ensure that the assembly is being reffered from GAC not from Bin folder?

Q17. How Process model affects asp.net web application? or How many types of process model exists in asp.net.
     

Q18. If we are using SQL server or State server for storing session objects, why do we need to add attribute [serializable] to classes 
       whose objects we need to store in session ?

Ans. The objects who crocess the boundries of application domain we need to mark its classes as serializable.

Q19. If you have been assigned a task to write robust API using .net, what steps you will do? What factors you need to consider?

Q20. What steps you will cross check if you found that you are loosing values stored inside session?
Ans. 1. You are using in-proc session storing mechanisum and your application pool was getting recycled before hitting
           session expiry time
       2. You have assigned multiple worker process and you are using in proc session mechanisum. (web gardening scenario)
       3. Web Farming scenario: Your firest request served by server A and he maintaind in-proc session there while second request was served by Server B
           where there is no sessio value in proc of server B.
       In such scenarios store session out of process.

Q21. Do you know __VIEWSTATE hidden field? Can I store ViewState at server side using session?

Q22. How can I boost the performance of my web application?

Q23. Do you know how to configure aspnet_isapi.dll ?

Q24. Have you used aspnet_regiis.exe? If yes when did you and why?

Q25. How can you improve the performance of Grid View.

Q26. Whats the differance between Cache,Application and Session?



IIS 6.0.

Q1. How will you configure IIS to run ASp.net web application?

Q2. How will you switch IIS running on 64bit mode to run applications targetting 32 bit mode ?
Ans. You can use Cscript command
      http://www.revenmerchantservices.com/post/2009/12/15/iis7-32-bit-mode.aspx

Q3. How will you create subdomains?
Ans. Create new web site and change its header value  subdomain name.
      update your Host A record in control panel provided by your hosting service provder or name server provider.

Q4. How will you setup authentcation in iis to use windows authontication?

Q5. what is the role of application pooling? what is role of ISAPI?

Q6. How will you add your own handlers in IIS? How you will restart your iis?

Q7. How will you allow webservices to run using iis?

Q8. Do you know what is cscript command? What it does?

Q9. How will you recycle application pool? If  application pool recycled what will happen to Inpoc session and out of process session?

Q10. How will you configure your iis to run PHP, perl cgi scripting?

Q11. What steps you will do, if you found that your iis is not runninng?

Q12. In what situation we execute aspnet_regIIS -i

Q13.How will you stop getting malecious url request like %201=%20 ?

Q14. How will you block ip address? which one is the latest version of iis and its features?

Q15. How will you prevent your IIS  from being hacked? If hacked what is your action plan?

Q16. What is the role of ASpnet user in IIS? how will set permissions to your applciation?

Q17.  What is the role of workerprocess in IIS?

Q18. What is network load balancing ? What is web farming? What is web gardening ?

Q19. How will you take IIS backup.

Q20. Difference between shared hosting and dedicated hosting?

Q21. How will you configure your IIS to run both asp.net framework 1.1 and framework 2.0 applications ? 

Q22. If I don;t assign asp.net runtime to my web application hosted in IIS and user request a page will that page get served?
       or it will throw an error or page will get served as a plain text.


SQL SERVER

Q1. Scenario: You are having two server. One sql server and other web application server. 

      Your client wants to switch the sql server from one machine to other upgraded machine
      whats your action plan to replicate the system?

Q2. In what situation you will use  CliConfg or sql network utility ?

Q3. How quickly you can restore the sql server after disaster 
      
Q4. What is transaction log shipping? What is sql server mirroring and how it works?

Q5 What is Linked server?

Q6 What is SSIS, SSRS and SSAS?

Q7 Whats is SQL jobs in ms sql server?

Q8 Are you aware of MSDTC?

Q9 Do you know pivoting in ms sql 2005 and later version of it?

Q10 What if you accidentally lost .ldf file, is it possible to bring database online without ldf file?

Ans. Yes.
refer  http://www.sqlskills.com/blogs/paul/post/checkdb-from-every-angle-emergency-mode-repair-the-very-very-last-resort.aspx#

Q11. Are you aware of SQL Hints like nolock, readpast, updlock?

Q12. How can I get autogenerated primary key ID of inserted records?
Answer:       select @@Identity

Q13. What is the benifit of using File Groups in MS SQL server data base.





General Out of box questions:

Q1. What is SEO?

Q2. How will you let search engines to find your site ?

Q3. How will you configure your site to make it more visible to search engines? 

Q4. What  steps you will perform, if you found that your site is not recognised by major search engines?

Q5. how will you notify search engines that your site contents are updated come and eat it ?

Q6. What steps you will do to prevent your site from being hacked ?

Q7. Who keeps the registery of all domains?

Q8. In windows OS do you know hosts file ?

Q9. What is the purpose of windows registery?

Q10. What is server ?  What is data base ?

Q11. If client request a page over http (port 80) , does it mean that both client and and server are communication on port 80?
       In other word, Does it require to have port 80 opened for server as well as client

Q12. Have you used netstat -a command ?

Q13. Can I configure multiple domains to point at single IP address ?

Q14. What is domain and email whitelisting ?

Q15. One day after installing antivirus on server you found that your server is not listening to port 80 or 1433.
       What are the causes ? How will you fix it ?

Q16. How will you configure windows firewall to allow port xx communication ?

Q17. Is it possible to recover deleted data from USB pen drives ?

Q18. Is it possible to recover data from .ldf file if you don;t have .mdf file?

Q19. How will you configure your IIS to and Apache tomcat to run on same machine?

Q20. How can get IP address of www.google.com or www.bing.com or www.yahoo.co.in or www.facebook.com ?

Q21. If your boss told you to develop Remote desktop or Team Viewer kind of applications, how will you do that?



These are all Practical questions, I had written here with my experiance to judge real guy with real experiance.

Thanks, Satalaj.
:)

lets make good stuff with more practical challenges.

Asp.net interview questionsAsp.net interview questions and answers free Android application.asp net image uploadWhat is web garden in Asp.net?ASp.net 2.0 step by step Membership Provider ASP.net File HandlingAsp.net Convert String To ImageHack asp.netAsp.net open new windowAsp.net Convert Image To Base64Asp.net How To Write a Cookie and Read

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.