<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6046577960778787715</id><updated>2011-11-28T08:48:51.173-08:00</updated><title type='text'>Sanjay Saini's TechWorld</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default?start-index=101&amp;max-results=100'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>112</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4208084930374695825</id><published>2010-12-11T22:11:00.001-08:00</published><updated>2010-12-11T22:11:49.437-08:00</updated><title type='text'>How to get Comma Separated Values (CSV) from Table Column</title><content type='html'>This is another very common requirement while developing sql code for the applications. &lt;br /&gt;And again this can be done in various ways...one of them is here...&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;create table user_reports&lt;br /&gt;(id int identity, username varchar(20),report_name varchar(20), report_available bit)&lt;br /&gt;go&lt;br /&gt;insert into user_reports(username,report_name,report_available)&lt;br /&gt;select 'Ajay', 'report1',1&lt;br /&gt;union all&lt;br /&gt;select 'Ajay', 'report2',1&lt;br /&gt;union all&lt;br /&gt;select 'Ajay', 'report3',1&lt;br /&gt;union all&lt;br /&gt;select 'Ajay', 'report4',1&lt;br /&gt;union all&lt;br /&gt;select 'John', 'report5',0&lt;br /&gt;union all&lt;br /&gt;select 'John', 'report6',1&lt;br /&gt;union all&lt;br /&gt;select 'John', 'report2',0&lt;br /&gt;union all&lt;br /&gt;select 'Tony', 'report1',1&lt;br /&gt;union all&lt;br /&gt;select 'Tony', 'report7',1&lt;br /&gt;union all&lt;br /&gt;select 'Ram', 'report3',1&lt;br /&gt;union all&lt;br /&gt;select 'Ram', 'report4',0&lt;br /&gt;union all&lt;br /&gt;select 'Ram', 'report8',1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- CSV report list for all users&lt;br /&gt;select  stuff(&lt;br /&gt;(select ',' + ur.report_name&lt;br /&gt;from user_reports ur&lt;br /&gt;order by ur.report_name&lt;br /&gt;for xml path('')),1,1,'') as 'Report List'&lt;br /&gt;go&lt;br /&gt;&lt;br /&gt;-- CSV report list for a given user&lt;br /&gt;select  stuff(&lt;br /&gt;(select ',' + ur.report_name&lt;br /&gt;from user_reports ur where username = 'Ajay'&lt;br /&gt;order by ur.report_name&lt;br /&gt;for xml path('')),1,1,'') as 'Report List'&lt;br /&gt;go&lt;br /&gt;&lt;br /&gt;-- CSV report list user wise&lt;br /&gt;select  ur1.username,stuff(&lt;br /&gt;(select ',' + ur.report_name&lt;br /&gt;from user_reports ur where ur.username=ur1.username&lt;br /&gt;order by ur.report_name&lt;br /&gt;for xml path('')),1,1,'') as 'Report List'&lt;br /&gt;from user_reports ur1 group by ur1.username&lt;br /&gt;go&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4208084930374695825?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4208084930374695825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4208084930374695825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4208084930374695825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4208084930374695825'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/12/how-to-get-comma-separated-values-csv.html' title='How to get Comma Separated Values (CSV) from Table Column'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-162913929195673649</id><published>2010-12-11T21:16:00.000-08:00</published><updated>2010-12-11T21:17:08.975-08:00</updated><title type='text'>How to aggregate BIT Columns with Group By in SQL Server</title><content type='html'>This is a very common requirement in sql when you are deveploping applications.&lt;br /&gt;You can achive this with very simple query, using cast and min sql functions.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;create table user_reports&lt;br /&gt;(id int identity, username varchar(20),report_name varchar(20), report_available bit)&lt;br /&gt;go&lt;br /&gt;insert into user_reports(username,report_name,report_available)&lt;br /&gt;select 'Ajay', 'report1',1&lt;br /&gt;union all&lt;br /&gt;select 'Ajay', 'report2',1&lt;br /&gt;union all&lt;br /&gt;select 'Ajay', 'report3',1&lt;br /&gt;union all&lt;br /&gt;select 'Ajay', 'report4',1&lt;br /&gt;union all&lt;br /&gt;select 'John', 'report5',0&lt;br /&gt;union all&lt;br /&gt;select 'John', 'report6',1&lt;br /&gt;union all&lt;br /&gt;select 'John', 'report2',0&lt;br /&gt;union all&lt;br /&gt;select 'Tony', 'report1',1&lt;br /&gt;union all&lt;br /&gt;select 'Tony', 'report7',1&lt;br /&gt;union all&lt;br /&gt;select 'Ram', 'report3',1&lt;br /&gt;union all&lt;br /&gt;select 'Ram', 'report4',0&lt;br /&gt;union all&lt;br /&gt;select 'Ram', 'report8',1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- This simple sql query will return user wise aggregated report_available column value  &lt;br /&gt;select username as UserName, cast(min(cast(report_available as int)) as bit) as 'Is Report Available'&lt;br /&gt;from user_reports group by username&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-162913929195673649?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/162913929195673649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=162913929195673649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/162913929195673649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/162913929195673649'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/12/how-to-aggregate-bit-columns-with-group.html' title='How to aggregate BIT Columns with Group By in SQL Server'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1939725814066021201</id><published>2010-12-11T06:44:00.000-08:00</published><updated>2010-12-11T06:46:39.254-08:00</updated><title type='text'>SSIS Error : Failed to save package file, Element not found.</title><content type='html'>There could be many reasons that can cause this error but in my case the reason was that MSXML6.dll was not registered on my machine. So I just registered this dll to resolve this error.&lt;br /&gt;&lt;br /&gt;To register MSXML6.dll on your machine, follow these steps:&lt;br /&gt;1. From the Start menu, click Run. &lt;br /&gt;2. Enter the following command: regsvr32 %windir%\system32\msxml6.dll. &lt;br /&gt;3. Click OK.&lt;br /&gt;&lt;br /&gt;Note - Replace %windir% with the path of windows folder on your machine. I my case it was - c:\windows&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1939725814066021201?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1939725814066021201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1939725814066021201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1939725814066021201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1939725814066021201'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/12/ssis-error-failed-to-save-package-file.html' title='SSIS Error : Failed to save package file, Element not found.'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1082829354386341835</id><published>2010-06-02T21:38:00.000-07:00</published><updated>2010-06-02T21:53:01.021-07:00</updated><title type='text'>How to handle errors in APS.NET</title><content type='html'>There are three ways to handle errors in asp.net application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Using Page class Error even:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You can handle error on every page by define error handler for Page class Error event.&lt;br /&gt;Like-&lt;br /&gt;&lt;br /&gt;    void Page_Error(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        Response.Redirect("Errorpage.htm");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. By defining error handler in global.asax file&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This is better approach than the first one because its a centralize approach to handle errors. Here instead of writing error handler in every web page, you will need to define error handler at application level in the global.asax file. &lt;br /&gt;Like:&lt;br /&gt;&lt;br /&gt;    void Application_Error(object sender, EventArgs e) &lt;br /&gt;    {&lt;br /&gt;        Response.Redirect("Errorpage.htm");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:-&lt;/strong&gt; Whenever an error occurs application look for error handler at page level and then at application level. So if you have defined error handler in the web pages then it will handle the error not the one defined in global.asax file.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. By adding customError tag in the web.config file&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This is another centralize approach to error handling in ASP.NET. In fact you can redirect to different custom error pages for different error status codes.&lt;br /&gt;Like:&lt;br /&gt;&lt;br /&gt;    &lt; customErrors defaultRedirect="error.htm" mode="On" &gt;&lt;br /&gt;      &lt; error statusCode="404" redirect="notfound.htm"/ &gt;&lt;br /&gt;    &lt; /customErrors &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1082829354386341835?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1082829354386341835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1082829354386341835' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1082829354386341835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1082829354386341835'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/06/how-to-handle-errors-in-apsnet.html' title='How to handle errors in APS.NET'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3797782572673307749</id><published>2010-05-17T00:49:00.000-07:00</published><updated>2010-05-17T00:50:57.465-07:00</updated><title type='text'>Error: possible soap version mismatch</title><content type='html'>Sometime you may encounter below mentioned error when you try to access web service in your .net application. &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Possible SOAP version mismatch: Envelope namespace http://schemas.xmlsoap.org/wsdl/ was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Actually if you are setting URL property in your .net application with wrong web service url than most likely you may get this error. The general mistake is that people assign same url which they used to see the description of web service (e.g. http://localhost/servlet/webservices?ver=1.1?wsdl) to the URL property of the proxy class instead of the web service url(e.g. http://localhost/servlet/webservices?ver=1.1). So assign the web service url and see if you are able to resolve this error.&lt;br /&gt;If still you are not able to resolve this error then make sure the url you are assigning is correct.&lt;br /&gt;&lt;br /&gt;Note: - I have noticed that in case web service is developed in .Net and is consumed by a .Net client then assigning description url (e.g. http://localhost/webservices/service.asmx?wsdl) does not generate this error. But if the web service is developed with non .net technology and generates WSDL that is somewhat different from what .Net clients expect then this error will most likely come up in that case try above given solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3797782572673307749?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3797782572673307749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3797782572673307749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3797782572673307749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3797782572673307749'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/05/error-possible-soap-version-mismatch.html' title='Error: possible soap version mismatch'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-9047251418156610286</id><published>2010-05-11T21:14:00.000-07:00</published><updated>2010-05-11T21:36:52.056-07:00</updated><title type='text'>Error: A semi colon character was expected. Error processing resource</title><content type='html'>Very often people encounter this error when they try to open xml file in IE or try to load it in their code. The most common reason for this error is that your xml file may be containing "&amp;" character. Actually IE misunderstands "&amp;" character with some HTML code that starts with "&amp;" and ends with ";" character like-&amp; nbsp ; means non-breaking space and rendered as a white space.&lt;br /&gt;&lt;br /&gt;For Example: here is the content of an xml file which will give this error due to "&amp;" character in the url.&lt;br /&gt;&lt;br /&gt;&lt; ?xml version="1.0" encoding="utf-8" ? &gt;&lt;br /&gt;&lt;&gt;&lt;br /&gt;&lt;&gt;&lt;br /&gt;&lt; name="WSACCPURL"&gt;&lt;br /&gt;&lt;&gt;http://localhost/Test/webservices?ver=1.1&amp;wsdlxml&lt; /value &gt;&lt;br /&gt;&lt; /setting &gt;&lt;br /&gt;&lt; /appSettings &gt;&lt;br /&gt;&lt; /configuration &gt;&lt;br /&gt;&lt;br /&gt;So to resolve this error I replaced the "&amp;" character with HTML code phrase "&amp; amp ;"&lt;br /&gt;Note:- Ignore the space between &amp; and ; there should not be any space. Here I had to give space to avoid their special meaning by IE.&lt;br /&gt;&lt;br /&gt;Now the updated xml file is:&lt;br /&gt;&lt;br /&gt;&lt; ?xml version="1.0" encoding="utf-8" ? &gt;&lt;br /&gt;&lt;&gt;&lt;br /&gt;&lt;&gt;&lt;br /&gt;&lt; name="WSACCPURL"&gt;&lt;br /&gt;&lt;&gt;http://localhost/Test/webservices?ver=1.1&amp; amp ;wsdlxml&lt; /value &gt;&lt;br /&gt;&lt; /setting &gt;&lt;br /&gt;&lt; /appSettings &gt;&lt;br /&gt;&lt; /configuration &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now when this file is opened in IE the &amp; amp ; is rendered as &amp; character.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-9047251418156610286?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/9047251418156610286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=9047251418156610286' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/9047251418156610286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/9047251418156610286'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/05/error-semi-colon-character-was-expected.html' title='Error: A semi colon character was expected. Error processing resource'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2459033216601009797</id><published>2010-05-06T21:31:00.000-07:00</published><updated>2010-05-06T21:36:12.462-07:00</updated><title type='text'>Consuming web service in classic ASP application using .Net component</title><content type='html'>It’s fairly simple to consume web service in your classic ASP application using wrapper component developed in .net world.&lt;br /&gt;&lt;br /&gt;So first create a wrapper component that will consume the web service.&lt;br /&gt;Follow below given steps:&lt;br /&gt;&lt;br /&gt;1. Open visual studio and create a Class Library project in C#.&lt;br /&gt;2. Name the project WebServiceWrapper and the class as Wrapper.&lt;br /&gt;3. Paste below code in the Wrapper.cs class window.&lt;br /&gt;&lt;br /&gt;-----------------------------------------&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;namespace WebServiceWrapper&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;public class Wrapper&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;MyWebService.Service1 svr;&lt;br /&gt;&lt;br /&gt;public Wrapper()&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void Initialize(String url)&lt;br /&gt;{&lt;br /&gt;svr=new WebServiceWrapper.MyWebService.Service1();&lt;br /&gt;svr.Url=url;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String URL&lt;br /&gt;{&lt;br /&gt;get{return svr.Url;}&lt;br /&gt;set{svr.Url=value;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String HelloWorld(String str)&lt;br /&gt;{&lt;br /&gt;return svr.HelloWorld(str);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String HelloWorld(String str, String url)&lt;br /&gt;{&lt;br /&gt;svr=new WebServiceWrapper.MyWebService.Service1();&lt;br /&gt;svr.Url=url;&lt;br /&gt;return svr.HelloWorld(str);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;-----------------------------------------&lt;br /&gt;&lt;br /&gt;4. Right click on the project and choose Add Web Reference option.&lt;br /&gt;5. In the Add Web Reference window browse your web service and give the web reference name: MyWebService and click on Add Reference button. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:-&lt;/strong&gt; In the above code web service in question(Service1) is hosted on local machine and has a method named HelloWorld that takes string param and return string value but you have to replace this code with your web service name and web method accordingly.&lt;br /&gt;&lt;br /&gt;6. Build the solution that will create WebServiceWrapper.dll&lt;br /&gt;7. Now you have to create type library of your .net component and register that to make it available in your VB COM component. For that use following command at VS .Net command prompt window.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;regasm.exe &lt; path of WebServiceWrapper.dll &gt; /tlb /codebase&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;It will create a type library named WebServiceWrapper.tlb at the dll location and register the same as well. Ignore any warning message shown.&lt;br /&gt;&lt;br /&gt;You are done with creating your .NET wrapper component. Now time to use it in your VB COM component.&lt;br /&gt;Here I assume that you would have gone through my previous post &lt;a href='http://sanjaysainitech.blogspot.com/2010/05/how-to-create-asp-application-using-asp.html'&gt;"How to create ASP application using ASP Object Library"&lt;/a&gt; becasue here I will tell you what changes are needed to do in your ASPComp component that you would have created earlier.&lt;br /&gt;&lt;br /&gt;So Open your ASPComp project and add following code in the clsASP class.&lt;br /&gt;-----------------------------------------&lt;br /&gt;Public Sub CallWrapper_HelloWorld()&lt;br /&gt;   &lt;br /&gt;Dim oclient&lt;br /&gt;Dim strg As String&lt;br /&gt;On Error GoTo ErrorHandler&lt;br /&gt;Set oclient = CreateObject("WebServiceWrapper.Wrapper")&lt;br /&gt;oclient.Initialize "http://localhost/WebService1/Service1.asmx?wsdl"&lt;br /&gt;&lt;br /&gt;strg = oclient.HelloWorld("Sanjay")&lt;br /&gt;oResponse.Write strg &amp; vbCrLf&lt;br /&gt;&lt;br /&gt;Exit Sub&lt;br /&gt;&lt;br /&gt;ErrorHandler:&lt;br /&gt;&lt;br /&gt;oResponse.Write "Invalid Web Service Request. Please check the Web Service URL: " &amp; Err.Description&lt;br /&gt;&lt;br /&gt;End Sub &lt;br /&gt;----------------------------------------&lt;br /&gt;&lt;strong&gt;Note:-&lt;/strong&gt; Replace the web service url with your web servce url.&lt;br /&gt;&lt;br /&gt;Now go to Project-&gt; reference menu and add reference of WebServiceWrapper Type Library that you had created earlier by browsing to its location.&lt;br /&gt;&lt;br /&gt;Now re-make ASPComp.dll to incorporate new changes in the COM component.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:-&lt;/strong&gt; You will have to re-register the ASPComp.dll&lt;br /&gt;&lt;br /&gt;After completing the COM component changes, open your asp page in the notepad and replace the method call with the newly created method.&lt;br /&gt;&lt;br /&gt;So your MyASP.asp page will look like:&lt;br /&gt;&lt;br /&gt;&lt; %&lt;br /&gt;Set oExample = Server.CreateObject("ASPComp.clsASP")&lt;br /&gt;oExample.CallWrapper_HelloWorld&lt;br /&gt;% &gt;&lt;br /&gt;&lt;br /&gt;No time to test user efforts. So browse http://localhost/ASPTest/MyASP.asp in the IE window.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2459033216601009797?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2459033216601009797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2459033216601009797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2459033216601009797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2459033216601009797'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/05/consuming-web-service-in-classic-asp.html' title='Consuming web service in classic ASP application using .Net component'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4308709865055803866</id><published>2010-05-05T21:10:00.000-07:00</published><updated>2010-05-05T21:17:07.164-07:00</updated><title type='text'>How to consume web service in classic ASP application using Soap 3.0</title><content type='html'>It's fairly simple to consume web service using Microsoft Soap Type Library 3.0 in your classic ASP application.&lt;br /&gt;Here I assume that you would have gone through my previous post &lt;a href='http://sanjaysainitech.blogspot.com/2010/05/how-to-create-asp-application-using-asp.html'&gt;"How to create ASP application using ASP Object Library"&lt;/a&gt; becasue here I will tell you what changes are needed to do in your ASPComp component that you would have created earlier.&lt;br /&gt;&lt;br /&gt;So Open your ASPComp project and add following code in the clsASP class.&lt;br /&gt;-------------------------------------&lt;br /&gt;Public Sub Call_HelloWorld()&lt;br /&gt;   &lt;br /&gt;Dim oclient&lt;br /&gt;Dim strg As String&lt;br /&gt;On Error GoTo ErrorHandler&lt;br /&gt;Set oclient = CreateObject("MSSOAP.SoapClient30")&lt;br /&gt;oclient.MSSoapInit "http://localhost/WebService1/Service1.asmx?wsdl"&lt;br /&gt;&lt;br /&gt;strg = oclient.HelloWorld("Sanjay")&lt;br /&gt;oResponse.Write strg &amp; vbCrLf&lt;br /&gt;&lt;br /&gt;Exit Sub&lt;br /&gt;&lt;br /&gt;ErrorHandler:&lt;br /&gt;&lt;br /&gt;oResponse.Write "Invalid Web Service Request. Please check the Web Service URL: " &amp; Err.Description&lt;br /&gt;&lt;br /&gt;End Sub &lt;br /&gt;--------------------------------------&lt;br /&gt;&lt;strong&gt;Note:-&lt;/strong&gt; In the above code web service in question is hosted on local machine and has a method named HelloWorld that takes string param and return string value but you have to replace this code with your web service and web method.&lt;br /&gt;&lt;br /&gt;Now go to Project-&gt; reference menu and add reference of Microsoft Soap Type Library 3.0&lt;br /&gt;&lt;br /&gt;Generally it is installed with Office 2003 but if its not installed  on your machine then you can download it from &lt;a href='http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=C943C0DD-CEEC-4088-9753-86F052EC8450&amp;displayLang=en&amp;oRef=http%3a%2f%2fwww.microsoft.com%2fdownloads%2fthankyou.aspx%3ffamilyId%3dC943C0DD-CEEC-4088-9753-86F052EC8450%26displayLang%3den%26oRef%3dhttp%253a%252f%252fwww.google.com%252fsearch%253fq%253dSoap%252b3.0%252bdownload%2526btnG%253dSearch%2526hl%253den%2526lr%253d%2526rls%253dRNWE%25252CRNWE%25253A2005-12%25252CRNWE%25253Aen'&gt;here&lt;/a&gt; and install it on your machine.&lt;br /&gt;&lt;br /&gt;Now you will have to re-make ASPComp.dll&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:-&lt;/strong&gt; You will have to re-register the ASPComp.dll&lt;br /&gt;&lt;br /&gt;After completing the component changes, open your asp page in the notepad and replace the method call with the newly created method.&lt;br /&gt;&lt;br /&gt;So your MyASP.asp page will look like:&lt;br /&gt;&lt;br /&gt;&lt; %&lt;br /&gt;Set oExample = Server.CreateObject("ASPComp.clsASP")&lt;br /&gt;oExample.Call_HelloWorld&lt;br /&gt;% &gt;&lt;br /&gt;&lt;br /&gt;You are done with the changes. So browse http://localhost/ASPTest/MyASP.asp in the IE window.&lt;br /&gt;&lt;br /&gt;Reference: http://www.aspfree.com/c/a/VB.NET/Calling-a-Web-Service-using-VB6-with-SOAP-30/1/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4308709865055803866?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4308709865055803866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4308709865055803866' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4308709865055803866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4308709865055803866'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/05/how-to-consume-web-service-in-classic.html' title='How to consume web service in classic ASP application using Soap 3.0'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3524107152325681176</id><published>2010-05-05T20:55:00.000-07:00</published><updated>2010-05-05T21:19:03.265-07:00</updated><title type='text'>How to create ASP application using ASP Object Library</title><content type='html'>Microsoft ASP Object Library provides five ASP Intrinsic Objects i.e. Request, Response, Server, Session, and Application that can be used in the COM component to develop re-usable code components that can be used in other ASP applications.&lt;br /&gt;&lt;br /&gt;Here I am going to show you how you can create ASP application that uses COM component developed in VB that is using ASP object library.&lt;br /&gt;&lt;br /&gt;Below are the steps to create very-very simple ASP application.&lt;br /&gt;&lt;br /&gt;1. Open the MS Visual Basic 6.0 and create ActiveX DLL project.&lt;br /&gt;2. Rename the project1 as ASPComp and class1 as clsASP.&lt;br /&gt;3. Copy below code in the clsASP class window.&lt;br /&gt;&lt;br /&gt;Private oContext As ObjectContext&lt;br /&gt;Private oResponse As Response&lt;br /&gt;&lt;br /&gt;Implements ObjectControl&lt;br /&gt;&lt;br /&gt;Private Sub ObjectControl_Activate()&lt;br /&gt;   Set oContext = GetObjectContext()&lt;br /&gt;   Set oResponse = oContext("Response")&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub ObjectControl_Deactivate()&lt;br /&gt;   Set oContext = Nothing&lt;br /&gt;   Set oResponse = Nothing&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Function ObjectControl_CanBePooled() As Boolean&lt;br /&gt;   ObjectControl_CanBePooled = False&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Public Sub HelloWorld()&lt;br /&gt;   oResponse.Write "Hello World!&lt;BR&gt;" &amp; vbCrLf&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;4. Now open project-&gt; references window from menu and add reference of following items.&lt;br /&gt; &lt;em&gt;Microsoft Active Server Pages Object Library.&lt;br /&gt;    COM+ 1.0 Admin Type Library&lt;br /&gt;    COM+ Services Type Library&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;5. Now go to file menu and make the ASPComp.dll&lt;br /&gt;&lt;br /&gt;You are done with creating COM component and now you have to create an ASP page that will comsume this component.&lt;br /&gt;&lt;br /&gt;So create a folder named ASPTest in the in wwwroot folder and then create an asp page named MyASP.asp in it.&lt;br /&gt;&lt;br /&gt;Open this page in notepad and copy following code in it and save it.&lt;br /&gt;&lt;br /&gt;&lt; %&lt;br /&gt;Set oExample = Server.CreateObject("ASPComp.clsASP")&lt;br /&gt;oExample.HelloWorld&lt;br /&gt;% &gt;&lt;br /&gt;&lt;br /&gt;Now one last thing to be done is to register the component in the COM+ services. You can do it by setting the class's MTSTransactionMode property = 1 - NoTransaction or through steps given below:&lt;br /&gt;&lt;br /&gt;1. Open the Component Services Window and right click on the COM+ Applications&lt;br /&gt;2. From the context menu select new-&gt;application&lt;br /&gt;3. A Wizard will open, click on next button.&lt;br /&gt;4. Choose Create Empty application and enter the application name -  ASPComp, leave other settings as is and click on next button.&lt;br /&gt;5. Again leave the settings as is and click on next button.&lt;br /&gt;6. Click on Finish button.&lt;br /&gt;7. Now you can see ASPComp in the list of COM+ Applications. Double click on it.&lt;br /&gt;8. Now right click on component and choose new-&gt;component&lt;br /&gt;9. A wizard will open, click on the next button.&lt;br /&gt;10. Choose the install new component and browse and select the ASPComp.dll and click on open button.&lt;br /&gt;11. Click on Finish button.&lt;br /&gt;12. Now right click on ASPComp and click on start option.&lt;br /&gt;&lt;br /&gt;You are done with the development now time to test it.&lt;br /&gt;&lt;br /&gt;Open the IE and type following address in the address bar.&lt;br /&gt;&lt;br /&gt;http://localhost/ASPTest/MyASP.asp&lt;br /&gt;&lt;br /&gt;You should see - "Hello World" on the page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reference: http://www.stardeveloper.com/articles/display.html?article=2000041401&amp;page=1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3524107152325681176?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3524107152325681176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3524107152325681176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3524107152325681176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3524107152325681176'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/05/how-to-create-asp-application-using-asp.html' title='How to create ASP application using ASP Object Library'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4908420228933786240</id><published>2010-03-07T09:26:00.000-08:00</published><updated>2010-03-07T09:32:58.643-08:00</updated><title type='text'>ASP.NET Coding Model- Inline Code, Code-Behind &amp; Code-Beside</title><content type='html'>&lt;strong&gt;Inline Code:&lt;/strong&gt;&lt;br /&gt;It’s an old style of coding model, where your business logic code appears in &lt;br /&gt;&lt; script runat=”server”&gt; &lt; /script &gt; block in the .aspx page itself.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt; %@ Page Language=”C#” % &gt;&lt;br /&gt;&lt; script runat=”server”&gt;&lt;br /&gt;void Page_Load(object sender, eventArgs e)&lt;br /&gt;{&lt;br /&gt;Label1.Text=”Hello World”;&lt;br /&gt;}&lt;br /&gt;&lt; /script&gt;&lt;br /&gt;&lt; html &gt;&lt;br /&gt;&lt; body &gt;&lt;br /&gt;&lt; form id=”form1” runat=”server” &gt;&lt;br /&gt;&lt; asp:Label ID=”Label1” Runat=”server” / &gt;&lt;br /&gt;&lt; /form &gt;&lt;br /&gt;&lt; /body &gt;&lt;br /&gt;&lt; /html &gt;&lt;br /&gt;&lt;br /&gt;When first time this page loads,it is compiled into a class that resides in an assembly stored in a subfolder of the “C:\WINDOWS\Microsoft.NET\Framework\v2.x.xxxx\Temporary AST.NET files” folder. This compiled version of the page is good until the .aspx file changes or the application is restarted, at that time it will have to be recompiled.&lt;br /&gt;&lt;strong&gt;Note-&lt;/strong&gt; By default web page inherits from the System.Web.UI.Page class, so if you want your page inherits from some other class (which in turn must inherit from Page class), add “inherits” attribute to the Page directive.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Code-Behind: Non-Compiled&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This coding style was used by the people, who wanted to change code on-the-fly without having to build their projects, or who wanted to separate code from HTML but didn’t have Visual Studio tool.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;default.aspx file:&lt;br /&gt;&lt;br /&gt;&lt; %@ Page Language=”C#” Src=”default.aspx.cs” Inherits=”CodeBehindClass”  % &gt;&lt;br /&gt;&lt; html &gt;&lt;br /&gt;&lt; body &gt;&lt;br /&gt;&lt; form id=”form1” runat=”server” &gt;&lt;br /&gt;&lt; asp:Label ID=”Label1” Runat=”server” / &gt;&lt;br /&gt;&lt; /form &gt;&lt;br /&gt;&lt; /body &gt;&lt;br /&gt;&lt; /html &gt;&lt;br /&gt;&lt;br /&gt;Default.aspx.cs file:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Web;&lt;br /&gt;public class CodeBehindClass : System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;protected System.Web.UI.WebControls.Label Label1;&lt;br /&gt;public void Page_Load(object sender, eventArgs e)&lt;br /&gt;{&lt;br /&gt;Label1.Text=”Hello World”;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In the above cod, the .aspx page looks just like the inline page, except the code has been moved to the code-behind file and two more attributes has been added to the  Page directive. The &lt;em&gt;Src &lt;/em&gt;attribute points to the physical file where the code behind class is located. The &lt;em&gt;Inherits &lt;/em&gt;attributes tells us which class in that code-behind file the page should inherit because there technically could be any number of classed in that file. &lt;br /&gt;The code-behind class must declare all the controls on the page as &lt;em&gt;protected &lt;/em&gt;member of the class.&lt;br /&gt;When the first time this page is requested, it will be compiled and cached only as the inline code version, using the code-behind file as the source for its base class. It will remain cached until the .aspx or code-behind file has been changed or the application is restated.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Code-Behind: Compiled&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This coding style is same as the previous one for the coding point of view except in the Page directive “Src” attribute is replaced with “Codebehind”.&lt;br /&gt;e.g.-&lt;br /&gt;&lt; %@ Page Language=”C#” Codebehind=”default.aspx.cs” Inherits=”CodeBehindClass”  % &gt;&lt;br /&gt;&lt;br /&gt;Rest of the code will be same as shown in the Code-Behind Non-Compiled coding style.&lt;br /&gt;By the way this coding style was used only by Visual Studio 2002 and 2003. &lt;em&gt;Codebehind &lt;/em&gt;attribute was used to let the designer know where the code resides. Because no &lt;em&gt;Src &lt;/em&gt;was specified, the class indicated in the &lt;em&gt;Inherits &lt;/em&gt;attribute had to be compiled in an assembly located in the /bin folder. Actually when the project was built, all the .cs (or .vb) files in the project were compiled into one assembly. When the first time page was requested, it would be compiled in much the same way as the previous method, except that it would inherit from a class compiled in an assembly found in the /bin folder.&lt;br /&gt;This style is obsolete and not supported in Visual Studio 2005 as it required constant synchronization between the page and code files that would generate lots of code. It also required a build every time page is tested.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Code-Beside:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This coding style uses the concept of partial class to separate the code files from the .aspx page.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;default.aspx file:&lt;br /&gt;&lt;br /&gt;&lt; %@ Page Language=”C#” Codefile=”default.aspx.cs” Inherits=”Default_aspx”  % &gt;&lt;br /&gt;&lt; html &gt;&lt;br /&gt;&lt; body &gt;&lt;br /&gt;&lt; form id=”form1” runat=”server” &gt;&lt;br /&gt;&lt; asp:Label ID=”Label1” Runat=”server” / &gt;&lt;br /&gt;&lt; /form &gt;&lt;br /&gt;&lt; /body &gt;&lt;br /&gt;&lt; /html &gt;&lt;br /&gt;&lt;br /&gt;Default.aspx.cs file:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Web;&lt;br /&gt;public class Default_aspx: System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;protected System.Web.UI.WebControls.Label Label1;&lt;br /&gt;public void Page_Load(object sender, eventArgs e)&lt;br /&gt;{&lt;br /&gt;Label1.Text=”Hello World”;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;When a request for the page is made for the first time, the page combines itself with the partial class to become the functional equivalent of the inline code. This compiled page remains valid until one of the involved files is changed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4908420228933786240?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4908420228933786240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4908420228933786240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4908420228933786240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4908420228933786240'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/03/aspnet-coding-model-inline-code-code.html' title='ASP.NET Coding Model- Inline Code, Code-Behind &amp; Code-Beside'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6260064472854285406</id><published>2010-02-27T01:26:00.000-08:00</published><updated>2010-02-27T01:35:57.047-08:00</updated><title type='text'>Database Normalization and Normal Forms</title><content type='html'>Database can be designed with following approaches:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Top-down approach&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The Entity-Relationship (E/R) modelling technique is the top-down approach. It involves identifying entities, relationships and attributes, drawing E/R diagram and mapping the diagram to tables.&lt;br /&gt;Generally tables derived from E/R diagram conforms to at least first normal form. This approach is the best for validation of existing designs.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Bottom-up approach&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Normalizing the database is the bottom-up approach. Normalization is a step by step decomposition of complex tables into simple tables. It reduces redundancy using the principle of non-loss decomposition. Non-loss decomposition is a process of breaking large/complex tables into smaller/simple tables without loss of information.&lt;br /&gt;Redundancy is the unnecessary repetition of data that can lead to inconsistencies in data and update anomalies.&lt;br /&gt;Generally, normalization follows the process of drawing E/R diagrams.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; A fully normalized record consist set of attributes that describe the entity and a primary key that identifies the entity.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Functional Dependency&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Normalization theory is based on the theory of functional dependency. &lt;br /&gt;Functional dependency can be explained like – &lt;br /&gt;&lt;br /&gt;Given a relation R, attribute A is functionally dependent on B if each value of A in R is associated with precisely one value of B.&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;Given a relation R, attribute A is functionally dependent on B only if whenever two tuples of R agree on their B value, they must agree in their A value as well.&lt;br /&gt;&lt;br /&gt;For Example – &lt;br /&gt;There is an entity named CUSTOMER with following attributes: CODE, NAME, ADDRESS and PHONE_NO.&lt;br /&gt;&lt;br /&gt;Given a particular value of CODE, there is precisely one corresponding value of NAME, ADDRESS and PHONE_NO. So, the attributes NAME, ADDRESS and PHONE_NO are functionally dependent on the attribute CODE.&lt;br /&gt;&lt;br /&gt;Functional dependency does not require an attribute to be the key in order to functionally determine other attributes.&lt;br /&gt;&lt;br /&gt;For Example- &lt;br /&gt;In the SALES entity that has attributes: CUSTOMER_CODE, CITY, PRODUCT_CODE, and QUANTITY.&lt;br /&gt;&lt;br /&gt;CUSTOMER_CODE functionally determines CITY because city to which the shipment is made is also where the customer is located.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; Functional dependency represents many-to-many relationships.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Normal Forms&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Normalization results in the formation of tables that satisfied certain specified constraints, and represent certain normal forms. Normal forms are table structures with minimum redundancy.&lt;br /&gt;&lt;br /&gt;Some of the most important and widely used normal forms are:&lt;br /&gt;&lt;br /&gt;1.First Normal Form (1st NF)&lt;br /&gt;2.Second Normal Form (2nd NF)&lt;br /&gt;3.Third Normal Form (3rd NF)&lt;br /&gt;4.Boyce-Codd Normal Form (BCNF)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; A relation that is in the first normal form may also be in second normal form or third formal form.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;First Normal Form&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;A table is said to be in the first normal form (1 NF) when each cell of the table contains precisely one value. To put data in 1 NF, all repeating information has to be removed.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Second Normal Form&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A table is said to be in 2 NF when it is in the 1 NF and every attribute in the record is functionally dependent upon the whole key, and not just part of the key.&lt;br /&gt;&lt;br /&gt;Example- A table has following attributes: EMP_CODE, DEPT, PROJ_CODE, and HOURS.&lt;br /&gt;&lt;br /&gt;The primary key here is composite(EMP_CODE+PROJ_CODE). But the attributes of this table depend upon only part of the primary key.&lt;br /&gt;&lt;br /&gt;• EMP_CODE+PROJ_CODE functionally determines HOURS&lt;br /&gt;• EMP_CODE functionally determines DEPT but it has no dependency on PROJ_CODE.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Break this table into 2 tables: &lt;br /&gt;Table A with attributes EMP_CODE and DEPT &lt;br /&gt;Table B with attributes EMP_CODE, PROJ_CODE and HOURS.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Third Normal Form&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A table is said to be in 3 NF when it is in 2 NF and every non-key attribute is functionally dependent on just the primary key.&lt;br /&gt;&lt;br /&gt;Example- A table has following attributes: EMP_CODE, DEPT and DEPT_HEAD_CODE&lt;br /&gt;&lt;br /&gt;The primary key here is EMP_CODE. The attribute DEPT is dependent on EMP_CODE and the attribute DEPT_HEAD_CODE is dependent on DEPT. So there is an indirect dependency on primary key.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Break the table into 2 tables: &lt;br /&gt;Table A with attributes EMP_CODE and DEPT &lt;br /&gt;Table B with attributes DEPT and DEPT_HEAD_CODE&lt;br /&gt;Now each non-key attribute depends on the key, the whole key and nothing but the key&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Boyce-Codd Normal Form&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A table is said to be in BCNF if every determinate is a candidate key.&lt;br /&gt;&lt;br /&gt;The definition of 3 NF is inadequate for the tables with multiple candidate keys where they are composite keys or they are overlapped (has at least one attribute in common)&lt;br /&gt;&lt;br /&gt;Example- Table A has following attributes: EMP_CODE, EMP_EMAIL, PROJ_CODE and HOURS&lt;br /&gt; Table B, which is master for table A has following attributes: EMP_CODE, EMP_EMAIL, EMP_PHONE, EMP_FAX etc.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Observations:&lt;/strong&gt;&lt;br /&gt;• Table A has multiple candidate keys- attributes EMP_CODE and EMP_EMAIL are candidate keys.&lt;br /&gt;• Table B has composite candidate keys- EMP_CODE and PROJ_CODE functionally determine HOURS.&lt;br /&gt;• And EMP_EMAIL and PROJ_CODE functionally determine HOURS as well.&lt;br /&gt;• Composite keys are overlapped – PROJ_CODE is common.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Break table into 2 tables:&lt;br /&gt;Table B1 with attributes EMP_CODE and EMP_EMAIL&lt;br /&gt;Table B2 with attributes EMP_CODE, PROJ_CODE and HOURS&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6260064472854285406?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6260064472854285406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6260064472854285406' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6260064472854285406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6260064472854285406'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2010/02/database-normalization-and-normal-forms.html' title='Database Normalization and Normal Forms'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-7369548687204046460</id><published>2009-12-26T21:35:00.000-08:00</published><updated>2009-12-27T08:25:13.869-08:00</updated><title type='text'>Error: "The project type is not supported by this installation."</title><content type='html'>There could be many cases that cause this error. One such case is when you try to open/migrate web project application developed in Visual Studio 2003 in the Visual Studio 2005. The reason being VS 2005 does not come with web project template because VS 2005 comes with new web application development &amp; compilation machanism that is called website model. for more details &lt;a href='http://sanjaysainitech.blogspot.com/2008/06/how-to-create-web-project-in-vs-2005.html'&gt;click&lt;/a&gt; here.&lt;br /&gt;&lt;br /&gt;So to solve this problem you will have to install following updates on your machine.&lt;br /&gt;&lt;br /&gt;1. &lt;a href='http://www.microsoft.com/downloads/details.aspx?FamilyId=8B05EE00-9554-4733-8725-3CA89DD9BFCA&amp;displaylang=en'&gt;Microsoft Visual Studio 2005 - Update to Support Web Application Projects&lt;/a&gt;&lt;br /&gt;2. &lt;a href='http://www.microsoft.com/downloads/details.aspx?familyid=bb4a75ab-e2d4-4c96-b39d-37baf6b5b1dc&amp;displaylang=en'&gt;install Microsoft® Visual Studio® 2005 Team Suite Service Pack 1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note - To fully enable Web Application Projects in Visual Studio 2005, you will have to install both these updates.&lt;br /&gt;&lt;br /&gt;Reference- http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-7369548687204046460?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/7369548687204046460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=7369548687204046460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7369548687204046460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7369548687204046460'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/12/error-project-type-is-not-supported-by.html' title='Error: &quot;The project type is not supported by this installation.&quot;'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6713255481429613865</id><published>2009-12-05T21:14:00.000-08:00</published><updated>2009-12-05T21:19:21.992-08:00</updated><title type='text'>Redirecting Assembly Versions</title><content type='html'>&lt;strong&gt;How to redirect an application to run against newer version of an assembly. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;An application configuration file, machine configuration file, or a publisher policy file can redirect one version of an assembly to another. You can use the .NET Framework Configuration tool (Mscorcfg.msc) to redirect assembly versions at both the application level and the machine level, or you can directly edit the configuration file.&lt;br /&gt;&lt;br /&gt;Note: You cannot redirect versions for assemblies that are not strong-named. The common language runtime ignores the version for assemblies that are not strong-named.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Redirecting Assembly Versions Using Publisher Policy&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Vendors of assemblies can state that applications should use a newer version of an assembly by including a publisher policy file with the upgraded assembly. The publisher policy file, which is located in the global assembly cache, contains assembly redirection settings. Vendors use publisher policies only when the new assembly is backward compatible with the assembly being redirected.&lt;br /&gt;&lt;br /&gt;You can bypassing Publisher Policy by using following tag in the app.config/web.config files.&lt;br /&gt;&lt;br /&gt;&lt; publisherPolicy apply="no" &gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Redirecting Assembly Versions through App.config/Web.config files&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Specify information for an assembly by placing information for each assembly inside a &lt;dependentAssembly&gt; element. The &lt;assemblyIdentity&gt; element contains information that identifies an assembly. You can have more than one &lt;dependentAssembly&gt; element in the configuration file, but there must be exactly one &lt;assemblyIdentity&gt; element in each &lt;dependentAssembly&gt; element. To redirect one version to another, use the &lt;bindingRedirect&gt; element. The oldVersion attribute can specify either a single version, or a range of versions. For example, &lt;bindingRedirect oldVersion="1.1.0.0-1.2.0.0" newVersion="2.0.0.0"/&gt; specifies that the runtime should use version 2.0.0.0 instead of the assembly versions between 1.1.0.0 and 1.2.0.0.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt; configuration &gt;&lt;br /&gt;   &lt; runtime &gt;&lt;br /&gt;      &lt; assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" &gt;&lt;br /&gt;       &lt; dependentAssembly &gt;&lt;br /&gt;         &lt; assemblyIdentity name="myAssembly" publicKeyToken="32ab4ba45e0a69a1" culture="en-us" / &gt;&lt;br /&gt;&lt; !-- Assembly versions can be redirected in application, publisher policy, or machine configuration files. -- &gt;&lt;br /&gt;         &lt; bindingRedirect oldVersion="1.0.0.0"&lt;br /&gt;                          newVersion="2.0.0.0"/ &gt;&lt;br /&gt;       &lt; / dependentAssembly &gt;&lt;br /&gt;       &lt; dependentAssembly &gt;&lt;br /&gt;         &lt; assemblyIdentity name="mySecondAssembly" publicKeyToken="32ab4ba45e0a69a1" culture="en-us" / &gt;&lt;br /&gt;&lt; !-- Publisher policy can be set only in the application configuration file. -- &gt;&lt;br /&gt;          &lt; publisherPolicy apply="no" &gt;&lt;br /&gt;       &lt; / dependentAssembly &gt;&lt;br /&gt;      &lt; / assemblyBinding &gt;&lt;br /&gt;   &lt; / runtime &gt;&lt;br /&gt;&lt; / configuration &gt; &lt;br /&gt;&lt;br /&gt;Note: The &lt;assemblyBinding&gt; elements are order-sensitive. You should enter assembly binding redirection information for any .NET Framework version 1.0 assemblies first, followed by assembly binding redirection information for any .NET Framework version 1.1 assemblies&lt;br /&gt;&lt;br /&gt;Reference: http://msdn.microsoft.com/en-us/library/7wd6ex19(VS.71).aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6713255481429613865?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6713255481429613865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6713255481429613865' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6713255481429613865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6713255481429613865'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/12/redirecting-assembly-versions.html' title='Redirecting Assembly Versions'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1474234462792505134</id><published>2009-06-02T10:32:00.000-07:00</published><updated>2009-06-02T10:35:29.673-07:00</updated><title type='text'>Publish Website: Access to the path ...\App_WebReferences.compiled' is denied.</title><content type='html'>This error sometimes comes during publishing website that implements impersonation. When impersonation setting is made in the web.config file and the impersonate user dose not have access permission on the temp directory, this error likely to come. Although I don’t understand why impersonate user needs access permission on temp directory because during publishing website is precompiled and copied in the given location.&lt;br /&gt; &lt;br /&gt;Anyways the solution that worked for me is that I commented the impersonation setting in the web.config file and then published it after publishing succeed I uncommented the settings from the web.config file in the published folder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1474234462792505134?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1474234462792505134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1474234462792505134' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1474234462792505134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1474234462792505134'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/06/publish-website-access-to-path.html' title='Publish Website: Access to the path ...\App_WebReferences.compiled&apos; is denied.'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3090107961006120197</id><published>2009-05-08T12:15:00.000-07:00</published><updated>2009-05-08T12:20:02.647-07:00</updated><title type='text'>HTTP Modules Versus Global.asax Files</title><content type='html'>You can implement much of the functionality of a module in the application's Global.asax file, which enables you to respond to application events. However, modules have an advantage over the Global.asax file because they are encapsulated and can be created one time and used in many different applications. By adding them to the global assembly cache and registering them in the Machine.config file, you can reuse them across applications. For more information, see Global Assembly Cache. &lt;br /&gt;&lt;br /&gt;The advantage of using the Global.asax file is that you can handle other registered events such as Session_Start and Session_End. In addition, the Global.asax file enables you to instantiate global objects that are available throughout the application. &lt;br /&gt;You should use a module whenever you must create code that depends on application events, and when the following conditions are true: &lt;br /&gt;# You want to re-use the module in other applications. &lt;br /&gt;# You want to avoid putting complex code in the Global.asax file. &lt;br /&gt;# The module applies to all requests in the pipeline (IIS 7.0 Integrated mode only). &lt;br /&gt;You should add code in the Global.asax file whenever you must create code that depends on application events and you do not have to reuse it across applications. You can also use the Global.asax file when you have to subscribe to events that are not available to modules, such as Session_Start. &lt;br /&gt; &lt;br /&gt;Global.asax file is derived from HttpApplication class and it does not implement IHttpModule interface like custom modules. If you are not going to use your custom module in any other application or don’t have complex logic than you should use Global.asax instead of creating custom modules.&lt;br /&gt;You can have multiple modules in your web application implementing same events. Modules are called in the sequence they are added in the web.config file. With in a module events are called in following sequence:&lt;br /&gt; &lt;br /&gt;BeginRequest &lt;br /&gt;AuthenticateRequest &lt;br /&gt;AuthorizeRequest &lt;br /&gt;ResolveRequestCache &lt;br /&gt;AcquireRequestState &lt;br /&gt;PreRequestHandlerExecute &lt;br /&gt;PostRequestHandlerExecute &lt;br /&gt;ReleaseRequestState &lt;br /&gt;UpdateRequestCache &lt;br /&gt;EndRequest &lt;br /&gt;PreSendRequestHeaders&lt;br /&gt;PreSendRequestContent&lt;br /&gt;Error &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Event calling sequence in multi module Scenario: &lt;/strong&gt;&lt;br /&gt;Suppose there are Global.asax and 2 custom modules namely Module.cs and Module1.cs in an application. Custom modules are added in web.config in following order.&lt;br /&gt; &lt;br /&gt; &lt; httpModules &gt;&lt;br /&gt;  &lt; add name="MyModule1" type="MyModule1" /&gt;&lt;br /&gt;  &lt; add name="MyModule" type="MyModule" /&gt;&lt;br /&gt; &lt; /httpModules &gt;&lt;br /&gt; &lt;br /&gt;And all of them are handling first 3 event in the above given list – BeginRequest , AuthenticateRequest, AuthorizeRequest.&lt;br /&gt; &lt;br /&gt;The sequence of event call will be as follows:&lt;br /&gt; &lt;br /&gt;Application_Start        -   Global.asax&lt;br /&gt;Init                     -   Global.asax   &lt;br /&gt;BeginRequest             -   MyModule1&lt;br /&gt;BeginRequest             -   MyModule&lt;br /&gt;BeginRequest             -   Global.asax&lt;br /&gt;AuthenticateRequest      -   MyModule1&lt;br /&gt;AuthenticateRequest      -   MyModule&lt;br /&gt;AuthenticateRequest      -   Global.asax&lt;br /&gt;AuthorizeRequest         -   MyModule1&lt;br /&gt;AuthorizeRequest         -   MyModule&lt;br /&gt;AuthorizeRequest         -   Global.asax&lt;br /&gt;Session_Start            -   Global.asax&lt;br /&gt;Page_Load&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3090107961006120197?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3090107961006120197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3090107961006120197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3090107961006120197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3090107961006120197'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/05/http-modules-versus-globalasax-files.html' title='HTTP Modules Versus Global.asax Files'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-587508457884698061</id><published>2009-05-08T12:11:00.000-07:00</published><updated>2009-05-08T12:14:09.992-07:00</updated><title type='text'>What is the difference between ETL tool and OLAP tool?</title><content type='html'>&lt;strong&gt;ETL: &lt;/strong&gt;&lt;br /&gt;Extract, Transform and Load. This is a product to extract the data from multiple/single source transform the data and load it into a table, flat file or simply a target.&lt;br /&gt;There is a quite a bit competition in the market with regard to the ETL product as well as the OLAP products. These tools would definitely be widely used for data load and data analysis purpose. &lt;br /&gt;ETL tools in market&lt;br /&gt;&lt;br /&gt;1 INFORMATICA-- univeral tool good market&lt;br /&gt;2 ABINITO -- fastest loading tool very good market&lt;br /&gt;3 DATASTAGE-- difficult work no good market&lt;br /&gt;4 BODI-- good market&lt;br /&gt;5 ORACLE WAREHOUSE BUILDER-- good market&lt;br /&gt;&lt;br /&gt;ETL Tools is for Extracting source data, Transforming as required and Loading into DW. it is first part of DW. Now large fact and dimension tables are in DW. If you have to generate crosstab report from these tables, it will take very long time. So these DW tables are transformed into Cubes and stored in OLAP Server. Any Report Generation, Analysis is done on these... Cubes are having pre aggregated values and hence Report Generation will be much faster. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;OLAP:&lt;/strong&gt; &lt;br /&gt;Its an online analytical processing tool. There are various products available for data analysis. Like Hyperion which is a Business Intelligence (BI) and Business Performance Management (BPM ) Tool like Brio, Business Objects and Cognos etc. Its the market leader in Financial, Operational and Strategic Planning. It has applications for Planning, consolidation, scorecarding, reporting, dashboards, Analysis, Workspace, Master Data Management and Foundation. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The Difference between the two:&lt;/strong&gt;&lt;br /&gt;There are only 2 ways available to get data from a datawarehouse or a database.one is using sql statement and other method is using an OLAP tool(ex:cognos, business objects.....)So Hyperion is an example for a OLAP tool. ETL is a process of Extracting data from a source systems(a system where client's transactional business information resides) and performing business logic(applying TRANSFORMATION rules) on the collected source information(business logic depends on business requirements), and LOADING the precise data into a warehouse(probably a relational database). OLAP comes into picture after ETL developers design the warehouse........by using olap tools a business user can generate standard reports(without having sql knowledge he can do this)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-587508457884698061?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/587508457884698061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=587508457884698061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/587508457884698061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/587508457884698061'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/05/what-is-difference-between-etl-tool-and.html' title='What is the difference between ETL tool and OLAP tool?'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3857710948267010369</id><published>2009-05-08T11:51:00.000-07:00</published><updated>2009-05-08T12:09:43.419-07:00</updated><title type='text'>How to configure application services in asp.net</title><content type='html'>Here I am not going to explain what is application service in asp.net, for that you can see my post -&lt;a href='http://sanjaysainitech.blogspot.com/2008/01/using-web-parts-with-sql-server-2000.html'&gt;&lt;br /&gt;Using Web Parts with SQL Server 2000/2005.&lt;/a&gt;&lt;br /&gt;Configuring application services in your asp.net application is a two step process:&lt;br /&gt;&lt;br /&gt;1. Configure database objects that will hold application services data.&lt;br /&gt;2. Configure providers that will provide access to application services data from the database.&lt;br /&gt;&lt;br /&gt;For Configure database objects use following sql script that will create database &amp; its objects(tables, Sps) for storing application services objects. &lt;br /&gt;These are found at &lt;root&gt;:\WINDOWS\Microsoft.NET\Framework\v2.0.50727&lt;br /&gt;&lt;br /&gt;InstallCommon.sql&lt;br /&gt;InstallMembership.sql&lt;br /&gt;InstallPersonalization.sql&lt;br /&gt;InstallProfile.sql&lt;br /&gt;InstallRoles.sql&lt;br /&gt;&lt;br /&gt;Make sure you run "InstallCommon.sql" script first as it creates database before running other scripts. By default database name is "aspnetdb" but if you want to change it, you can update InstallCommon.sql script.&lt;br /&gt;These sql scripts are handy if you dont want to use all application services or you dont want to create separate database for it. In that case you can run any one or all script(s) depending upon the service you want to use on your application database. like if you want to implement only personalization then you just need to run "InstallPersonalization.sql" on your main database.&lt;br /&gt;&lt;br /&gt;You can unstall these objects as well using following sql scripts.&lt;br /&gt;&lt;br /&gt;UninstallCommon.sql&lt;br /&gt;UninstallMembership.sql&lt;br /&gt;UninstallPersonalization.sql&lt;br /&gt;UninstallProfile.sql&lt;br /&gt;UninstallRoles.sql&lt;br /&gt;&lt;br /&gt;For example you may want to use only personization service not profile, membership and role service in that case there is no point to have other services configured in the application.&lt;br /&gt;So you can run InstallCommon.sql followed by InstallProfile.sql sql scripts.&lt;br /&gt;Note:- dont forget to change database name in the InstallCommon.sql sql script with the database in which you want to configure application service data objects.&lt;br /&gt;&lt;br /&gt;You can do same thing using aspnet_regsql.exe utility as well using following command at the command prompt.&lt;br /&gt;&lt;br /&gt;aspnet_regsql.exe -S &lt; server name &gt; -U &lt; username &gt; -P &lt; password &gt; -A &lt; service code &gt; -d &lt; database name &gt;&lt;br /&gt;&lt;br /&gt;service code -  all : all services&lt;br /&gt;  m   : membership&lt;br /&gt;  r   : role manager&lt;br /&gt;  p   : profile&lt;br /&gt;  c   : personalization&lt;br /&gt;  w   : sql web event provider&lt;br /&gt;&lt;br /&gt;For example if you have to add only profile service in your existing database, run following command at the command prompt:&lt;br /&gt;&lt;br /&gt;aspnet_regsql.exe -S myserver -U user1 -P pass1 -A p -d mydb&lt;br /&gt;&lt;br /&gt;Note:- replace server name, user name, password and database name with user's.&lt;br /&gt;&lt;br /&gt;To remove profile service use -R in place of -A&lt;br /&gt;&lt;br /&gt;Like:- aspnet_regsql.exe -S myserver -U user1 -P pass1 -R p -d mydb&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Second step is to configure providers in the web application. &lt;br /&gt;Below is the code sample that can be added in the web.config file depending upon the application service you want to configure in your web application.&lt;br /&gt;&lt;br /&gt;Provider's configuration in web.config file.&lt;br /&gt;&lt;br /&gt;&lt; !-- Connection string will point to the database that is configured to store application service data -- &gt;&lt;br /&gt;&lt; connectionStrings &gt;&lt;br /&gt;&lt; add name="SQLConnString" connectionString="Data Source=FN-WS282-D8;Initial Catalog=AppServices;Integrated Security=false; user id=sa; pwd=pass1" providerName="System.Data.SqlClient" /&gt;&lt;br /&gt;&lt; /connectionStrings &gt;&lt;br /&gt;&lt;br /&gt;&lt; !-- Add following code for configuring personalization in the web.config file  -- &gt;&lt;br /&gt;&lt; webParts &gt;&lt;br /&gt;&lt; personalization defaultProvider="SqlPersonalizationProvider" &gt;&lt;br /&gt;&lt; providers &gt;&lt;br /&gt;&lt; add name="SqlPersonalizationProvider" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider" connectionStringName="SQLConnString" applicationName="/" /&gt;&lt;br /&gt;&lt; /providers &gt;&lt;br /&gt;&lt; authorization &gt;&lt;br /&gt;&lt; deny users="*" verbs="enterSharedScope" /&gt;&lt;br /&gt;&lt; allow users="*" verbs="modifyState" /&gt;&lt;br /&gt;&lt; /authorization &gt;&lt;br /&gt;&lt; /personalization &gt;&lt;br /&gt;&lt; /webParts &gt;&lt;br /&gt;&lt;br /&gt;&lt; !-- Add following code for configuring profile in the web.config file  -- &gt;&lt;br /&gt;&lt; profile defaultProvider="SqlProfileProvider" &gt;&lt;br /&gt;&lt; providers &gt;&lt;br /&gt;&lt; clear /&gt;&lt;br /&gt;&lt; add name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="SQLConnString" applicationName="/" /&gt;&lt;br /&gt;&lt; /providers &gt;&lt;br /&gt;&lt; properties &gt;&lt;br /&gt;&lt; add name="Message" type="System.String" /&gt;&lt;br /&gt;&lt; /properties &gt;&lt;br /&gt;&lt; /profile &gt;&lt;br /&gt;&lt;br /&gt;&lt; !-- Add following code for configuring membership in the web.config file  -- &gt;&lt;br /&gt;&lt; membership defaultProvider="SqlMembershipProvider" &gt;&lt;br /&gt;&lt; providers &gt;&lt;br /&gt;&lt; clear /&gt;&lt;br /&gt;&lt; add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SQLConnString" applicationName="/" /&gt;&lt;br /&gt;&lt; /providers &gt;&lt;br /&gt;&lt; /membership &gt;&lt;br /&gt;&lt;br /&gt;&lt; !-- Add following code for configuring role manager in the web.config file  -- &gt;&lt;br /&gt;&lt; roleManager defaultProvider="SqlRoleProvider" &gt;&lt;br /&gt;&lt; providers &gt;&lt;br /&gt;&lt; clear /&gt;&lt;br /&gt;&lt; add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="SQLConnString" applicationName="/" /&gt;&lt;br /&gt;&lt; /providers &gt;&lt;br /&gt;&lt; /roleManager &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3857710948267010369?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3857710948267010369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3857710948267010369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3857710948267010369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3857710948267010369'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/05/how-to-configure-application-services.html' title='How to configure application services in asp.net'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6383756976460302312</id><published>2009-04-23T10:52:00.000-07:00</published><updated>2009-04-23T11:09:43.481-07:00</updated><title type='text'>Pass by reference to a Web Service</title><content type='html'>Few days back someone asked me if we can pass value by reference to a web method. I thought why would some one want to pass parameter's reference to a web method because parameter's reference will point to memory location in client machine whereas web method will be invoked on the server machine where that reference will be invalid. &lt;br /&gt;Anyways, the reality is that you can pass value by reference to a web method if it allows so. In fact you can also create web method that will take "out" parameter.&lt;br /&gt;&lt;br /&gt;In Web Methods parameters can be passed by reference using “ref” keywords just like any other method.&lt;br /&gt;Like – &lt;br /&gt;    [WebMethod]&lt;br /&gt;    public void WebMethod2(ref int iparam)&lt;br /&gt;    {&lt;br /&gt;        iparam = iparam + 100;&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;And in the proxy class at the client end it is declared as below:&lt;br /&gt;  &lt;br /&gt;    public void WebMethod2(ref int iparam)&lt;br /&gt;    {&lt;br /&gt;        object[] results = this.Invoke("WebMethod2", new object[] {iparam});&lt;br /&gt;        iparam = ((int)(results[0]));&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Web Methods can also have “out” parameters.&lt;br /&gt;Like -&lt;br /&gt;    [WebMethod]&lt;br /&gt;    public string WebMethod1(string str,out int iReturn)&lt;br /&gt;    {&lt;br /&gt;        string temp = "Hello " + str;&lt;br /&gt;        iReturn = temp.Length;&lt;br /&gt;        return temp;&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;And in the proxy class at the client end it is declared as below:&lt;br /&gt; &lt;br /&gt;    public string WebMethod1(string str, out int iReturn)&lt;br /&gt;    {&lt;br /&gt;        object[] results = this.Invoke("WebMethod1", new object[] {str});&lt;br /&gt;        iReturn = ((int)(results[1]));&lt;br /&gt;        return ((string)(results[0]));&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6383756976460302312?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6383756976460302312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6383756976460302312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6383756976460302312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6383756976460302312'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/04/pass-by-reference-to-web-service.html' title='Pass by reference to a Web Service'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3292530057107962065</id><published>2009-04-23T09:57:00.000-07:00</published><updated>2009-04-23T10:05:54.850-07:00</updated><title type='text'>Error: A name was started with an invalid character.</title><content type='html'>Sometimes when we try to browse our newly hosted website or web service, we encounter with this error. The reason is that we forgot to configure ASP.NET version in the IIS or selected wrong version when we were hosting it.&lt;br /&gt; &lt;br /&gt;So now its time to correct this issue, follow these steps:&lt;br /&gt; &lt;br /&gt;1. Open IIS management console. &lt;br /&gt;2. Right click on the virtual directory of your web service and choose properties from the shortcut menu. &lt;br /&gt;3. Now click on the ASP.NET tab and choose appropriate ASP.NET version from the dropdown. &lt;br /&gt;4. Now click on Apply button to apply new setting and then click on OK button. &lt;br /&gt; &lt;br /&gt;Now try again to access you website/web service, you should be able to do so…&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3292530057107962065?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3292530057107962065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3292530057107962065' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3292530057107962065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3292530057107962065'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/04/error-name-was-started-with-invalid.html' title='Error: A name was started with an invalid character.'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2281353762497695916</id><published>2009-04-22T10:34:00.000-07:00</published><updated>2009-04-23T10:11:56.792-07:00</updated><title type='text'>Facts about Web Services</title><content type='html'>1. Web service class can have overloaded constructors (parameterized) but client can use only default parameter    less constructor to instantiate web    service object.&lt;br /&gt;2. service constructor(s) can not be made web method using “WebMethod” attribute.&lt;br /&gt;3. If web services is updated then the client needs to updated the web reference to get the changes reflected in    the proxy class and if the change    affecting any web method call in the client then client needs to be rebuilt    after code change as well.&lt;br /&gt;4. Web methods can have public, private, protected, internal and protected internal access modifiers but only public web method will be exposed to the    client.&lt;br /&gt;5. Web service class could be public or internal. [Class can not be declared as private, protected or protected internal].&lt;br /&gt;6. Web method could be declared as virtual method.&lt;br /&gt;7. Public class can not be derived from web service class as it lessens the accessibility of base web service class. But you can derive non public class. &lt;br /&gt;8. Web service class can have non “[WebMethod]” functions as well.&lt;br /&gt;9. Web service class can implement interface and declare implemented interface function as “[WebMethod]” so they can be exposed to clients.&lt;br /&gt;10. Web Method can be declared as static but then it will not be exposed to client.&lt;br /&gt;11. Web Service class can be declared as sealed class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2281353762497695916?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2281353762497695916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2281353762497695916' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2281353762497695916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2281353762497695916'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/04/facts-about-web-services.html' title='Facts about Web Services'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-7521570895921375472</id><published>2009-03-31T10:20:00.000-07:00</published><updated>2009-03-31T10:22:29.632-07:00</updated><title type='text'>error: "The report server is not responding. Verify that the report server is running and can be accessed from this computer"</title><content type='html'>You may encounter this error when you try to browse reporting manager's home page. like...&lt;br /&gt; &lt;br /&gt;http://localhost/Reports/Pages/Folder.aspx&lt;br /&gt; &lt;br /&gt;Or when you try to browse report server. like...&lt;br /&gt; &lt;br /&gt;http://localhost/Reportserver&lt;br /&gt;&lt;br /&gt;It shows the following message:&lt;br /&gt;&lt;br /&gt;The report server has encountered a configuration error. See the report server log files for more information. (rsServerConfigurationError) &lt;br /&gt;Access to the path 'c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is denied. &lt;br /&gt; &lt;br /&gt;Reason:&lt;br /&gt; &lt;br /&gt;Actually when you configure reporting servies on the machine, 2 virtual folders are created on IIS:&lt;br /&gt; &lt;br /&gt;1. Reports - Sql Server Reporting Manager&lt;br /&gt;2. ReportServer - Sql Server Report Server&lt;br /&gt; &lt;br /&gt;These are mapped to the following physical location on the machine respectively&lt;br /&gt; &lt;br /&gt;1. C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager&lt;br /&gt;2. C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer&lt;br /&gt; &lt;br /&gt;If these location do not have proper security permission for ASPNET or NETWORK SERVICES account then you may face above mentioned errors.&lt;br /&gt;So to solve this issue just give the appropriate security permissions (like Read &amp; Execute,List Folder Contents, Read) to ASPNET or NETWORK SERVICES account. If issue still persists make sure the above permissions are applied on RSWebApplication.config file on C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager and rsreportserver.config file on C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer location as well. You can give more permissions like write etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-7521570895921375472?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/7521570895921375472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=7521570895921375472' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7521570895921375472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7521570895921375472'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/03/error-report-server-is-not-responding.html' title='error: &quot;The report server is not responding. Verify that the report server is running and can be accessed from this computer&quot;'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-782909314644256993</id><published>2009-01-20T02:51:00.000-08:00</published><updated>2009-01-20T02:57:22.225-08:00</updated><title type='text'>How to restart windows service from SQL Job?</title><content type='html'>There could be many reasons for this requirement which, I am not going to discuss in this post. Here I will explain how you can do it.&lt;br /&gt;Now, suppose you want to create an sql job that will restart window service, it means window service will be stoped first and then started again.&lt;br /&gt;&lt;br /&gt;Following are the steps to create sql job that will do it.&lt;br /&gt;&lt;br /&gt;1. Open Microsoft SQl Server Management Studio than click on the SQL Server Agent under the Sql server where you want to create sql job.&lt;br /&gt;2. Right click on the jobs folder under SQL Server Agent and choose New Job option from the short cut menu.&lt;br /&gt;3. In the New Job window General page, name your job.&lt;br /&gt;&lt;br /&gt;Now you will have to create 2 job steps, first for stopping the window service and another one for starting it again, for that:&lt;br /&gt; &lt;br /&gt;4. Click on the Steps in the "Select a page" section to open Steps page.&lt;br /&gt;5. Click on the "New..." button on the Steps page to create new step.&lt;br /&gt;6. In the new job step window, give name to your step in the "Step Name" field.&lt;br /&gt;7. Choose "Operating system (CmdExec)" option from the dropdown for the job step type.&lt;br /&gt;8. Enter following command in the "Command" field.&lt;br /&gt;&lt;br /&gt;net stop "&lt; Windows Service Name &gt;"&lt;br /&gt;&lt;br /&gt;like - net stop "Terminal Services" to stop terminal service.&lt;br /&gt;&lt;br /&gt;9. Click on OK button to complete the job step creation process. &lt;br /&gt;10. Now  repeate steps 5 to 9 for creating another job step for starting the window service. But this time the command would be as follows:&lt;br /&gt;&lt;br /&gt;net start "Terminal Services"&lt;br /&gt;&lt;br /&gt;11. Now choose the first job step from the job step list and click on edit button, the job step will open in a window.&lt;br /&gt;12. Click on the "Advance" page and choose second job step for the "On success action" and "On failure action" from the respective dropdown controls and click on OK button.&lt;br /&gt;&lt;br /&gt;Reason: If service is already stop than this job step will fail so we will start the service otherwise if service is running than it will be stopped successfully so we will start it again.&lt;br /&gt;&lt;br /&gt;13. Now go to the "Advance" page for the second job step and choose "Quit the job reporting success" for "On success action" and "Quit the job reporting failure" for "On the failure action" from the respective dropdown control.&lt;br /&gt;&lt;br /&gt;There are other settings like Schedules, Alerts, Notifications, Targets for the &lt;br /&gt;SQL Jobs that you can set according to your requirement, I am not going to discuss them in this post.&lt;br /&gt;&lt;br /&gt;14. Now click on the OK button on the New Job window to complete the job creation process.&lt;br /&gt;&lt;br /&gt;Now you are ready to run your newly created sql job to test it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-782909314644256993?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/782909314644256993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=782909314644256993' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/782909314644256993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/782909314644256993'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2009/01/how-to-restart-windows-service-from-sql.html' title='How to restart windows service from SQL Job?'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-217001456774093831</id><published>2008-12-26T03:07:00.000-08:00</published><updated>2008-12-26T03:12:01.431-08:00</updated><title type='text'>Web Based Operating System</title><content type='html'>Web-based operating systems are more than just a collection of applications that run within a browser. They're self-contained environments in which you can create and store documents, copy files from one folder or drive to another, and conduct communications. &lt;br /&gt;&lt;br /&gt;In short, almost everything you can do from Windows or the Mac OS should be able to be accomplished within a Web OS. All you need is a Web browser to get there.&lt;br /&gt;&lt;br /&gt;One could argue that a Web-based operating system is redundant, since one needs a computer, operating system, and Web browser to access an online operating system. While that's true, the point of an online operating system is complete environment portability. &lt;br /&gt;&lt;br /&gt;That means being able to log on to any computer that has an Internet connection and, in the time it takes to launch your Web OS, having all of your applications and documents ready for you to resume work. Although you could cobble together many of the elements of a Web OS by using, say, Google Docs, Yahoo Mail, and other online applications, doing so would require you to make several stops around the Internet. &lt;br /&gt;&lt;br /&gt;There's no doubt that today's Web-based operating systems are far from feature-laden, and they probably will not tempt many to abandon their current routine that combines desktop and Web-based software. &lt;br /&gt;&lt;br /&gt;But given the push that the major players in the industry are making toward a completely Web-based future, there's also little doubt that Web-based operating systems, or some form thereof, are in our collective future. &lt;br /&gt;&lt;br /&gt;Here is the list of some web based OS to try with:&lt;br /&gt;&lt;br /&gt;1. &lt;a href='http://desktoptwo.com'&gt;http://desktoptwo.com&lt;/a&gt;&lt;br /&gt;2. &lt;a href='http://g.ho.st/'&gt;http://g.ho.st/&lt;/a&gt;&lt;br /&gt;3. &lt;a href='http://eyeos.org'&gt;http://eyeos.org&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-217001456774093831?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/217001456774093831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=217001456774093831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/217001456774093831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/217001456774093831'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/12/web-based-operating-system.html' title='Web Based Operating System'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2825686858198941204</id><published>2008-12-14T23:34:00.000-08:00</published><updated>2008-12-14T23:37:08.401-08:00</updated><title type='text'>File upload error :  "Can not access a closed file"</title><content type='html'>&lt;strong&gt;Reason:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This error occurs partily due to the new memory management feature added in the asp.net2.0 therefore you may wonder same code after migrating from asp.net1.1 to asp.net2.0 starts throwing this error.&lt;br /&gt;As I said,new memory management feature is partily reposible because you may not get this error if you are uploading the file directly without any redirection(due to business requirement) for exp. - storing uploaded file object in the session on file upload page and saving it after user confirmation on the confirmation page.&lt;br /&gt;Most likly you will get this error in the senario I mentioned as an example above subjected to the file size is more than 80Kb. The reason is,according to new memory management feature of asp.net2.0 when you upload a file the input stream is buffered in the memory if its size less than 80Kb otherwise it is stored in the temporary locations on the disk upto 4096Kb so when you maintain an object of any uplaoded file(more than 80Kb size) in session and redirect on different page the current request is disposed and the disk file associated with it is closed as well, now when you try to save uploaded file object on server(using SaveAs method of upload control) from the session, the request processing thread tries to read from the closed file object and thats where you get this error message.But if your uploaded file size is much less than 80Kb then you may not face this error.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You can solve this issue by adding following tag in the web.config file of your website.&lt;br /&gt;&lt;br /&gt;&lt; httpRuntime maxRequestLength="10240" requestLengthDiskThreshold="4096"/ &gt;&lt;br /&gt;&lt;br /&gt;Note - change the values according to your requirement.&lt;br /&gt;&lt;br /&gt;maxRequestLength - Specifies the total limit for the input stream buffering threshold, in KB. This limit can be used to prevent denial of service attacks that are caused, for example, by users posting large files to the server. &lt;br /&gt;The default is 4096 KB. If the threshold is exceeded, a ConfigurationErrorsException error is thrown. &lt;br /&gt;&lt;br /&gt;requestLengthDiskThreshold- Specifies the limit for the input stream buffering threshold, in kilobytes, it means if size of the stream is more than the value specifed it is stored in the temporary location on the disk otherwise buffered in the memory. This value should not exceed the maxRequestLength attribute.The default is 80 KB. &lt;br /&gt;&lt;br /&gt;Note - This attribute is new in the .NET Framework 2.0. &lt;br /&gt;&lt;br /&gt;So, if you assign same value to both the attributes, your application process the file upload request just like asp.net1.1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2825686858198941204?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2825686858198941204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2825686858198941204' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2825686858198941204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2825686858198941204'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/12/file-upload-error-can-not-access-closed.html' title='File upload error :  &quot;Can not access a closed file&quot;'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2603496678099774205</id><published>2008-12-11T19:49:00.000-08:00</published><updated>2008-12-11T19:55:17.778-08:00</updated><title type='text'>How to partition external hard drive?</title><content type='html'>If you are using Windows XP then you can use DISKPART utility, which is the replacement of FDISK(Windows 95/98) utility. This is a command line disk management utility.&lt;br /&gt;To run this utility, either open the console window and type DISKPART at the command prompt or use Run application.When you run this utility at the command prompt the prompt is changed to DISKPART prompt.&lt;br /&gt;&lt;br /&gt;Here is the list of some useful diskpart commands.&lt;br /&gt;&lt;br /&gt;1. Help - To see the help&lt;br /&gt;2. Exit - To exit from the utility&lt;br /&gt;3. List disk - To see the list of available hard disks&lt;br /&gt;4. List Partition - To see the list of available partitions on the selected disk&lt;br /&gt;5. Select Disk &lt; disk number &gt;  - To select the hard disk for creating partitions&lt;br /&gt;     like - DISKPART&gt; Select Disk 0&lt;br /&gt;6. Create partition - To create partitions&lt;br /&gt;7. Delete partition - To delete partitions&lt;br /&gt;8. Assign letter=&lt; Alphabate &gt;  - To assign letter to the partition&lt;br /&gt;     like - &lt;br /&gt;     DISKPART&gt;list disk&lt;br /&gt;     DISKPART&gt;select disk 1&lt;br /&gt;     DISKPART&gt;list partition&lt;br /&gt;     DISKPART&gt;select partition 1&lt;br /&gt;     DISKPART&gt;assign letter=D&lt;br /&gt;&lt;br /&gt;And there are many more command that you can check with help command.&lt;br /&gt;&lt;br /&gt;Before going with this utility for partitioning you must decide how many partition of what size you want to create. For example I have 160GB external hard disk and I want to create 3 partitions of 50GB,50GB and 60GB.&lt;br /&gt;&lt;br /&gt;First, I will connect my external hard disk with my PC.&lt;br /&gt;Second, I launch diskpart utility at the command prompt and type in following commands at the diskpart prompt &lt;br /&gt;&lt;br /&gt;in the same sequence.&lt;br /&gt;&lt;br /&gt;1. DISKPART&gt;list disk&lt;br /&gt;2. DISKPART&gt;select disk 1 &lt;br /&gt;3. DISKPART&gt;create partition primary size=50000&lt;br /&gt;4. DISKPART&gt;create extended&lt;br /&gt;5. DISKPART&gt;create partition logical size=60000&lt;br /&gt;6. DISKPART&gt;create partition logical&lt;br /&gt;&lt;br /&gt;In step 2 - disk 1 is my external hard disk&lt;br /&gt;In step 3,5 - size is in MB&lt;br /&gt;In step 6 - remaining size will be consumed&lt;br /&gt; &lt;br /&gt;Note: After completing partitioning, disconnect external hard disk and re-connect it.&lt;br /&gt;&lt;br /&gt;Now I will have to format these newly created partitions in order to use them for data storing.For that I use Window XP Disk Management utility.&lt;br /&gt;&lt;br /&gt;Following are the step for accessing Disk Management utility.&lt;br /&gt;&lt;br /&gt;1. Right click on My Computer icon on the desktop and select manage from the shortcut menu.&lt;br /&gt;2. Now select Disk Management from the tree menu in the Computer Management window.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2603496678099774205?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2603496678099774205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2603496678099774205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2603496678099774205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2603496678099774205'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/12/how-to-partition-external-hard-drive.html' title='How to partition external hard drive?'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8062873741355133634</id><published>2008-12-11T19:44:00.000-08:00</published><updated>2008-12-11T19:49:41.987-08:00</updated><title type='text'>How to publish multiple websites in a solution?</title><content type='html'>By default you can publish only single website at a time unless there is a dependency on other websites in a multiple websites in a solution. So if you want that along with your startup website other website should also publish then you will have to do some project dependency settings on the solution level.&lt;br /&gt;&lt;br /&gt;Following are the steps:&lt;br /&gt;&lt;br /&gt;1. Right click on the solution and choose Project Dependencies from the short-cut menu.&lt;br /&gt;2. In the Project Dependencies window go to Dependencies tab.&lt;br /&gt;3. Choose your main website(startup) from the 'Projects" dropdown.&lt;br /&gt;4. Check all the other websites/web servies in the "Depends on" section that you want to publish along with your main website and click on Ok button.&lt;br /&gt;&lt;br /&gt;Now when you publish your main website, you will be prompted with publish windows for all the depended websites for publishing.&lt;br /&gt;&lt;br /&gt;But if you want to publish only startup website but you are prompted with other webistes/web servies publishing windows as well, which you dont want to publish then remove them from the dependency list of the startup website through above mentioned steps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8062873741355133634?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8062873741355133634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8062873741355133634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8062873741355133634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8062873741355133634'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/12/how-to-publish-multiple-websites-in.html' title='How to publish multiple websites in a solution?'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8308284610442998919</id><published>2008-11-27T03:00:00.000-08:00</published><updated>2008-11-27T03:04:59.521-08:00</updated><title type='text'>How to execute exe file in a web application</title><content type='html'>First of all we need to understand that under the existing web request process mechanism you can not make any executable application that exists on the web server execute on your machine(client machine) by requesting web server  through IE. If your requirement is anything like this then better use &lt;a href=http://sanjaysainitech.blogspot.com/2008/06/what-is-citrix-server.html&gt;Citrix Presentation Server.&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;Having said that, if you want to execute any executable program from you web application then you can try below given code in you web page.&lt;br /&gt;Note – the exe will run on the server machine not on the client and you would not get any GUI.&lt;br /&gt;&lt;br /&gt; //C# code&lt;br /&gt;       ProcessStartInfo MyProcess = new ProcessStartInfo();&lt;br /&gt; //path of the program exe file&lt;br /&gt;       MyProcess.FileName = @"c:\myprogram.exe";&lt;br /&gt; //pass parameter if you’re executable require any command line argument&lt;br /&gt;       MyProcess.Arguments = @"anyparam";&lt;br /&gt;&lt;br /&gt;       Process.Start(MyProcess);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8308284610442998919?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8308284610442998919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8308284610442998919' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8308284610442998919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8308284610442998919'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/11/how-to-execute-exe-file-in-web.html' title='How to execute exe file in a web application'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6942667021868227846</id><published>2008-11-24T00:44:00.000-08:00</published><updated>2008-11-24T00:50:18.344-08:00</updated><title type='text'>Licensing for ActiveX Components</title><content type='html'>There are 2 types of licensing schemes for ActiveX controls.&lt;br /&gt;&lt;br /&gt;1.Design time – implemented using LIC Files.&lt;br /&gt;2.Run time – implemented using LPK (License Package File) files.&lt;br /&gt;&lt;br /&gt;If you are using licensed ActiveX control for the development purposes then you would need LIC file to load it in the development environment like Visual Studio or MS Access etc. And if you are using it in the web application then you would need LPK file to run it in the web browser like IE etc.&lt;br /&gt;&lt;br /&gt;In every ActiveX control licensing is implemented by implementing methods of IClassFactory2 interface, which is built upon IClassFactory interface. These interfaces provide methods that are used for verifying licensing information during the instantiations of the control both in the design time as well as run time. Some of the methods are: GetLicInfo, RequestLicKey, andCreateInstanceLic etc.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Design-Time Licensing:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In the design environments like Visual Studio or MS Access etc, when you try to place ActiveX control on the form or web page or create instance of the control, one or more of these methods are called to verify the licensing information from the license file (.Lic file) and upon verification the control is instantiated.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Run-Time Licensing:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Run time licensing differs for execution environments like Visual Studio or MS Access etc and Internet Explorer. In case of VS, license keys of the ActiveX controls used in the application are embedded in the executable file (.exe file) of the application whereas for Internet Explorer license keys of ActiveX control are stored in the license package file(.Lpk file).&lt;br /&gt;&lt;br /&gt;In case of Visual Studio or MS Access, run time licensing is almost same as design time licensing. During the execution of application licensing information embedded in the exe file is verified by one or more methods of IClassFactory2 interface against the licensing information stored in the controls used in the application.&lt;br /&gt;&lt;br /&gt;In case of Internet Explorer, licensing scenario is bit different specially when you are distributing ActiveX control (see my earlier post on &lt;a href=' http://sanjaysainitech.blogspot.com/2008/11/how-to-redistribute-activex-controls.html'&gt;How to redistribute ActiveX control with Web Application&lt;/a&gt;&lt;br /&gt;) due to following reasons:&lt;br /&gt;&lt;br /&gt;1.ActiveX control is executed in the remote client machine where as the host application exists in the server machine.&lt;br /&gt;2.Due to the openness of the delivered HTML source code, licensing information can not be embedded in the server response.&lt;br /&gt;&lt;br /&gt;So, due to the above scenario, run time licensing is implemented with a new file called the license package file (or LPK file). This file can be included in any HTML page by using the object tag.&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt; OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" &gt;&lt;br /&gt;    &lt; PARAM NAME="LPKPath" VALUE="LPKfilename.LPK" &gt;&lt;br /&gt;&lt; /OBJECT &gt;&lt;br /&gt;&lt;br /&gt;Note- CLASSID is the class ID of ActiveX License Manager component.&lt;br /&gt;&lt;br /&gt;The above mentioned object tag embeds ActiveX License Manager, which is a component of Internet Explorer 4.0 found in the Licmgr10.dll file. This component parses an .lpk file and extracts the license key for each corresponding CLSID in the file. Remember, this tag should be added before the codebase tag for the control distribution.&lt;br /&gt; At run time, when Internet Explorer 4.0 is rendering an HTML page that contains ActiveX Controls, the License Manager calls the IClassFactory2::CreateInstanceLic method, passing the license key that it extracted from the .lpk file in order to verify that a control is licensed. If the license key matches the control's license, the control will be rendered on the page. &lt;br /&gt;Note: - LPK file should exists at the root of the application in the hosting server. Although you can add multiple lpk files in the web page but only first one will be considered by IE. Licensing information of all the licensed controls used in a page should be added in a lpk file embedded in that page.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Create license package file (.lpk file):&lt;/strong&gt;&lt;br /&gt;LPK file can be created using a utility named License Package Authoring Tool (Lpk_Tool.exe) that can be downloaded from the download section of this blog.&lt;br /&gt;The application is actually simple to use. When you start the application, it displays a combo box that lists all of the ActiveX Controls currently running on your computer. The next step requires that you choose the controls that you want to display on a given HTML page. You choose a control by highlighting it in the combo box and then clicking the Add button. Once you've selected all the controls that you want to display on a given page, you can create and save the actual .lpk file by clicking the Save &amp; Exit button.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;http://msdn.microsoft.com/en-us/library/aa231198(VS.60).aspx&lt;br /&gt;http://msdn.microsoft.com/en-us/library/aa751973(VS.85).aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6942667021868227846?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6942667021868227846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6942667021868227846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6942667021868227846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6942667021868227846'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/11/licensing-for-activex-components.html' title='Licensing for ActiveX Components'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6730036130579073497</id><published>2008-11-18T06:13:00.000-08:00</published><updated>2008-11-18T06:17:53.012-08:00</updated><title type='text'>How to improve performance of Windows XP</title><content type='html'>Following are some tips to improve performance of your Windows XP OS.&lt;br /&gt; &lt;br /&gt;&lt;strong&gt;1&lt;/strong&gt;. Use Disk Defragmenter utility - One of the easiest ways to boost up XP's speed is defragmenting your hard drive regularly. You can find this utility in the System Tools section in Accessories.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2&lt;/strong&gt;. Use Disk Cleanup utility - Disk cleaning helps you to remove unwanted files and programs from your hard disk, which helps IO operations of Win XP. It can be used to remove temporary Internet files, remove downloaded program files, empty the Recycle Bin, remove Windows temporary files, remove optional Windows components and remove installed programs that are no longer in use.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3&lt;/strong&gt;. Stop Windows Index Service - Windows XP by default indexes files on local and network drives to speed up the file search process. However, this slows the PC performance as it indexes files continuously. So if you don't use the service regularly it is better to disable the process. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4&lt;/strong&gt;. Remove unwanted start-up program - Having too many program in the program startup list also slows down the booting process of Win Xp. Therefore remove unwanted program from the startup list by running "msconfig" utility and unselecting programs from the startup list.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5&lt;/strong&gt;. Remove unused fonts - Installing too many fonts in your machine also slows down Win XP. Delete unnecessary fonts from fonts folder in the control panel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6730036130579073497?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6730036130579073497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6730036130579073497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6730036130579073497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6730036130579073497'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/11/how-to-improve-performance-of-windows.html' title='How to improve performance of Windows XP'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-9065500625366321747</id><published>2008-11-18T06:11:00.000-08:00</published><updated>2008-11-18T06:23:50.534-08:00</updated><title type='text'>How to View Source HTML of Modal Dialog Window</title><content type='html'>Its a known functionality of the windows opened using ShowModalDialog function of javascript that you can not view html source of a modal dialog window but its a problem during the development because you might need to view html source of the window for debugging.&lt;br /&gt;Here is the simple solution of the problem...&lt;br /&gt;&lt;br /&gt;Add following javascript code in your web page.&lt;br /&gt;&lt;br /&gt;&lt; script language="javascript" &gt;&lt;br /&gt;function showHTML()&lt;br /&gt;{&lt;br /&gt;d=window.open();&lt;br /&gt;d.document.open('text/plain').write(document.documentElement.outerHTML);&lt;br /&gt;}&lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;And add following html code anywhere in the body of the web page.&lt;br /&gt;&lt;br /&gt;&lt; input type=button value="View Source" onclick="showHTML()" &gt; &lt;br /&gt;&lt;br /&gt;Now when you will browse your modal window and click on the said button, the HTML source code of the modal window will open in another window.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-9065500625366321747?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/9065500625366321747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=9065500625366321747' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/9065500625366321747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/9065500625366321747'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/11/how-to-view-source-html-of-modal-dialog.html' title='How to View Source HTML of Modal Dialog Window'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2472133983314113670</id><published>2008-11-18T06:09:00.000-08:00</published><updated>2008-11-18T06:11:37.426-08:00</updated><title type='text'>Server error : "There is no web named"</title><content type='html'>Server error : "There is no web named" .If this Web site exists on the server, check to make sure the FrontPage Server Extensions are installed, and that you have permission to access the server.&lt;br /&gt;&lt;br /&gt;Solution: There could be many reasons for this error and there are many solution/suggestions available online but in my case none of them proved helpful. I could resolve this problem just by removing the Host Header Name from my website.&lt;br /&gt;&lt;br /&gt;Steps:-&lt;br /&gt;&lt;br /&gt;1. Open Internet Information Services Console window.&lt;br /&gt;2. Right click on the website and open the website properties.&lt;br /&gt;3. Click on website tab and then click on advance button in the web Site Identification section.&lt;br /&gt;4.Now from the Advanced Multiple Web Site Configuration window, you can delete the Host Header Name associate with the IP adderss or the Default value. Remember dont delete the entry itself but edit it to remove the Header Name.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2472133983314113670?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2472133983314113670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2472133983314113670' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2472133983314113670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2472133983314113670'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/11/server-error-there-is-no-web-named.html' title='Server error : &quot;There is no web named&quot;'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-5642052701462636530</id><published>2008-11-18T06:03:00.000-08:00</published><updated>2008-11-18T06:08:51.735-08:00</updated><title type='text'>How to access HEAD tag from content page in asp.net</title><content type='html'>Sometimes we need to access head tag of master page from it content page for adding element tags like style, base ect. from its content page.&lt;br /&gt;There could be various ways to add head tag elements from content page. Here I have mentioned how to add meta,style and base tag in the header section.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1&lt;/strong&gt;. Adding META tags are quite easy.Add following C# code in the page load method of the content page.&lt;br /&gt;&lt;br /&gt;HtmlMeta metatag = new HtmlMeta();&lt;br /&gt;metatag.Name = "keywords";&lt;br /&gt;metatag.Content = "ajax";&lt;br /&gt;this.Header.Controls.Add(metatag); &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2&lt;/strong&gt;. Adding Style tag&lt;br /&gt;&lt;br /&gt;HtmlGenericControl styles = new HtmlGenericControl("style");&lt;br /&gt;styles.Attributes.Add("type", "text/css");&lt;br /&gt;styles.InnerText = "a { color: #003399; text-decoration: none;}";&lt;br /&gt;this.Header.Controls.Add(styles);&lt;br /&gt;&lt;br /&gt;it will be rendered like this:-&lt;br /&gt;&lt;br /&gt;&lt; style type="text/css" &gt; a {color: #003399;text-decoration: none;} &lt; /style &gt;&lt;br /&gt;&lt;br /&gt;OR if you have already added style tag in it, you can access in like a variable and update it. &lt;br /&gt;&lt;br /&gt;like:- &lt; style type=”text/css” runat=”server” id=”myStyles” &gt;&lt;br /&gt;&lt;br /&gt;then in the content page it can be accessed like -&lt;br /&gt;&lt;br /&gt;myStyles.InnerText += "a {color: #003399;text-decoration: none;}";&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3&lt;/strong&gt;. Adding Base tag - Add following C# code in the page load method of the content page.&lt;br /&gt;&lt;br /&gt;HtmlGenericControl Tag = new HtmlGenericControl("BASE");&lt;br /&gt;Tag.Attributes.Add("target", "_self");&lt;br /&gt;this.Header.Controls.Add(Tag);&lt;br /&gt;-----------------------------------&lt;br /&gt;Another inovative way to access and update headed section is just add asp ContentPlaceHolder  control in the Head section of your master page and then it can be access just like other ContentPlaceHolders with placing content tag in your content page for adding elements in the Header of the page.&lt;br /&gt;&lt;br /&gt;like in the Master page(PopUp.master):-&lt;br /&gt;&lt;br /&gt;&lt; head runat="server" &gt;&lt;br /&gt;&lt;br /&gt;    &lt; title &gt;&lt; /title &gt;&lt;br /&gt;&lt;br /&gt;    &lt; asp:ContentPlaceHolder runat="server" id="MyHeader" &gt;&lt;br /&gt;&lt;br /&gt;    &lt; /asp:ContentPlaceHolder &gt;&lt;br /&gt;&lt;br /&gt;&lt; /head &gt;&lt;br /&gt;&lt;br /&gt; In the content page-&lt;br /&gt;&lt;br /&gt;&lt; %@ Page Language="C#" MasterPageFile="~/Popup.master" AutoEventWireup="true"  CodeFile="popUploadFile.aspx.cs"&lt;br /&gt;    Inherits="PopUp_popUploadFile" Title="Attachments" % &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt; asp:Content ID="Content1" runat="server"  ContentPlaceHolderID="MyHeader" &gt;&lt;br /&gt;&lt;br /&gt;&lt; style type="text/css" &gt; a {color: #003399;text-decoration: none;} &lt; /style &gt;&lt;br /&gt;&lt;br /&gt;&lt; /style &gt;&lt;br /&gt;&lt;br /&gt;&lt; /asp:Content &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-5642052701462636530?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/5642052701462636530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=5642052701462636530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5642052701462636530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5642052701462636530'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/11/how-to-access-head-tag-from-content.html' title='How to access HEAD tag from content page in asp.net'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3553829928075077597</id><published>2008-11-18T06:01:00.000-08:00</published><updated>2008-11-18T06:03:05.102-08:00</updated><title type='text'>How to redistribute ActiveX controls with Web Application</title><content type='html'>If your website using ActiveX control then it needs to be installed on the client machine to use the functionality your website is providing through this control. Generally when such functionality is browsed by the client, web browser prompts the user for the installation of ActiveX control if it does not exists on the client machine.&lt;br /&gt;(note - the above discussed behavior is subjected to the web browser settings)&lt;br /&gt;&lt;br /&gt;The standard way to redistribute ActiveX controls through web pages is to package the ActiveX control and every other required file into a CAB file. The CAB file should be published on a web site and the CODEBASE parameter of the OBJECT HTML tag must be used to specify the location from where the ActiveX control and the dependent files can be downloaded.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt; object id="ctrl" width=472 height=327 classid="CLSID:19B50C95-6BB5-4DFD-B20C-5B9A61FA1C0D" CODEBASE="http://www.website.com/redistribution/ctrl.cab" &gt;&lt;br /&gt;&lt; /object &gt; &lt;br /&gt;&lt;br /&gt;Microsoft IE versions 3.0 and later use the CODEBASE attribute of object HTML tag to detect which version of ActiveX Control is installed on a user's computer and download &amp; install the newer version of ActiveX control from the location specified by CODEBASE onto the user's machine if user is using older version.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt; object id="ctrl" width=472 height=327 classid="CLSID:19B50C95-6BB5-4DFD-B20C-5B9A61FA1C0D" CODEBASE="http://www.website.com/redistribution/ctrl.cab#version=9,0,115,0" &gt;&lt;br /&gt;&lt; /object &gt;&lt;br /&gt;&lt;br /&gt;The numbers '9,0,115,0' specify which version of the ActiveX control is required to use web functionality it provides.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3553829928075077597?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3553829928075077597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3553829928075077597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3553829928075077597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3553829928075077597'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/11/how-to-redistribute-activex-controls.html' title='How to redistribute ActiveX controls with Web Application'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8037991391005700030</id><published>2008-11-03T06:28:00.000-08:00</published><updated>2008-11-03T06:38:56.996-08:00</updated><title type='text'>URL Rewriting error : is not a valid virtual path</title><content type='html'>Sometimes this error occurs when you are doing some url rewriting with RewritePath method. One of the many possible reasons for this error is that assigning complete url path as a internal rewrite path. Therefore pass relative rewrite url path as a parameter  to the  RewritePath function instead of complete url.&lt;br /&gt;For example, in the below given code, statement 1 will produce error where as statement 2 will work fine.&lt;br /&gt;&lt;br /&gt;1. HttpContext.Current.RewritePath("http://localhost/TestSite/default.aspx"); &lt;br /&gt;&lt;br /&gt;2. HttpContext.Current.RewritePath("/TestSite/default.aspx");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8037991391005700030?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8037991391005700030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8037991391005700030' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8037991391005700030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8037991391005700030'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/11/url-rewriting-error-is-not-valid.html' title='URL Rewriting error : is not a valid virtual path'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-770656531813739078</id><published>2008-10-30T03:32:00.000-07:00</published><updated>2008-10-30T03:34:25.275-07:00</updated><title type='text'>What is ASP.NET Development Server?</title><content type='html'>In VS 2005, file system websites are hosted on the new local web server called” ASP.NET Development Server” by default instead of IIS. This server dynamically chooses the port and hosts the website for local requests only. As a part of Framework 2.0 WebDev.WebServer.exe program runs as development server and host the website whenever website is run in the VS.&lt;br /&gt;Now IIS does not installed along with WinXP or Win2003 like previous versions of Windows, you needs to install it separately therefore if you are developing websites using VS 2005, you don’t have to worry about the web server to host your website as asp.net development server will take care of it.&lt;br /&gt;This program is found at (%WINDIR%\Microsoft.NET\Framework\v2.0.XXXXX) location.&lt;br /&gt;You can also host website manually using this program.&lt;br /&gt;&lt;br /&gt;Syntax: WebDev.WebServer.exe [/port:&lt;port number&gt;] /path:&lt;physical path&gt; [/vpath:&lt;virtual path&gt;]&lt;br /&gt;&lt;br /&gt;Like: webdev.webserver.exe /port:4955 /path:"c:\RnD\WebSite1"  /vpath:”/WebSite1”&lt;br /&gt;&lt;br /&gt;Here you can assign any port no you want.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Difference between ASP.NET Development Server and IIS Server&lt;/strong&gt;&lt;br /&gt;Below are some notable differences:&lt;br /&gt;&lt;br /&gt;•Development server only accepts authenticated requests on the local computer as it runs under the security context of currently authenticated user account. It means it doesn’t run under less privileged ASPNET account. Where as IIS by default runs under ASPNET account.&lt;br /&gt;•Unlike IIS, Development server can only serve local requests. It will not serve pages to another computer.&lt;br /&gt;•Unlike IIS, Development server can only serve resources like files that are within the application scope.&lt;br /&gt;•IIS provides other services like SMTP, FTP etc. that development server does not provides so if your application has e-mail sending functionality or file download functionality, you would have to use IIS server.&lt;br /&gt;&lt;br /&gt;Reference: http://msdn.microsoft.com/en-us/library/58wxa9w5(VS.80).aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-770656531813739078?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/770656531813739078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=770656531813739078' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/770656531813739078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/770656531813739078'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/10/what-is-aspnet-development-server.html' title='What is ASP.NET Development Server?'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-901377662622708823</id><published>2008-10-28T20:45:00.000-07:00</published><updated>2008-10-28T20:49:08.733-07:00</updated><title type='text'>Website Logging  and AWStats Tool</title><content type='html'>Analysis of a website is very important if you want to optimize the performance of the website. The informations like from where most of the web traffic is coming or who is eating up your sites bandwidth are very handy for improving your websites performance. These informations are logged by the web servers that can be processed by some tools like AWStats, Analog, Webalizer etc... into some graphical charts for easy analysis.&lt;br /&gt;Web logging is by default enabled in IIS5.1 web server and the data is stored in the &lt;br /&gt;C:\WINDOWS\system32\LogFiles\W3SVC1 location in the form of text files with the name format like exyymmdd.log, here yy- year, mm-month and dd-day.&lt;br /&gt;By default some selected properties are logged so you can customize the logging information to your requirement.For that - &lt;br /&gt;Open the website properties window and click on the properties button in the enable logging section. Extented logging properties window will open. Here check &amp; uncheck the properties you want to log like you you want to measure bandwidth comsumption of your site, check Bytes Sent option or if you want to know who is sending most of the traffic , check Referer option.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AWStats Tool&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This is the tool to analyse this web logging  information and show it with graphics chart.This tool is free for use. &lt;br /&gt;Check out below link for more information on this tool.&lt;br /&gt;&lt;br /&gt;http://awstats.sourceforge.net/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-901377662622708823?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/901377662622708823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=901377662622708823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/901377662622708823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/901377662622708823'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/10/website-logging-and-awstats-tool.html' title='Website Logging  and AWStats Tool'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-424750371295885444</id><published>2008-10-15T02:25:00.000-07:00</published><updated>2008-10-15T02:43:11.355-07:00</updated><title type='text'>Uploading Multiple Files in ASP.NET</title><content type='html'>In this post I have given code for uploading multiple files using client callback.&lt;br /&gt;Here I will not explain client callback as I have published a dedicated post on it.&lt;br /&gt;&lt;br /&gt;Now, this multiple files upload functionality has 4 parts:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1&lt;/strong&gt;. Selecting multiple files functionality and Upload button functionality that will request the client callback in FileUpload.aspx page .&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2&lt;/strong&gt;. Implementing ICallbackHandler interface by defining GetCallbackResult and RaiseCallbackEvent methods in the FileUpload.aspx.cs file. RaiseCallbackEvent methods will call UploadFile method of WebClient class, which posts the file to the given url(in our case it is fileserver.aspx).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3&lt;/strong&gt;. Saving functionality for uploaded file on the server in Fileserver.aspx file.&lt;br /&gt;&lt;br /&gt;Here is the sample code. &lt;br /&gt;&lt;br /&gt;I have not explained it in details as it is self explainatory yet I have commented code as and when required.&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;&lt;strong&gt;File - FileUpload.aspx &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt; script language="javascript" type="text/javascript"&gt;&lt;br /&gt;var selectedFiles = '';&lt;br /&gt;&lt;br /&gt;function CallbackResultHandler(result, context) //this function will receive the callback result&lt;br /&gt;{&lt;br /&gt;   alert(result);  &lt;br /&gt;}&lt;br /&gt;// below function will receive callback resulted appended with error msg when server throws an error&lt;br /&gt;function CallbackErrorHandler(result, context)&lt;br /&gt;{&lt;br /&gt;    alert("Error: " + result);&lt;br /&gt;}&lt;br /&gt;function uploadFile() // this function will trigger the callback&lt;br /&gt;{&lt;br /&gt;    var fileList = document.getElementById("divUploadFile").getElementsByTagName("INPUT"); &lt;br /&gt;    for(i=0; i &lt; fileList.length;i++) &lt;br /&gt;    {&lt;br /&gt;        selectedFiles +=  fileList[i].value + "|";&lt;br /&gt;    }&lt;br /&gt;    &lt; %=_callbackRef % &gt;  // here callback method - WebForm_doCallback will be rendered.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function attachFile() &lt;br /&gt;{&lt;br /&gt;    var varTag1 = document.createElement("INPUT");  &lt;br /&gt;    varTag1.type = "file"; &lt;br /&gt;    var varTag2 = document.createElement("&lt; BR &gt;"); &lt;br /&gt;    document.getElementById("divUploadFile").appendChild(varTag1); &lt;br /&gt;    document.getElementById("divUploadFile").appendChild(varTag2); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;&lt; html xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;br /&gt;&lt; head runat="server"&gt;&lt;br /&gt;    &lt; title &gt;File Upload Page&lt; /title &gt;&lt;br /&gt;&lt; /head &gt;&lt;br /&gt;&lt; body &gt;&lt;br /&gt;    &lt; form id="form1" runat="server" &gt;&lt;br /&gt;    &lt; div &gt;&lt;br /&gt;    &lt; table &gt;&lt;br /&gt;    &lt; tr &gt;&lt;br /&gt;    &lt; td colspan="2"&gt;&lt;br /&gt;    &lt; ol &gt;&lt;br /&gt;    &lt; li style="list-style: none"&gt;&lt;br /&gt;    &lt; div id="divUploadFile" / &gt;&lt;br /&gt;    &lt; /li &gt;&lt;br /&gt;    &lt; /ol &gt;&lt;br /&gt;    &lt; /td &gt;&lt;br /&gt;    &lt; /tr &gt;&lt;br /&gt;    &lt; tr &gt;&lt;br /&gt;    &lt; td &gt;&lt;br /&gt;    &lt; a href="#" onclick="attachFile()"&gt;Attach a file&lt; /a &gt;&lt;br /&gt;    &lt; /td &gt;&lt;br /&gt;    &lt; td &gt;&lt;br /&gt;    &lt; input type="button" value="Upload" onclick="uploadFile()" / &gt;&lt;br /&gt;    &lt; /td &gt;&lt;br /&gt;    &lt; /tr &gt;&lt;br /&gt;    &lt; /table &gt;&lt;br /&gt;    &lt; /div &gt;&lt;br /&gt;    &lt; /form &gt;&lt;br /&gt;&lt; /body &gt;&lt;br /&gt;&lt; /html &gt;&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;&lt;strong&gt;File - FileUpload.aspx.cs&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;public partial class FileUpload : System.Web.UI.Page, ICallbackEventHandler&lt;br /&gt;{&lt;br /&gt;    string _result = string.Empty;&lt;br /&gt;    protected string _callbackRef = string.Empty;&lt;br /&gt;&lt;br /&gt;    protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        //following code returns the javascript call to WebForm_doCallback function&lt;br /&gt;        _callbackRef = ClientScript.GetCallbackEventReference(this, "selectedFiles", "CallbackResultHandler","null", "CallbackErrorHandler", true);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    #region ICallbackEventHandler Members &lt;br /&gt;&lt;br /&gt;    public string GetCallbackResult() //returnd the callback result&lt;br /&gt;    {&lt;br /&gt;        return _result;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void RaiseCallbackEvent(string eventArgument) // invokes callback event&lt;br /&gt;    {&lt;br /&gt;        string[] Files = (eventArgument.TrimEnd('|')).Split('|');&lt;br /&gt;        System.Net.WebClient Client = new System.Net.WebClient();&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            string Url = "http://localhost:" + Request.Url.Port.ToString() + &lt;br /&gt;"/FileUploadWebsite/FileServer.aspx";&lt;br /&gt;            foreach (string file in Files)&lt;br /&gt;            {&lt;br /&gt;                Client.UploadFile(Url, "POST", file);&lt;br /&gt;            }&lt;br /&gt;            _result = "All files are uploaded successfully.";&lt;br /&gt;        }&lt;br /&gt;        catch (System.Net.WebException ex)&lt;br /&gt;        {&lt;br /&gt;            _result = "One or more file(s) could not be uploaded.";&lt;br /&gt;            throw ex;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    #endregion&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------&lt;br /&gt;&lt;strong&gt;File - Fileserver.aspx&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt; script runat="server" &gt;&lt;br /&gt;    void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        string Uploadpath = @"C:\TestWeb\UploadedFiles\"; // ASPNET account should have read/write permission on the folder&lt;br /&gt;&lt;br /&gt;        string[] Keys = Request.Files.AllKeys;&lt;br /&gt;        foreach (String key in Keys)&lt;br /&gt;        {&lt;br /&gt;            HttpPostedFile File = Request.Files[key];&lt;br /&gt;            File.SaveAs(Uploadpath + File.FileName);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;&lt; html xmlns="http://www.w3.org/1999/xhtml" &gt;&lt;br /&gt;&lt; head runat="server" &gt;&lt;br /&gt;    &lt; title &gt;File Server Page&lt; /title &gt;&lt;br /&gt;&lt; /head &gt;&lt;br /&gt;&lt; body &gt;&lt;br /&gt;    &lt; form id="form1" runat="server"&gt;&lt;br /&gt;    &lt; div &gt;&lt;br /&gt;    &lt;br /&gt;    &lt; /div &gt;&lt;br /&gt;    &lt; /form &gt;&lt;br /&gt;&lt; /body &gt;&lt;br /&gt;&lt; /html &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-424750371295885444?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/424750371295885444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=424750371295885444' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/424750371295885444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/424750371295885444'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/10/uploading-multiple-files-in-aspnet.html' title='Uploading Multiple Files in ASP.NET'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6795825161314416516</id><published>2008-10-15T02:17:00.000-07:00</published><updated>2008-10-15T02:24:58.173-07:00</updated><title type='text'>Script Callback in ASP.NET</title><content type='html'>In very simple term script callback is a machanims of calling server side code from client side(using javascript) without rendering the web page. In other term posting web page asynchronously. In the heart of it, is XmlHttpRequest DOM object. During a normal page postback(synchronous), the Web page and controls are recreated and a new version of the entire Web page is rendered on the client. Where as in the client callback browser create new connection using XmlHttpRequest to send only the callback data to the remote server not the content of entire page making the page lifecycle short(page rendering event does not occur).&lt;br /&gt;&lt;br /&gt;The ASP.NET 2.0 implementation of client callbacks uses the Client Callback Manager.  After initial page load, subsequent requests to server-side code are made by a client-side component, without refreshing the entire Web page.  The page runs a modified version of its normal life cycle where the page is initiated and loaded, but the page contents are not rendered.   Instead, a special method in the server-side code is invoked, which processes the callback request content, then returns a value to the browser that can be read by JavaScript function.  The JavaScript function uses technology inherent to the browser (e.g. DOM, DHTML) to update Web page content dynamically.  The Web page continues to stay live while the request is being processed.&lt;br /&gt;&lt;br /&gt;The Page.IsPostback property will return true for both request types(normal postback &amp; client callback).  The Page. But IsCallback property will return true only when the request is a client callback.&lt;br /&gt;&lt;br /&gt;Page LifeCycle in case of Client Callback:&lt;br /&gt;&lt;br /&gt;Init-&gt; LoadState-&gt; ProcessPostbackData-&gt; Load-&gt; ChangeEvent-&gt; RaiseCallbackEvent-&gt; GetCallbackResult -&gt; Unload&lt;br /&gt;&lt;br /&gt;Note-: PostBack , PreRender, Render and SaveState events are skiped.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Implementing Client Callback:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Following are the steps:-&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1&lt;/strong&gt;. Write a javascript function that will request the callback by calling WebForm_DoCallback function.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2&lt;/strong&gt;. Write another javascript function(Callbackhandler) that will receive the callback and do the needful client side processing.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3&lt;/strong&gt;. Call the GetCallbackEventReference method in the Page_Load event.&lt;br /&gt;&lt;br /&gt;This method creates a JavaScript string containing code for calling WebForm_DoCallback function in the client Web page to start the callback.&lt;br /&gt;&lt;br /&gt;like :WebForm_DoCallback('__Page', message, processMyResult, context, postMyError, true) &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; GetCallbackEventReference(control, argument, clientCallback, context, clientErrorCallback, useAsync);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;control &lt;/strong&gt;- The control or the page which implements ICallbackEventHandler.&lt;br /&gt;&lt;strong&gt;argument &lt;/strong&gt;- data that needs to be processed by the asynchronous call.&lt;br /&gt;&lt;strong&gt;clientCallback &lt;/strong&gt;- javascript function(Callbackhandler) that will receive the result.&lt;br /&gt;&lt;strong&gt;context &lt;/strong&gt;- Name of a client-side JavaScript variable. Usually used to determine the content of the message (argument) in the callback request. The value of the variable will be stored on the client as the context parameter associated with a callback.&lt;br /&gt;&lt;strong&gt;clientErrorCallback &lt;/strong&gt;- javascript function that will receive the result when server throws an error.&lt;br /&gt;&lt;strong&gt;useAsync &lt;/strong&gt;- boolean value to determine if the call is async or not.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4&lt;/strong&gt;. Implement the System.Web.UI.ICallbackEventHandler interface by defining its 2 methods- RaiseCallbackEvent and GetCallbackResult.&lt;br /&gt;&lt;br /&gt;Here is the code sample:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;File - syncCallback.aspx&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt; script language="javascript"&gt;&lt;br /&gt;    function CallbackHandler(result, context) //Step 2&lt;br /&gt;    { &lt;br /&gt;        alert(result);&lt;br /&gt;    }&lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;&lt; html xmlns="http://www.w3.org/1999/xhtml" &gt;&lt;br /&gt;&lt; head runat="server" &gt;&lt;br /&gt;    &lt; title &gt;Client Callback Demo&lt; /title &gt;&lt;br /&gt;&lt; /head &gt;&lt;br /&gt;&lt; body &gt;&lt;br /&gt; &lt; form id="form1" runat="server" &gt;&lt;br /&gt; &lt; div &gt;&lt;br /&gt; Name :&lt; input id="txtName" type="text" /&gt;&lt;br /&gt; &lt; input id="btnClient" type="button" value="Asyn Callback" runat="server" / &gt;&lt;br /&gt; &lt; /div &gt;&lt;br /&gt; &lt; /form &gt;&lt;br /&gt;&lt; /body &gt;&lt;br /&gt;&lt; /html &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;File - syncCallback.aspx.cs&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;public partial class syncCallback : System.Web.UI.Page, ICallbackEventHandler&lt;br /&gt;{&lt;br /&gt;    protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        string CallbackRef = ClientScript.GetCallbackEventReference(this,"document.all['txtName'].value","CallbackHandler", "null",true); &lt;br /&gt;//Step 3 will generate following string&lt;br /&gt;&lt;br /&gt;// WebForm_DoCallback('__Page',document.all['txtName'].value,CallbackHandler,null,null,true)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; btnClient.Attributes["onclick"] = String.Format("javascript:{0}",CallbackRef); //Step 1&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    #region ICallbackEventHandler Members&lt;br /&gt;    string _str;&lt;br /&gt;&lt;br /&gt;    public string GetCallbackResult() //Step 4&lt;br /&gt;    {&lt;br /&gt;        return _str;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void RaiseCallbackEvent(string eventArgument) //Step 4&lt;br /&gt;    {&lt;br /&gt;        _str = "Hello " + eventArgument;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    #endregion&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6795825161314416516?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6795825161314416516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6795825161314416516' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6795825161314416516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6795825161314416516'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/10/script-callback-in-aspnet.html' title='Script Callback in ASP.NET'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4945302549535007043</id><published>2008-08-21T00:38:00.000-07:00</published><updated>2008-08-21T00:40:12.419-07:00</updated><title type='text'>Error: Automation server can'nt create object</title><content type='html'>If you are getting error "Automation server can'nt create object" while creating activeX object.like:&lt;br /&gt;&lt;br /&gt;var shell = new ActiveXObject("wscript.shell");&lt;br /&gt;&lt;br /&gt;It could be due to security settings of your web browser. So to fix this error choose Internet Options from Tools menue and go to Security tab, now choose internet zone and click on Custom level...button. Now, in the security settings window go to "ActiveX controls and Plug-ins" section and enable "Initialize and script ActiveX controls not marked as safe for scripting" and "Run ActiveX controls and plug-ins" options. Enable same options for Local intranet zone also. &lt;br /&gt;&lt;br /&gt;Now you should be able to create wscript.shell object.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4945302549535007043?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4945302549535007043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4945302549535007043' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4945302549535007043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4945302549535007043'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/08/error-automation-server-cannt-create.html' title='Error: Automation server can&apos;nt create object'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-437631274484105193</id><published>2008-08-21T00:35:00.000-07:00</published><updated>2008-08-21T00:37:31.039-07:00</updated><title type='text'>How to create ASPNET Account</title><content type='html'>The aspnet_wp or ASP.NET Machine Account(ASPNET) is created when the Microsoft .Net Framework 1.1 is installed onto a Windows XP computer. And a registry key is created at following location:&lt;br /&gt;&lt;br /&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList&lt;br /&gt;&lt;br /&gt;You can aslo create it manually by creating a new key of DWORD called ASPNET and give it value 0 type Hexadec. under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows &lt;br /&gt;NT\CurrentVersion\Winlogon\SpecialAccounts\UserList.&lt;br /&gt;&lt;br /&gt;It can also be created by issuing the following command from the run dialog (changing the framework version number as appropriate):&lt;br /&gt;%systemroot%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i&lt;br /&gt; &lt;br /&gt;Although you can delete this account but than your asp.net applications may not function properly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-437631274484105193?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/437631274484105193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=437631274484105193' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/437631274484105193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/437631274484105193'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/08/how-to-create-aspnet-account.html' title='How to create ASPNET Account'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2009410766437018035</id><published>2008-08-21T00:32:00.000-07:00</published><updated>2008-08-21T00:35:15.190-07:00</updated><title type='text'>Error : Could not load file or assembly or one of its dependencies. Access is denied.</title><content type='html'>In case of web application if this error occurs, it means ASPNET account(for WindowsXP machine) or NETWORK SERVICE account (for Vista and Windows 2003 machine), does not have reqiured permissions(read/write) on the "%systemroot%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" folder.These are less privileged accounts used by web server to process the web request.&lt;br /&gt;Actually aspnet_wp.exe worker process in IIS5 runs under ASPNET account to provide security against potential hacking.&lt;br /&gt;&lt;br /&gt;It is shown in the user account list also whereas NETWORK SERVICE does not show up in it but rather is shown in the Security tab of the resources (like a folder) as a User Name like ASPNET that can be assigned permissoins. For that you need to do following steps:&lt;br /&gt;&lt;br /&gt;1. right click on the folder, then&lt;br /&gt;2. click on "Sharing and Security", then&lt;br /&gt;3. click on "Security"&lt;br /&gt;4. click on the "Add" button&lt;br /&gt;5. click on "Advanced"&lt;br /&gt;6. click on "Find Now"&lt;br /&gt;7. Scroll down until you find "NETWORK SERVICE"&lt;br /&gt;&lt;br /&gt;So follow above given steps go give permission(read/write) to ASPNET or NETWORK SERVICE account depending upon your OS on "%systemroot%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" folder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2009410766437018035?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2009410766437018035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2009410766437018035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2009410766437018035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2009410766437018035'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/08/error-could-not-load-file-or-assembly.html' title='Error : Could not load file or assembly or one of its dependencies. Access is denied.'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4280988916307106360</id><published>2008-08-10T21:00:00.000-07:00</published><updated>2008-08-10T21:01:42.055-07:00</updated><title type='text'>Error:  "Access is Denied" during USB Driver Installation</title><content type='html'>First of all, make sure you are logged in with administrator account and have full permission on your machine. If you are still facing same problem then most probably the USBSTOR registry key has denied access to SYSTEM account.&lt;br /&gt;So to give permission to USBSTOR registery key, open the regisrty editor and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR&lt;br /&gt;now right click on USBSTOR and choose permission from the shortcut menu, now check the SYSTEM account from the list for full permission also make sure that your user account has full permission, uncheck the deny checkbox if any and apply the changes.&lt;br /&gt;&lt;br /&gt;Now you should be able to install the USB mass storage device driver.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4280988916307106360?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4280988916307106360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4280988916307106360' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4280988916307106360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4280988916307106360'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/08/error-access-is-denied-during-usb.html' title='Error:  &quot;Access is Denied&quot; during USB Driver Installation'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6596569717710261805</id><published>2008-07-08T03:20:00.000-07:00</published><updated>2008-07-08T03:23:05.245-07:00</updated><title type='text'>$get &amp; $find functions in Javascript</title><content type='html'>These functions are defined in the  ASP.NET AJAX client side library, there for you can use them only if you have included ScriptManager control of the ASP.NET AJAX.&lt;br /&gt;&lt;br /&gt;$get - This function is equivelant of "document.getElementById" and "element.getElementById" functions. It points to  "Sys.UI.DomElement.getElementById" JavaScript function which is defined as part of the ASP.NET AJAX client side library.&lt;br /&gt;&lt;br /&gt;Syntax - var obj = $get(id,element); &lt;br /&gt;&lt;br /&gt;element - optional (parent element to search, default is document element)&lt;br /&gt;&lt;br /&gt;$find - Used to find component by its id. Generally used for fetching behavior of extender control.&lt;br /&gt;&lt;br /&gt;Syntax - var obj = $find(id,parent) &lt;br /&gt;&lt;br /&gt;parent - optional (parent element to search)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reference - http://mattberseth.com/blog/2007/08/the_everuseful_get_and_find_as.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6596569717710261805?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6596569717710261805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6596569717710261805' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6596569717710261805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6596569717710261805'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/07/get-find-functions-in-javascript.html' title='$get &amp; $find functions in Javascript'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-5433313709131333361</id><published>2008-06-27T01:20:00.000-07:00</published><updated>2008-06-27T01:22:54.210-07:00</updated><title type='text'>How can I stop and start window services from the command line?</title><content type='html'>Following commands can be used for start/sopt/list services from the command line &lt;br /&gt;&lt;br /&gt;on Windows 2000/XP.&lt;br /&gt;&lt;br /&gt;1. net start - list all running services&lt;br /&gt;&lt;br /&gt;2. net stop - list all stopped services&lt;br /&gt;&lt;br /&gt;3. net start "service name" - to start the service&lt;br /&gt;&lt;br /&gt;4. net stop "service name" - to stop the service&lt;br /&gt;&lt;br /&gt;5. sclist /R - list all running services on Windowa NT&lt;br /&gt;&lt;br /&gt;6. sclist /S - list all stopped services on Windowa NT&lt;br /&gt;&lt;br /&gt;7. NETSVC \\&lt; servername &gt; &lt; command &gt; &lt; servicename &gt;  - for manage service remotely&lt;br /&gt;&lt;br /&gt;&lt; command &gt; : &lt;br /&gt;&lt;br /&gt;        /list     Lists installed services. Omit servicename with this command. &lt;br /&gt;        /query    Query the status of a service. &lt;br /&gt;        /start    Start the specified service. &lt;br /&gt;        /stop     Stop the specified service. &lt;br /&gt;        /pause    Pause the specified service. &lt;br /&gt;        /continue Restart a paused service.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-5433313709131333361?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/5433313709131333361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=5433313709131333361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5433313709131333361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5433313709131333361'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/06/how-can-i-stop-and-start-window.html' title='How can I stop and start window services from the command line?'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6317124771600059103</id><published>2008-06-24T01:59:00.000-07:00</published><updated>2008-06-24T02:00:29.769-07:00</updated><title type='text'>ACA.NET</title><content type='html'>Avanade Connected Architectures for .NET (or ACA.NET) – is set of tools that complement Visual Studio .NET by providing a framework upon which developers can more quickly build XML-based Web services and applications. Built entirely on the Microsoft .NET platform, ACA.NET is a set of pre-configured software development components and features including database portability, robust event logging, and integrated security management. ACA.NET also provides a powerful event-driven development model to create applications with true separation of business and presentation logic enabling companies to easily support many different platforms.&lt;br /&gt;All of these features are coordinated through a utility called the ACA.NET Configuration Manager tool integrated in Microsoft® Visual Studio.NET. Architects use the tool to graphically depict the application process model and generate the code that defines the structure of the application. Developers add application business logic to the generated code using the ACA.NET components and on-line help embedded in Microsoft® Visual Studio.NET.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6317124771600059103?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6317124771600059103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6317124771600059103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6317124771600059103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6317124771600059103'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/06/acanet.html' title='ACA.NET'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8200295645303648450</id><published>2008-06-23T19:17:00.000-07:00</published><updated>2008-06-23T19:28:26.404-07:00</updated><title type='text'>What is Citrix server?</title><content type='html'>Citrix MetaFrame Presentation Server is a technology that can allow remote users to connect to applications that are actually installed on a remote computer. It uses a mix of technology that results in that remote application looking and behaving just as though it was installed on the local machine.&lt;br /&gt;&lt;br /&gt;It’s a server solution that uses Microsoft Terminal Services software to deliver Windows applications to PCs, Apple Macintosh computers, X terminals and UNIX workstations. This enables users of those systems to access and use those programs which are available to those using the Windows operating system. Citrix servers use two technologies; WinFrame and Independent Computing Architecture (ICA).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ICA&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;Short for Independent Computing Architecture, ICA is a protocol designed specifically for transmitting Windows graphical display data as well as keyboard and mouse input over a network. ICA is one of two technologies used by Citrix servers, the other being WinFrame.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;WinFrame&lt;/strong&gt;&lt;br /&gt;  &lt;br /&gt;A technology developed by Citrix Systems that turns Windows NT into a multi-user operating system. Together with another Citrix technology called ICA, WinFrame enables a Windows NT server to function like a minicomputer. The result is that network users on non-Windows machines (e.g., Macintoshes, DOS systems, and UNIX machines) can run Windows applications. The actual applications are executed on the WinFrame Application Server; the client machines are just terminals, used only for entering user input and displaying application output. &lt;br /&gt;The ICA protocol is responsible for sending input and output between the client machines and the WinFrame server. Conceptually, the protocol is similar to X-Window, which serves the same purpose for UNIX systems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8200295645303648450?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8200295645303648450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8200295645303648450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8200295645303648450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8200295645303648450'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/06/what-is-citrix-server.html' title='What is Citrix server?'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-361937852567566593</id><published>2008-06-17T19:57:00.000-07:00</published><updated>2008-06-17T19:58:42.287-07:00</updated><title type='text'>How to create web project in VS 2005</title><content type='html'>Unlike web project in VS 2003, website model of VS 2005 does not generate single assembily therefore migrating a web application developed in VS 2003 into website in VS 2005 creates challenge for the developers and some times does not fit into the existing requirement. So after getting feedback from the developer community around the world Microsoft introduced an add-in called "Visual Studio 2005 Web Application Projects" to overcome this problem.&lt;br /&gt;&lt;br /&gt;Visual Studio 2005 Web Application Projects adds new project template called "web" under the project types in the New Project window. Now you can use this web project to create or migrate web application developed using VS 2003 in the VS 2005. &lt;br /&gt;&lt;br /&gt;The add-in is available in the download section of my blog.&lt;br /&gt;&lt;br /&gt;Note:- Before installing this add-in you need to install a patch called "Microsoft Visual Studio 2005 – Update to Support Web Application Projects" that is also available  in the download section.&lt;br /&gt;&lt;br /&gt;for more information click &lt;a href='http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx'&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-361937852567566593?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/361937852567566593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=361937852567566593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/361937852567566593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/361937852567566593'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/06/how-to-create-web-project-in-vs-2005.html' title='How to create web project in VS 2005'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3045277192577940018</id><published>2008-05-09T01:34:00.000-07:00</published><updated>2008-05-14T20:05:17.957-07:00</updated><title type='text'>Configuring Linked Servers in SQL Server</title><content type='html'>In the sql server to run distributed query, you have to configure linked server.&lt;br /&gt;&lt;br /&gt;Basically linked server configuration allows Sql Sevrer to execute commands against OLE DB data sources on different servers. Through linked server you can access Remote server,issue distributed queries, updates, commands, and transactions on heterogeneous data sources across the enterprise.The ability to query diverse data sources similarly. &lt;br /&gt;&lt;br /&gt;You can create or delete a linked server definition with stored procedures or through SQL Server Enterprise Manager. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using SQL Server Enterprise Manager: &lt;/strong&gt;&lt;br /&gt;Open SQL Server Enterprise Manager application, expand the object tree under the connected sql server for that linked server is created, expand the Server Object nod and than right click on Linked Server nod and choose new linked server option from the shortcut menu and follow the steps.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using SPs:&lt;/strong&gt; following list of Sps are used for managing linked servers.&lt;br /&gt;&lt;br /&gt;1. sp_linkedservers - Shows information of all the linked servers.&lt;br /&gt;2. sp_addlinkedserver - used for creating linked server.&lt;br /&gt;&lt;br /&gt;Like: &lt;br /&gt;&lt;br /&gt;USE master;&lt;br /&gt;GO&lt;br /&gt;EXEC sp_addlinkedserver &lt;br /&gt;   'Server Name',&lt;br /&gt;   N'SQL Server'&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;3. sp_addlinkedsrvlogin - Creates or updates a mapping between logins on the local instance of SQL Server and remote logins on the linked server.&lt;br /&gt;&lt;br /&gt;LIke:&lt;br /&gt;&lt;br /&gt;EXEC sp_addlinkedsrvlogin 'AccountsServer', 'false', 'Domain\username', 'Username', 'password'&lt;br /&gt;&lt;br /&gt;Let me give you complete example:&lt;br /&gt;&lt;br /&gt;Suppose I want to connect to a database 'RnD' on the sql server 'HEX_SANJAY\HEXSANJAY' with the username 'sa' and password 'kkak'.&lt;br /&gt;Execute the following code with your values for all the above mentioned settings to setup linked server.&lt;br /&gt;&lt;br /&gt;USE [master]&lt;br /&gt;GO&lt;br /&gt;EXEC master.dbo.sp_addlinkedserver @server = N'HEXSANJAY',&lt;br /&gt;@srvproduct=N'SQL',&lt;br /&gt;@provider=N'SQLNCLI', &lt;br /&gt;@datasrc=N'HEX_SANJAY\HEXSANJAY', &lt;br /&gt;@catalog=N'RnD'&lt;br /&gt;GO&lt;br /&gt;EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'HEXSANJAY',&lt;br /&gt;@locallogin = NULL , &lt;br /&gt;@useself = N'False', &lt;br /&gt;@rmtuser = N'sa', &lt;br /&gt;@rmtpassword = N'kkak'&lt;br /&gt;GO&lt;br /&gt;EXEC master.dbo.sp_serveroption @server=N'HEXSANJAY', @optname=N'rpc', @optvalue=N'true'&lt;br /&gt;GO&lt;br /&gt;EXEC master.dbo.sp_serveroption @server=N'HEXSANJAY', @optname=N'rpc out', @optvalue=N'true'&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. sp_dropserver - Removes a server from the list of known remote and linked servers on the local instance of SQL Server.&lt;br /&gt;&lt;br /&gt;Like : sp_dropserver 'ACCOUNTSSERVER', 'droplogins';&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3045277192577940018?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3045277192577940018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3045277192577940018' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3045277192577940018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3045277192577940018'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/05/configuring-linked-servers-in-sql.html' title='Configuring Linked Servers in SQL Server'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1395033252236921459</id><published>2008-05-09T01:12:00.000-07:00</published><updated>2008-05-09T01:19:29.256-07:00</updated><title type='text'>An error has occurred while establishing a connection to the server.</title><content type='html'>Lots of people come across with the following error:&lt;br /&gt;&lt;br /&gt;&lt;font color='red'&gt;"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.".&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The reason for this error is that by default SQL Server allows only local client connection.  So to enable it for remote connection you can use SQL Server 2005 Surface Area Configuration application.&lt;br /&gt;&lt;br /&gt;Here are the steps:&lt;br /&gt;&lt;br /&gt;1. Open SQL Server 2005 Surface Area Configuration.&lt;br /&gt;2. Click on Surface Area Configuration for Services and Connections link.&lt;br /&gt;3. Expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply. &lt;br /&gt;&lt;br /&gt;You will get a message, click on ok and restart the Database Engin service.&lt;br /&gt;&lt;br /&gt;Thats it....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1395033252236921459?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1395033252236921459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1395033252236921459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1395033252236921459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1395033252236921459'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/05/error-has-occurred-while-establishing.html' title='An error has occurred while establishing a connection to the server.'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3048407080390642890</id><published>2008-04-22T23:29:00.000-07:00</published><updated>2008-04-22T23:31:47.293-07:00</updated><title type='text'>Custom Paging in SQL Server</title><content type='html'>Brfore discussing custom paging, lets discusse how default paging works. Data controls like gridview are used to display data. When data is large you want to show it in parts that is possible using pagination feature of gridview. Actually gridview merely shows data, its the datasource attached to the gridview that fetchs data from the database.Now with the default paging, datasource of the gridview retrives whole data from the database and then gridview shows only the selective data from whole set of data based on the page index that user has choosen.&lt;br /&gt;So, in the default paging, although you see subset of data but actually whole set of data is retrived from the DB that makes this approach preformance  regressive.&lt;br /&gt;&lt;br /&gt;Now, what is custom paging?&lt;br /&gt;&lt;br /&gt;Through custom paging only selective set of data is retirved from the database unlike default paging. To achieve this, SQl Server 2005 has introduce a feature called ROW_NUMBER() that can be used in a query to retrive selective data from the database.&lt;br /&gt;&lt;br /&gt;Following code example will show how to use ROW_NUMBER() in an SP that will get selective records from DB based on page index to be shown and no. of record per page parameters passed to it.&lt;br /&gt;&lt;br /&gt;-- Create table&lt;br /&gt;create table [dbo].[NUM]&lt;br /&gt;(&lt;br /&gt; [n] [int] NOT NULL,&lt;br /&gt; [s] [varchar](128) NULL&lt;br /&gt;) &lt;br /&gt;GO&lt;br /&gt; --Now insert 1000 records in the table.&lt;br /&gt;set nocount on &lt;br /&gt;declare @n int,@v int &lt;br /&gt;set @n=0&lt;br /&gt;while @n&lt;1000&lt;br /&gt; begin&lt;br /&gt; set @v=(cast((rand()*100)as int)%100) + @n  &lt;br /&gt; insert into NUM&lt;br /&gt; select @v,'Value: '+convert(varchar,@v) &lt;br /&gt; set @n=@n+1 &lt;br /&gt; end &lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;-- Create stored procedure for retrieving records using sql server custom paging feature&lt;br /&gt;&lt;br /&gt;create proc GetDataByCustomPaging&lt;br /&gt;@pageindex int,&lt;br /&gt;@pagesize int&lt;br /&gt;as&lt;br /&gt;begin&lt;br /&gt;select n,s from (select ROW_NUMBER() over (order by n) as RowNum ,n,s from NUM) as tblNUM&lt;br /&gt;where RowNum between (@pageindex-1)*@pagesize+1 and @pageindex*@pagesize&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;-- Execute Sp by passing page index and the size of page&lt;br /&gt;&lt;br /&gt;exec GetDataByCustomPaging 2,10&lt;br /&gt;&lt;br /&gt;Gridview control also supports custom paging but you need to do some coding to implement it in gridview.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3048407080390642890?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3048407080390642890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3048407080390642890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3048407080390642890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3048407080390642890'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/04/custom-paging-in-sql-server.html' title='Custom Paging in SQL Server'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4272408115853540331</id><published>2008-04-22T20:45:00.000-07:00</published><updated>2008-04-22T20:48:20.086-07:00</updated><title type='text'>Pointers in c#</title><content type='html'>Sometimes people get confused when they are asked "Can we use pointers in C#?", they retorthow it can be? C# is a managed  language and we can only write managed code in C# whereas pointers are unmanaged. But they are wrong... you can use pointers in C# with some extra care.&lt;br /&gt;&lt;br /&gt;Let me first clear what is managed and unmanaged code?&lt;br /&gt;Managed code is executed under the control of Common Language Runtime (CRL) and takes advantage of services provided by CLR like garbage collection(Automatic memory allocation and de-allocation), code level security,CLS etc. Whereas unmanaged code does not execute under full control of CLR so it can create some problem therefore its also called unsafe. &lt;br /&gt;&lt;br /&gt;But CLR allows programmer to write unmanaged code along with managed code using a keyword "unsafe".you can use this keyword for any class, method or code block that contains unmanaged code.Like...&lt;br /&gt;&lt;br /&gt;unsafe class Class1 {}&lt;br /&gt;&lt;br /&gt;static unsafe void Method1( int* ptr, int len{...} &lt;br /&gt;&lt;br /&gt;unsafe &lt;br /&gt;{&lt;br /&gt;int* ptr;&lt;br /&gt;int i = 1;&lt;br /&gt;ptr = &amp;i;&lt;br /&gt;System.Console.WriteLine("Value of i is: " + *ptr);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;To compile unmanaged code along with managed code you have to set "allow unsafe code" option in the build tab of the project properties window as true.&lt;br /&gt;&lt;br /&gt;One more thing to remember when using pointers...&lt;br /&gt;&lt;br /&gt;Because GC cleans up memory automatically, it can change the location of an object in the memory during cleaning. If that happens it may be the chance that your pointer will point to wrong location in the memory. This scenario is very difficult to debug as your program will compile sucessfully but will not give desired result.&lt;br /&gt;&lt;br /&gt;So, to avoid such situation C# provide a keyword "Fixed" that informs CLR not to change the location of an object referenced by the pointer. Like...&lt;br /&gt;&lt;br /&gt;// col is a managed variable.&lt;br /&gt;Colour col = new Colour(); &lt;br /&gt;// use fixed to get address of col.R in the pointer&lt;br /&gt;fixed ( int* ptr = &amp;col.R)&lt;br /&gt;{ &lt;br /&gt;*ptr = 255; &lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4272408115853540331?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4272408115853540331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4272408115853540331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4272408115853540331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4272408115853540331'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/04/pointers-in-c.html' title='Pointers in c#'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6270341155613714679</id><published>2008-04-21T21:23:00.000-07:00</published><updated>2008-04-21T21:24:19.700-07:00</updated><title type='text'>Web Page Life Cycle</title><content type='html'>Here I am not going to explain web request process but will just give you the sequence of occurance of a web page events.&lt;br /&gt;&lt;br /&gt;Below is the sequence of web page events:&lt;br /&gt;&lt;br /&gt;Page Initialization&lt;br /&gt;Load ViewState&lt;br /&gt;Load Post Data&lt;br /&gt;Page Load&lt;br /&gt;Raised Postback Changed Event&lt;br /&gt;Raised Postback&lt;br /&gt;Page PreRender&lt;br /&gt;Save ViewState&lt;br /&gt;Page Render&lt;br /&gt;Page Unload&lt;br /&gt;&lt;br /&gt;Now, lets take a scenario, there is a web page built upon a master page and contains a web usercontrol that has child web usercontrol in it.&lt;br /&gt;&lt;br /&gt;Here is the sequence of events post execution of HttpModules:&lt;br /&gt;&lt;br /&gt;Initialization&lt;br /&gt;&lt;br /&gt;Page- PreInit&lt;br /&gt;&lt;br /&gt;Init - ChildUserControl&lt;br /&gt;Init - UserControl&lt;br /&gt;Init - MasterPage&lt;br /&gt;Init - Page&lt;br /&gt;&lt;br /&gt;Page- InitComplete&lt;br /&gt;&lt;br /&gt;Page- PreLoad&lt;br /&gt;&lt;br /&gt;Load- Page&lt;br /&gt;Load- MasterPage&lt;br /&gt;Load- UserControl&lt;br /&gt;Load- ChildUserControl&lt;br /&gt;&lt;br /&gt;PostBack Event&lt;br /&gt;&lt;br /&gt;DataBinding- Page&lt;br /&gt;DataBinding- MasterPage&lt;br /&gt;DataBinding- UserControl&lt;br /&gt;DataBinding- ChildUserControl&lt;br /&gt;&lt;br /&gt;Page- LoadComplete&lt;br /&gt;&lt;br /&gt;PreRender- Page&lt;br /&gt;PreRender- MasterPage&lt;br /&gt;PreRender- UserControl&lt;br /&gt;PreRender- ChildUserControl&lt;br /&gt;&lt;br /&gt;Page- PreRenderComplete&lt;br /&gt;&lt;br /&gt;Page- SaveViewStateComplete&lt;br /&gt;&lt;br /&gt;Unload- ChildUserControl&lt;br /&gt;Unload- - UserControl&lt;br /&gt;Unload- - MasterPage&lt;br /&gt;Unload- - Page&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6270341155613714679?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6270341155613714679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6270341155613714679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6270341155613714679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6270341155613714679'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/04/web-page-life-cycle.html' title='Web Page Life Cycle'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1277841077622614565</id><published>2008-04-10T02:54:00.000-07:00</published><updated>2008-04-10T02:57:11.677-07:00</updated><title type='text'>Difference between Temp tables and Table variables in Sql Server</title><content type='html'>Following are the difference between Temp tables and Table variables:&lt;br /&gt;&lt;br /&gt;1. Transaction log are not recorded for table variables so they are transaction netrual or you can say they are out of scope of transaction mechanism. Whereas temp tables participate in transactions just like normal tables.&lt;br /&gt;&lt;br /&gt;2. Table variables can not be altered it means no DDL action is allowed on them. Whereas temp tables can be altered.&lt;br /&gt;&lt;br /&gt;3. Stored Procedure with a temporary table cannot be pre-compiled, while an execution plan of procedures with table variables can be statically compiled in advance. Pre-compiling a script gives a major advantage to its speed of execution. This advantage can be dramatic for long procedures, where recompilation can be too pricy.&lt;br /&gt;&lt;br /&gt;4. Unlike temp tables, table variables memory resident but not always. Under memory pressure, the pages belonging to a table variable can be pushed out to tempdb.&lt;br /&gt;&lt;br /&gt;5. There can be a big performance difference between using table variables and temporary tables. In most cases, temporary tables are faster than table variables. Although queries using table variables didn't generate parallel query plans on a large SMP box, similar queries using temporary tables (local or global) and running under the same circumstances did generate parallel plans.&lt;br /&gt;&lt;br /&gt;Table variables use internal metadata in a way that prevents the engine from using a table variable within a parallel query. SQL Server maintains statistics for queries that use temporary tables but not for queries that use table variables. Without statistics, SQL Server might choose a poor processing plan for a query that contains a table variable.&lt;br /&gt;&lt;br /&gt;No statistics is maintained on table variable which means that any changes in data impacting table variable will not cause recompilation of queries accessing table variable. Queries involving table variables don't generate parallel plans.&lt;br /&gt;&lt;br /&gt;My Suggestions:&lt;br /&gt;&lt;br /&gt;1. Use table variable where you want to pass table to the Sp as parameter b'coz there is no other choice.&lt;br /&gt;2. Its found that table variable are slow in sql server 2005 than 2000 on similar data and circumstances, so if you have used table variables extensively in you BD and planning to migrate from sql server 2000 to 2005, make your choice carefully.&lt;br /&gt;3. Table variables are OK if used in small queries and for processing small amount of data otherwise go for temp tables.&lt;br /&gt;4. If your are using very complex business logic in your SP, its better using temp table than table variables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1277841077622614565?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1277841077622614565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1277841077622614565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1277841077622614565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1277841077622614565'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/04/difference-between-temp-tables-and.html' title='Difference between Temp tables and Table variables in Sql Server'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8692610530232673331</id><published>2008-04-10T02:04:00.000-07:00</published><updated>2008-04-10T02:06:41.761-07:00</updated><title type='text'>Add an Icon to URL</title><content type='html'>How about giving personal feel to the url of your website by changing icon of your site url.&lt;br /&gt;&lt;br /&gt;Wanna try it...Follow below given steps:&lt;br /&gt;&lt;br /&gt;1. Create an icon file with the name "favicon.ico" or find and ico file in you system and rename its copy for your use. Make sure the size should be 16 X 16.&lt;br /&gt;2. Now add this file in the root of your website.&lt;br /&gt;3. And add following 2 lines in the head section of your website's home page but if you are using master page in your website then add these line in the master page's head section and it will be displayed for every web page of your site.&lt;br /&gt;&lt;br /&gt;    &lt; link rel="icon" href="favicon.ico"  type="image/ico" / &gt;&lt;br /&gt;    &lt; link rel="SHORTCUT ICON" href="favicon.ico"  / &gt;&lt;br /&gt;&lt;br /&gt;Thats it...&lt;br /&gt;&lt;br /&gt;Now open your site in new browser window and see the effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8692610530232673331?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8692610530232673331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8692610530232673331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8692610530232673331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8692610530232673331'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/04/add-icon-to-url.html' title='Add an Icon to URL'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1820258315142531149</id><published>2008-03-27T19:45:00.000-07:00</published><updated>2008-03-27T19:46:46.301-07:00</updated><title type='text'>What is Extranet?</title><content type='html'>A company LAN, or local area network, can house a private Internet-like environment called an intranet. The intranet is basically a set of HTML pages relating to internal company business, for employee's eyes only, and is not available to the Internet. If access to or from the Internet is provided, it will be through a firewall gateway that will require a username and password. In this case the intranet becomes an extranet. In short, an extranet is the extension of an intranet to include public access.&lt;br /&gt;&lt;br /&gt;An extranet can allow public access to employees, customers, clients or partners. The extranet uses Internet protocols so users can navigate with a browser, but resides on the company's private server rather than on a public Internet server. Extranet access from the Internet can be controlled through various architectures that are password or username specific. In other words, areas of the extranet will be available according to password credentials. This limits users to extranet pages relevant to the business they might be conducting, while keeping other areas of the extranet private and secure.&lt;br /&gt;&lt;br /&gt;An extranet requires security and privacy. These can include firewall server management, the issuance and use of digital certificates or similar means of user authentication, encryption of messages, and the use of virtual private networks (VPNs) that tunnel through the public network.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1820258315142531149?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1820258315142531149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1820258315142531149' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1820258315142531149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1820258315142531149'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/03/what-is-extranet.html' title='What is Extranet?'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-7490611833359739632</id><published>2008-02-14T04:50:00.000-08:00</published><updated>2008-02-14T05:01:53.404-08:00</updated><title type='text'>Error: The file web.sitemap required by XmlSiteMapProvider does not exist.</title><content type='html'>This error occurs if XmlSiteMapProvider does not find web.sitemap file. By default it looks for this file in the root of the website therefore if you add web.sitemap file in your website you are likly to get this error.&lt;br /&gt;So to overcome this error simple move web.sitemap file in the root of website if its not in the root. Or if you dont want to have web.sitemap file in the root of website, you can reconfigure XmlSiteMapProvider by adding it in the web.config file of your website.Like...&lt;br /&gt;&lt;br /&gt;&lt; siteMap defaultProvider="XmlSiteMapProvider" enabled="true" &gt;&lt;br /&gt;      &lt; providers &gt;&lt;br /&gt;        &lt; clear/ &gt;&lt;br /&gt;        &lt; add name="XmlSiteMapProvider"&lt;br /&gt;        type="System.Web.XmlSiteMapProvider, System.Web,Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"&lt;br /&gt;        &lt;strong&gt;siteMapFile="~/Resource/web.sitemap"&lt;/strong&gt;&lt;br /&gt;        securityTrimmingEnabled="true"/ &gt;&lt;br /&gt;      &lt; /providers &gt;&lt;br /&gt;    &lt; /siteMap &gt;&lt;br /&gt;&lt;br /&gt;Note : You can ste new path of your we.sitemap in the siteMapFile attribute.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-7490611833359739632?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/7490611833359739632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=7490611833359739632' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7490611833359739632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7490611833359739632'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/02/error-file-websitemap-required-by.html' title='Error: The file web.sitemap required by XmlSiteMapProvider does not exist.'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3656681359908629229</id><published>2008-02-13T01:36:00.000-08:00</published><updated>2008-02-13T01:39:20.288-08:00</updated><title type='text'>Error: Failed to access IIS metabase</title><content type='html'>This is error occurs when you have installed IIS after installing Microsoft Visual Studio. So to overcome this error you can either run aspnet_regiis utility or re-install .net framework.&lt;br /&gt;&lt;br /&gt;If you have installed IIS over .net framework 2.0 then you have to run this utility from following folder.&lt;br /&gt;&lt;br /&gt;C:\Windows\Microsoft.Net\Framework\v2.0.50727\aspnet_regiis -i&lt;br /&gt;&lt;br /&gt;In some cases this error occurs user account under which web application is running does not have proper permission on the IIS metabase. In that case run following commond.&lt;br /&gt;&lt;br /&gt;aspnet_regiis -ga &lt;user_account_name&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3656681359908629229?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3656681359908629229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3656681359908629229' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3656681359908629229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3656681359908629229'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/02/error-failed-to-access-iis-metabase.html' title='Error: Failed to access IIS metabase'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2708814818520422293</id><published>2008-01-08T00:29:00.000-08:00</published><updated>2008-01-08T00:34:43.653-08:00</updated><title type='text'>Using JavaScript to prevent or trigger form submission when ENTER is hit on textbox</title><content type='html'>&lt;strong&gt;for Preventing:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Suppose there is a textbox control called txtDemo. Add below line of code in the page_load method.&lt;br /&gt;&lt;br /&gt;txtDemo.Attributes.Add("onkeypress", "return noenter()");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt; script type="text/javascript" &gt;&lt;br /&gt;function noenter() {&lt;br /&gt;  return !(window.event &amp;&amp; window.event.keyCode == 13); }&lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For Triggering:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;em&gt;Option 1:&lt;/em&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Suppose there is a textbox control called txtDemo and a button control namely btnSubmit. Add below lines of code in the page_load method.&lt;br /&gt;&lt;br /&gt;txtDemo.Attributes.Add("onkeypress", "return clickButton(event,'" + btnSubmit.ClientID + "')");&lt;br /&gt;btnSubmit.Attributes.Add("onclick", "return validate_Data();");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt; script type="text/javascript" &gt;&lt;br /&gt;&lt;br /&gt;function clickButton(e, buttonid)&lt;br /&gt;{ &lt;br /&gt;  var bt = document.getElementById(buttonid); &lt;br /&gt;  if (typeof bt == 'object')&lt;br /&gt;   { &lt;br /&gt;    if (event.keyCode == 13)&lt;br /&gt;    { &lt;br /&gt;      bt.click();&lt;br /&gt;      return false;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Option 2:&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;In case of IE4+&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Suppose there is a textbox control called txtDemo. Add below line of code in the page_load method.&lt;br /&gt;&lt;br /&gt;txtDemo.Attributes.Add("onkeypress", "return entsub(this.form)");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt; script type="text/javascript" &gt;&lt;br /&gt;function noenter() {&lt;br /&gt;  return !(window.event &amp;&amp; window.event.keyCode == 13); }&lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;In Case of Netscape Navigator&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;txtDemo.Attributes.Add("onkeypress", "return entsub(event,this.form)");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt; script type="text/javascript" &gt;&lt;br /&gt;function entsub(event,ourform) {&lt;br /&gt;  if (event &amp;&amp; event.which == 13)&lt;br /&gt;    ourform.submit();&lt;br /&gt;  else&lt;br /&gt;    return true;}&lt;br /&gt;&lt;br /&gt;&lt; /script &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2708814818520422293?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2708814818520422293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2708814818520422293' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2708814818520422293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2708814818520422293'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/01/using-javascript-to-prevent-or-trigger.html' title='Using JavaScript to prevent or trigger form submission when ENTER is hit on textbox'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4830659960927958491</id><published>2008-01-07T23:15:00.001-08:00</published><updated>2008-01-07T23:15:49.310-08:00</updated><title type='text'>Pagination in Repeater control using PagedDataSource</title><content type='html'>PagedDataSource Class&lt;br /&gt;&lt;br /&gt;Encapsulates the paging-related properties of a data-bound control (such as DataGrid, GridView, DetailsView, and FormView) that allow it to perform paging. This class cannot be inherited.&lt;br /&gt;&lt;br /&gt;Below is the source code to demonstrate the use of PagedDataSource for implementing pagination in repeater control.&lt;br /&gt;&lt;br /&gt;fileName : PagedDataSourceDemo.aspx&lt;br /&gt;&lt;br /&gt;&lt; table id="tbl1" cellspacing="0" &gt;&lt;br /&gt;    &lt; asp:Repeater ID="rptr1" runat="server" &gt;&lt;br /&gt;        &lt; ItemTemplate&gt;&lt;br /&gt;            &lt; tr &gt;&lt;br /&gt;                &lt; td " &gt;&lt;br /&gt;                    &lt; asp:Label ID="lblId" runat="server" Text='&lt;%# (Eval("ID") != null &amp;&amp; !Eval("ID").ToString().Trim().Equals("")?Eval("ID"):"") %&gt;'&gt;&lt;/asp:Label &gt;&lt;br /&gt;                &lt; /td &gt;&lt;br /&gt;                &lt; td &gt; &lt;br /&gt;                    &lt; asp:Label ID="lblName" runat="server" Text='&lt;%# (Eval("Name") != null &amp;&amp; !Eval("Name").ToString().Trim().Equals("")?Eval("Name"):"") %&gt;' &gt;&lt; /asp:Label &gt;&lt;br /&gt;                    &lt; /a &gt;&lt;br /&gt;                &lt; /td &gt;&lt;br /&gt;            &lt; /tr &gt;&lt;br /&gt;        &lt; /ItemTemplate &gt;&lt;br /&gt;    &lt; /asp:Repeater &gt;&lt;br /&gt;    &lt; /table &gt;&lt;br /&gt;    &lt; table id="tbl2" cellspacing="0" &gt;&lt;br /&gt; &lt; tr &gt;&lt;br /&gt;      &lt; td &gt;&lt;br /&gt;             &lt; asp:Repeater id="rptr2" runat="server" &gt;&lt;br /&gt;             &lt; /asp:Repeater &gt;&lt;br /&gt;         &lt; /td &gt;&lt;br /&gt; &lt; /tr &gt;&lt;br /&gt;&lt; /table &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt; script runat="server" &gt;&lt;br /&gt;&lt;br /&gt;    private DataTable _data = null;&lt;br /&gt;    private PagedDataSource _objPds;&lt;br /&gt;    private LinkButton _linkMore = null;&lt;br /&gt;    private LinkButton _linkPrevious = null;&lt;br /&gt;&lt;br /&gt;    protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (Request.QueryString["page"] != null &amp;&amp; !Request.QueryString["page"].ToString().Equals(""))&lt;br /&gt;        {&lt;br /&gt;            CurrentPage = Int32.Parse(Request.QueryString["page"].ToString()) - 1;&lt;br /&gt;            LoadData();&lt;br /&gt;        }&lt;br /&gt;        if (Request.QueryString["action"] != null)&lt;br /&gt;        {&lt;br /&gt;            if (Request.QueryString["action"].ToString().Trim().Equals("next"))&lt;br /&gt;            {&lt;br /&gt;                CurrentPage += 1;&lt;br /&gt;            }&lt;br /&gt;            if (Request.QueryString["action"].ToString().Trim().Equals("previous"))&lt;br /&gt;            {&lt;br /&gt;                CurrentPage -= 1;&lt;br /&gt;            }&lt;br /&gt;            LoadData();&lt;br /&gt;        }&lt;br /&gt;        if (!IsPostBack)&lt;br /&gt;            LoadData();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private void LoadData()&lt;br /&gt;    {&lt;br /&gt;        _data = ((DataTable)Cache.Get("MyData"));&lt;br /&gt;        if (_data != null &amp;&amp; _data.Rows.Count &gt; 0)&lt;br /&gt;        {&lt;br /&gt;            rptr1.DataSource = CreatePaging(_data);&lt;br /&gt;            rptr1.DataBind();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    protected PagedDataSource CreatePaging(DataTable dt)&lt;br /&gt;    {&lt;br /&gt;        CreatePagingButton(dt);&lt;br /&gt;        &lt;br /&gt;        _objPds = new PagedDataSource();&lt;br /&gt;        _objPds.DataSource = dt.DefaultView;&lt;br /&gt;&lt;br /&gt;        _objPds.AllowPaging = true;&lt;br /&gt;&lt;br /&gt;        _objPds.PageSize = 10;&lt;br /&gt;&lt;br /&gt;        _objPds.CurrentPageIndex = CurrentPage;&lt;br /&gt;        if (_linkMore != null) _linkMore.Visible = !_objPds.IsLastPage;&lt;br /&gt;        if (_linkPrevious != null) _linkPrevious.Visible = !_objPds.IsFirstPage;&lt;br /&gt;        return _objPds;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int CurrentPage&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            object o = this.ViewState["_CurrentPage"];&lt;br /&gt;            if (o == null)&lt;br /&gt;                return 0; &lt;br /&gt;            else&lt;br /&gt;                return (int)o;&lt;br /&gt;        }&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            this.ViewState["_CurrentPage"] = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    protected void CreatePagingButton(DataTable TempTable)&lt;br /&gt;    {&lt;br /&gt;        if (TempTable != null &amp;&amp; TempTable.Rows.Count &gt; 10)&lt;br /&gt;        {&lt;br /&gt;            if (rptr2.HasControls())&lt;br /&gt;                rptr2.Controls.Clear();&lt;br /&gt;&lt;br /&gt;            _linkPrevious = new LinkButton();&lt;br /&gt;            _linkPrevious.ID = "lnkPrevious";&lt;br /&gt;            _linkPrevious.Text = "Previous";&lt;br /&gt;            _linkPrevious.Visible = false;&lt;br /&gt;            _linkPrevious.PostBackUrl = "~/PagedDataSourceDemo.aspx?action=previous";&lt;br /&gt;            rptr2.Controls.Add(_linkPrevious);&lt;br /&gt;&lt;br /&gt;            Label lblPrevious = new Label();&lt;br /&gt;            lblPrevious.ID = "lblprevious";&lt;br /&gt;            lblPrevious.Text = " | ";&lt;br /&gt;            lblPrevious.Visible = true;&lt;br /&gt;            rptr2.Controls.Add(lblPrevious);&lt;br /&gt;&lt;br /&gt;            int i = 0;&lt;br /&gt;            for (i = 0; i &lt; TempTable.Rows.Count / 10; i++)&lt;br /&gt;            {&lt;br /&gt;                LinkButton linkButton = new LinkButton();&lt;br /&gt;                linkButton.ID = "Articles" + i;&lt;br /&gt;                linkButton.Text = (i + 1).ToString();&lt;br /&gt;                linkButton.Visible = true;&lt;br /&gt;                linkButton.PostBackUrl = "~/PagedDataSourceDemo.aspx?page=" + (i + 1);&lt;br /&gt;                rptr2.Controls.Add(linkButton);&lt;br /&gt;&lt;br /&gt;                Label lbl = new Label();&lt;br /&gt;                lbl.ID = "lbl" + i;&lt;br /&gt;                lbl.Text = " | ";&lt;br /&gt;                lbl.Visible = true;&lt;br /&gt;&lt;br /&gt;                rptr2.Controls.Add(lbl);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            if (TempTable.Rows.Count % 10 &gt; 0)&lt;br /&gt;            {&lt;br /&gt;                LinkButton linkButton = new LinkButton();&lt;br /&gt;                linkButton.ID = "Page" + i;&lt;br /&gt;                linkButton.Text = (i + 1).ToString();&lt;br /&gt;                linkButton.Visible = true;&lt;br /&gt;                linkButton.PostBackUrl = "~/PagedDataSourceDemo.aspxx?page=" + (i + 1);&lt;br /&gt;                rptr2.Controls.Add(linkButton);&lt;br /&gt;&lt;br /&gt;                Label lbl = new Label();&lt;br /&gt;                lbl.ID = "lbl" + i;&lt;br /&gt;                lbl.Text = " | ";&lt;br /&gt;                lbl.Visible = true;&lt;br /&gt;&lt;br /&gt;                rptr2.Controls.Add(lbl);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            _linkMore = new LinkButton();&lt;br /&gt;            _linkMore.ID = "lnkMore";&lt;br /&gt;            _linkMore.Text = "Next";&lt;br /&gt;            _linkMore.Visible = true;&lt;br /&gt;            _linkMore.PostBackUrl = "~/PagedDataSourceDemo.aspx?action=next";&lt;br /&gt;            rptr2.Controls.Add(_linkMore);&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt; /script &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4830659960927958491?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4830659960927958491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4830659960927958491' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4830659960927958491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4830659960927958491'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/01/pagination-in-repeater-control-using.html' title='Pagination in Repeater control using PagedDataSource'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-379941498479256988</id><published>2008-01-07T22:28:00.000-08:00</published><updated>2008-01-07T22:29:06.636-08:00</updated><title type='text'>How to use google maps</title><content type='html'>Below code for anchor tag will open the google map of the location in another window.&lt;br /&gt;&lt;br /&gt;&lt; a id="lnkMap" href='http://maps.google.com/maps?q=Street+City+State_Province+Zip_Postal_Code+Country' target="_blank" &gt;Map/Directions&lt; /a &gt;&lt;br /&gt;&lt;br /&gt;As the query string, you have to pass the adderss of the location seperated by '+' to the 'maps.google.com/maps' url.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-379941498479256988?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/379941498479256988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=379941498479256988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/379941498479256988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/379941498479256988'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/01/how-to-use-google-maps.html' title='How to use google maps'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3629309449307246289</id><published>2008-01-07T21:32:00.000-08:00</published><updated>2008-01-07T22:06:28.308-08:00</updated><title type='text'>Using Web Parts with SQL Server 2000</title><content type='html'>Many features of ASP.NET rely on intrinsic application services such as membership, roles, profiles, and personalization. The application services use providers, objects that persist application service data in long-term storage. For example, the ASP.NET personalization service uses a personalization provider to save personalized user settings on Web pages.&lt;br /&gt;&lt;br /&gt;Each application service uses one provider to persist the service's data in a particular kind of data store. For each service, a SQL provider is included and configured as the default provider to persist the data in a Microsoft SQL Server database. &lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;To persist ASP.NET application services data in another data store besides SQL Server (such as a Microsoft Access database, XML files, or other RDBMS systems), you must create a separate provider for each kind of data store. To create a custom provider, you can inherit from the base provider for a particular application service, and extend it to handle the data for the service in whatever type of data store you plan to use. For example, to create an Access database provider for the membership service, you could inherit from the MembershipProvider base class, and enable it to persist membership data in Access.&lt;br /&gt;&lt;br /&gt;A configured personalization provider and database. Web Parts personalization is enabled by default, and it uses the SQL personalization provider (SqlPersonalizationProvider) with the Microsoft SQL Server Standard Edition to store personalization data. This walkthrough uses SSE and the default SQL provider. If you have SSE installed, no configuration is needed. SSE is available with Microsoft Visual Studio 2005 as an optional part of the installation, or as a free download. For details, see the Microsoft SQL Server 2005 Express Edition Web page. To use one of the full versions of SQL Server, you must install and configure an ASP.NET application services database, and configure the SQL personalization provider to connect to that database. For details, see Creating and Configuring the Application Services Database for SQL Server. You can also create and configure a custom provider to use with other, non-SQL databases or storage solutions. For details and a code example see Implementing a Membership Provider.&lt;br /&gt;&lt;br /&gt;Reference : http://msdn2.microsoft.com/en-us/library/2fx93s7w.aspx&lt;br /&gt;&lt;br /&gt;By default, Web Parts in ASP.NET 2.0 are configured to use the default SQL Express Personalization Provider for persisting Web Parts information. If you wish to use SQL Server 2000 together with Web Parts, you need to perform the following steps: &lt;br /&gt;&lt;br /&gt;1. Run the aspnet_regsql.exe tool located in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\ to add the aspnetdb database into SQL Server 2000. &lt;br /&gt;&lt;br /&gt;The aspnet_regsql utility is a mixed mode (both graphical- and command-line-based) tool that lets you configure SQL Server for use with your ASP.NET application. &lt;br /&gt;&lt;br /&gt;You run the aspnet_regsql tool like this: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\&gt;aspnet_regsql&lt;br /&gt;If you invoke aspnet_regsql without any command options, you will see a wizard guiding you through the steps. Select the "Configure SQL Server for application services" option in the wizard window. Click Next and then specify your SQL Server 2000 name. Click Next and then Close. &lt;br /&gt;&lt;br /&gt;2. In Web.config, add the following to change the default SQL Express Personalization Provider to the new SQL Server Personalization Provider: &lt;br /&gt;&lt;br /&gt;Note: In the ConnectionString section user name and password can be changed accordingly.&lt;br /&gt;&lt;br /&gt;&lt; connectionStrings &gt;&lt;br /&gt;   &lt; add name="SQLConnString" &lt;br /&gt;      connectionString="Data Source=your_server_name;Initial &lt;br /&gt;                        Catalog=aspnetdb;Integrated Security=false;uid=sa;pwd=kkak"&lt;br /&gt;      providerName="System.Data.SqlClient" / &gt;&lt;br /&gt;&lt; /connectionStrings &gt;&lt;br /&gt;&lt;br /&gt;&lt; system.web &gt;&lt;br /&gt;   ..&lt;br /&gt;   ..&lt;br /&gt;   &lt; webParts &gt;&lt;br /&gt;      &lt; personalization&lt;br /&gt;         defaultProvider="SqlPersonalizationProvider" &gt;&lt;br /&gt;         &lt; providers&gt;&lt;br /&gt;            &lt; add name="SqlPersonalizationProvider"&lt;br /&gt;               type="System.Web.UI.WebControls.&lt;br /&gt;                     WebParts.SqlPersonalizationProvider"&lt;br /&gt;               connectionStringName="SQLConnString"&lt;br /&gt;               applicationName="/" / &gt;&lt;br /&gt;         &lt; /providers &gt; &lt;br /&gt;         &lt; authorization &gt;&lt;br /&gt;            &lt; deny users="*" verbs="enterSharedScope" / &gt;&lt;br /&gt;            &lt; allow users="*" verbs="modifyState" / &gt;&lt;br /&gt;         &lt; /authorization &gt;&lt;br /&gt;      &lt; /personalization &gt;&lt;br /&gt;   &lt; /webParts &gt;&lt;br /&gt;&lt; /system.web &gt;&lt;br /&gt;&lt;br /&gt;The Web Parts information will now be stored in SQL Server 2000 rather than the ASPNETDB.MDF database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3629309449307246289?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3629309449307246289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3629309449307246289' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3629309449307246289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3629309449307246289'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2008/01/using-web-parts-with-sql-server-2000.html' title='Using Web Parts with SQL Server 2000'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8437318300348883786</id><published>2007-12-19T06:46:00.000-08:00</published><updated>2007-12-27T04:44:24.676-08:00</updated><title type='text'>report server error - The permissions granted to user 'ASPNET' are insufficient for performing this operation. (rsAccessDenied)</title><content type='html'>I have been facing this problem for quite some time, after lot of R&amp;D I got the solution.&lt;br /&gt;&lt;br /&gt;I used window authentication mode for my web application and added folloing entry in the web.config file.&lt;br /&gt;&lt;br /&gt;&lt; identity impersonate="true"/ &gt;&lt;br /&gt;&lt;br /&gt;I also unchecked anonymous access for reports, reportserver and my web application.&lt;br /&gt;&lt;br /&gt;Another solution of this problem is that you create aspnet user in the server manager and assign it the permissions.&lt;br /&gt;&lt;br /&gt;To do that:&lt;br /&gt;&lt;br /&gt;1. Open the IIS console.&lt;br /&gt;2. Right click the Reports virtual directory and click the view browser option.&lt;br /&gt;3. Now, in the opened window, go to permission tab and add aspnet user.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8437318300348883786?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8437318300348883786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8437318300348883786' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8437318300348883786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8437318300348883786'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/12/report-server-error-permissions-granted.html' title='report server error - The permissions granted to user &apos;ASPNET&apos; are insufficient for performing this operation. (rsAccessDenied)'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3932374676679591568</id><published>2007-11-23T01:20:00.000-08:00</published><updated>2007-11-23T01:23:11.429-08:00</updated><title type='text'>what are dll.refresh extension files?</title><content type='html'>It tells VS where to look for updated versions of the dll with the same base name. They're text files, you can open them and see the path it's using.&lt;br /&gt;&lt;br /&gt;Their purpose is to prevent you from having to copy new versions yourself. In VS2003, the project file would contain the source location of the reference, but since VS2005 doesn't use project files for ASP.NET projects, this is the replacement for that particular functionality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3932374676679591568?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3932374676679591568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3932374676679591568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3932374676679591568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3932374676679591568'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/11/what-are-dllrefresh-extension-files.html' title='what are dll.refresh extension files?'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3383638072816774046</id><published>2007-08-27T00:44:00.000-07:00</published><updated>2007-08-27T00:46:18.174-07:00</updated><title type='text'>Error in using Local Resources</title><content type='html'>Sometimes, in an ASP.NET application, when you try to access a localized resource, you get following error message:&lt;br /&gt;&lt;br /&gt;"System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture."&lt;br /&gt;&lt;br /&gt;Reason:&lt;br /&gt;&lt;br /&gt;This problem occurs if you use a localized resource that exists in a satellite assembly that you created by using a .resources file that has an inappropriate file name. This problem typically occurs if you manually create a satellite assembly.&lt;br /&gt;&lt;br /&gt;To manually create a satellite assembly, you must first run the Resource File Generator (Resgen.exe), and then you must run the Assembly Linker (Al.exe). When you run Resgen.exe, if you do not specify the file name of the output file while you convert an XML-based resource format (.resx) file to a .resources file, Resgen.exe creates a .resources file that has the same file name as the input file. If the file name of your XML-based resource format file does not start with the namespace name of your application, the file name of the .resources file will not contain this namespace name either. You may run Al.exe to create a satellite assembly that contains the localized resources that exist in the .resources file. However, when you try to access a localized resource that exists in the satellite assembly, the behavior that is mentioned in the "Symptoms" section occurs.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;To work around this problem, specify the file name of the .resources file when you run Resgen.exe. While you specify the file name of the .resources file, make sure that the file name starts with the namespace name of your application. For example, run the following command at the Microsoft Visual Studio .NET command prompt to create a .resources file that has the namespace name of your application at the beginning of the file name: &lt;br /&gt;&lt;strong&gt;Resgen strings.CultureIdentifier.resx MyApp.strings.CultureIdentifier.resources&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;839861&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3383638072816774046?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3383638072816774046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3383638072816774046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3383638072816774046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3383638072816774046'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/08/error-in-using-local-resources.html' title='Error in using Local Resources'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2645898730359505139</id><published>2007-08-27T00:27:00.000-07:00</published><updated>2007-08-27T00:43:25.449-07:00</updated><title type='text'>Satellite Assemblies</title><content type='html'>&lt;strong&gt;Creating Satellite Assembly&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Satellite Assemblies are used to store local resources.To create satellite assembly from the .resx file, following steps are taken.&lt;br /&gt;&lt;br /&gt;1. Use Resgen.exe utility to generate resource file from .resx file &lt;br /&gt;2. Use Al.exe to generate satellite assembly&lt;br /&gt;&lt;br /&gt;For Example&lt;br /&gt;Suppose you have resource file that stores resource in German language.&lt;br /&gt;&lt;br /&gt;1. Resgen.exe Resource.de.resx MyApp.Resource.de.resources&lt;br /&gt;&lt;br /&gt;Note - Though its not necessary to give .resources file name but its recommanded to give it prefixed with namespace.&lt;br /&gt;&lt;br /&gt;2. Al.exe /t:lib /embed:MyApp.Resource.de.resources /culture:de /out:MyApp.German.dll&lt;br /&gt;&lt;br /&gt;Note - For including multiple resource file in a single satellite assembly, you can use /embed: option multiple times in the command like...&lt;br /&gt;&lt;br /&gt; Al.exe /t:lib /embed:MyApp.Resource1.de.resources /embed:MyApp.Resource2.de.resources /culture:de /out:MyApp.German.dll&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using Satellite Assembly&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;ResourceManager class in .net can be used to access resources in the satellite assembly.&lt;br /&gt;&lt;br /&gt;Example: following is the page load event handler of login.aspx page.&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;static ResourceManager _resourceManager;string Str = Server.MapPath("bin/MyApp.German.dll");&lt;br /&gt;_resourceManager = new ResourceManager("MyApp.Resource.de", Assembly.LoadFrom(Str));&lt;br /&gt;Page.Culture =CultureInfo.CreateSpecificCulture("de").Name;&lt;br /&gt;Page.UICulture = CultureInfo.CreateSpecificCulture("de").Name;&lt;br /&gt;lblUserName.Text = ResManager.GetString("UserName");&lt;br /&gt;lblPassword.Text = ResManager.GetString("Password");&lt;br /&gt;btnSubmit.Text = ResManager.GetString("Login");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Note - The first parameter of the ResourceManager class constructor is the base name of the resource that the satellite assembly contains, which is the qualified name of the .resources file from which satellite assembly is created using Al.exe&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2645898730359505139?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2645898730359505139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2645898730359505139' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2645898730359505139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2645898730359505139'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/08/satellite-assemblies.html' title='Satellite Assemblies'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-7080103275363743568</id><published>2007-08-21T03:25:00.000-07:00</published><updated>2007-08-21T03:26:54.902-07:00</updated><title type='text'>SQL Statement Exploits</title><content type='html'>A variation on a script exploit is one that causes malicious SQL statements to be executed. This can occur if an application prompts users for information and then concatenates the user's input into a string representing the SQL statement. For example, an application might prompt for a customer name with the intention of executing a statement, such as the following:&lt;br /&gt;&lt;br /&gt;"Select * From Customers where CustomerName = " &amp; txtCustomerName.Value&lt;br /&gt;&lt;br /&gt;But a malicious user who knows something about the database could use the text box to enter an embedded SQL statement with the customer name, resulting in a statement like the following:&lt;br /&gt;&lt;br /&gt;Select * From Customers Where CustomerName = 'a' Delete From Customers Where CustomerName &gt; ''&lt;br /&gt;&lt;br /&gt;Now when the above query is executed, it will delete all the customers records from the DB.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Protection&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To protect against SQL statement exploits, never create SQL queries using string concatenation. Instead, use a parameterized query and assign user input to parameter objects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-7080103275363743568?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/7080103275363743568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=7080103275363743568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7080103275363743568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7080103275363743568'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/08/sql-statement-exploits.html' title='SQL Statement Exploits'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-5394055649771517011</id><published>2007-08-21T03:22:00.000-07:00</published><updated>2007-08-21T03:24:59.560-07:00</updated><title type='text'>Script Exploits</title><content type='html'>Script exploits is the scenario where web application allows any user to insert malicious code (javascript) in the textbox controls in the web page and stores it in the DB. Now when the same information is sought by another user that malicious code gets executed and can create havoc because from the perspective of a browser, a Web page is simply a long string of characters. The browser processes the string sequentially, displaying some characters while interpreting other characters, such as &lt;&gt; and &lt;&gt; according to special rules. If a malicious user can insert some of those special characters into a page, the browser will not know that the characters are not supposed to be there, and it will process them as part of the page.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Protection&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;ASP.NET provides you with several ways to help protect against scripting exploits. It performs request validation against query-string and form variables as well as cookie values. By default, if the current Request contains HTML-encoded elements or certain HTML characters (such as &amp;#151; for an em dash), the ASP.NET page framework raises an error.But if you want your application to accept some HTML (for example, some formatting instructions from users), you should encode the HTML at the client before it is submitted to the server using Server.HtmlEncode method.And to display the same code that you have encode, you can use Server.HtmlDecode method to decode it.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;        string Str =Server.HtmlEncode("&lt;&gt;");&lt;br /&gt;        TextBox1.Text =Server.HtmlDecode(Str);&lt;br /&gt;&lt;br /&gt;In the code above, HtmlEncode method will encode value of html tag &lt;&gt; to "&amp;lt;br&amp;gt;" and HtmlDecode method will decode it back to &lt;&gt;.&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;This example will only work if you disable request validation in the page by adding the @ Page attribute ValidateRequest="false". It is not recommended that you disable request validation in a production application, so make sure that you enable request validation again after viewing this example.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ValidateRequest&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;It indicates whether request validation should occur. If true, request validation checks all input data against a hard-coded list of potentially dangerous values. If a match occurs, an HttpRequestValidationException Class is thrown. The default is true.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/w1sw53ds.aspx"&gt;http://msdn2.microsoft.com/en-us/library/w1sw53ds.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-5394055649771517011?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/5394055649771517011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=5394055649771517011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5394055649771517011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5394055649771517011'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/08/script-exploits.html' title='Script Exploits'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-910722508087643629</id><published>2007-08-21T03:16:00.000-07:00</published><updated>2007-08-21T03:21:57.976-07:00</updated><title type='text'>Implementing file download functionality</title><content type='html'>Following is the code for implementing file download functionality in the web application.&lt;br /&gt;&lt;br /&gt;function filedownload()&lt;br /&gt;{&lt;br /&gt;        Response.Clear();&lt;br /&gt;        Response.ClearHeaders();&lt;br /&gt;       Response.ContentType = "application/doc";&lt;br /&gt;       System.IO.FileInfo myFile = new System.IO.FileInfo("c:\\MyDoc.doc");                Response.AppendHeader("Content-Length", myFile.Length.ToString());        Response.AppendHeader("content-disposition", "attachment; filename=" + System.IO.Path.GetFileName("c:\\MyDoc.doc"));       &lt;br /&gt;     Response.WriteFile("c:\\MyDoc.doc");       &lt;br /&gt;     Response.End();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In the above code snippet, a word document in the web server's C: drive is used for downloading.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-910722508087643629?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/910722508087643629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=910722508087643629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/910722508087643629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/910722508087643629'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/08/implementing-file-download.html' title='Implementing file download functionality'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1911753559466631321</id><published>2007-07-18T05:31:00.002-07:00</published><updated>2007-07-18T05:33:50.796-07:00</updated><title type='text'>Facts About Interfaces</title><content type='html'>1. Interface can'nt have member fields(variables).&lt;br /&gt;2. It can have only method, property, event and indexer as its member.&lt;br /&gt;3. Can'nt use access modifier with members.&lt;br /&gt;4. All members are public abstract by default so can'nt declare them public abstract explicitly.&lt;br /&gt;5. In the implementation class all the member of the interface should be implemented and they can have only public access modifier.&lt;br /&gt;6. If implementation class does not implement any one of the members of the interface then that member and the implementation class both should be declared abstract.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1911753559466631321?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1911753559466631321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1911753559466631321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1911753559466631321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1911753559466631321'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/07/facts-about-interfaces.html' title='Facts About Interfaces'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-527133757135861680</id><published>2007-07-18T05:31:00.001-07:00</published><updated>2009-04-22T10:12:43.412-07:00</updated><title type='text'>Facts About Abstract Classes</title><content type='html'>1. Abstract class can'nt have abstract constructor because constructor can'nt be inherited.&lt;br /&gt;2. It can have destructor but it can'nt be abstract or virtual.&lt;br /&gt;3. Abstract class can'nt be a sealed class.&lt;br /&gt;4. Member fields can'nt be abstract.&lt;br /&gt;5. It can have abstract property and events.&lt;br /&gt;6. It can have static and virtual events.&lt;br /&gt;7. Abstract and virtual property, event or method can'nt be private although it can be protected,internal or protected internal.&lt;br /&gt;8. Abstract members can'nt have virtual modifier because they are implicitly virtual.&lt;br /&gt;9. Can'nt change access modifier while overriding member of the abstract class in the derived abstract or contrete class.&lt;br /&gt;10. Any class derived from abstract class either should define all the abstract method of the abstract base class or should be declared abstract class as well. In that case derived abstract class needs not to declare abstract member of base class again.&lt;br /&gt;11. It is possible to have abstract class without any abstract members (method, event or property etc.). But a non abstract class can not have any abstract member.&lt;br /&gt;12. Abstract class can be derived from concrete (non abstract) class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-527133757135861680?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/527133757135861680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=527133757135861680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/527133757135861680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/527133757135861680'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/07/facts-about-abstract-classes.html' title='Facts About Abstract Classes'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-7461394274375746084</id><published>2007-07-18T05:28:00.000-07:00</published><updated>2007-07-18T05:30:57.495-07:00</updated><title type='text'>Facts About Static Classes</title><content type='html'>1. Static class can have only static member, no instance member is allowed.&lt;br /&gt;2. It can have only static parameterless constructor without access modifier so no constructor overloading is allowed.&lt;br /&gt;3. Can'nt create object of the static class.&lt;br /&gt;4. Static class is a sealed class by default so you can'nt drive class from the static class.&lt;br /&gt;5. Any derived class can'nt be declared as static so static classes can'nt participate in the inheritance.&lt;br /&gt;6. Static class can'nt have destructor.&lt;br /&gt;7. It can have static events.&lt;br /&gt;8. Static members can'nt be marked as abstract, virtual or override.&lt;br /&gt;9. Make the static member public to access them using class name otherwise in case of private, protected or internal access modifier, they can'nt be accessed.&lt;br /&gt;10. Static member of the abstract class can be accessed using the name of the derived class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-7461394274375746084?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/7461394274375746084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=7461394274375746084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7461394274375746084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7461394274375746084'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/07/facts-about-static-classes.html' title='Facts About Static Classes'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8985710358327625726</id><published>2007-07-13T06:11:00.000-07:00</published><updated>2007-07-13T06:12:40.512-07:00</updated><title type='text'>C# struct/class Differences</title><content type='html'>1. Classes are reference types and structs are value types so a class variable can be assigned null but we cannot assign null to a struct variable.&lt;br /&gt;2. When you instantiate a class, it will be allocated on the heap.When you instantiate a struct, it gets created on the stack.&lt;br /&gt;3. You will always be dealing with reference to an object ( instance ) of a class. But you will not be dealing with references to an instance of a struct ( but dealing directly with them ).&lt;br /&gt;4. When passing a class to a method, it is passed by reference. When passing a struct to a method, it's passed by value instead of as a reference.&lt;br /&gt;5. You cannot have instance Field initializers in structs.But  classes can have initializers. &lt;br /&gt;6. Classes can have explicit parameterless constructors. But structs cannot have explicit parameterless constructors.&lt;br /&gt;7. Classes must be instantiated using the new operator. But structs can be instantiated without using the new operator.&lt;br /&gt;8. Classes support inheritance.But there  is no inheritance for structs. ( structs don't support inheritance polymorphism ) So we cannot have a base structure and a derived structure. But like classes, structures can implement interfaces.&lt;br /&gt;9. Since struct does not support inheritance, access modifier of a member of a struct cannot be  protected or protected internal.&lt;br /&gt;10. It is not mandatory to initialize all Fields inside the constructor of a class.&lt;br /&gt;But all the Fields of a struct  must be fully initialized inside the constructor.&lt;br /&gt;11. A class is permitted to declare a destructor.But a struct is not permitted to declare a destructor.&lt;br /&gt;12. classes are used for complex and large set data. structs are simple to use. structs are useful whenever you  need a type that will be used often and is mostly just a piece of data.&lt;br /&gt;13. Creating a struct instance cannot cause a garbage collection (unless the constructor directly or indirectly creates a reference type instance) whereas creating a reference type instance can cause garbage collection. &lt;br /&gt;14. A struct always has a built-in public default constructor. This means that a struct is always instantiable whereas a class might not be since all its constructors could be private. &lt;br /&gt;15. A struct is implicitly sealed, a class isn't. &lt;br /&gt;16. A struct can't be abstract, a class can. &lt;br /&gt;17. A struct can't call : base() in its constructor whereas a class with no explicit base class can. &lt;br /&gt;18. A struct can't declare abstract function members, an abstract class can. &lt;br /&gt;19. A struct can't declare virtual function members, a class can. &lt;br /&gt;20. A struct can't declare sealed function members, a class can. &lt;br /&gt;21. A struct can't declare override function members, a class can. The one exception to this rule is that a struct can override the virtual methods of System.Object, viz, Equals(), and GetHashCode(), and ToString().&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8985710358327625726?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8985710358327625726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8985710358327625726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8985710358327625726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8985710358327625726'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/07/c-structclass-differences.html' title='C# struct/class Differences'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-444242467353889367</id><published>2007-07-11T00:38:00.000-07:00</published><updated>2007-07-11T00:59:37.341-07:00</updated><title type='text'>Web Garden Model</title><content type='html'>The Web garden model is configurable through the &lt;processModel&gt; section of the machine.config file. Notice that the &lt;processModel&gt; section is the only configuration section that cannot be placed in an application-specific web.config file. This means that the Web garden mode applies to all applications running on the machine.&lt;br /&gt;Two attributes in the &lt;processModel&gt; section affect the Web garden model. They are webGarden and cpuMask. The webGarden attribute takes a Boolean value that indicates whether or not multiple worker processes (one per each affinitized CPU) have to be used. The attribute is set to false by default. The cpuMask attribute has default value 1. &lt;br /&gt;Web gardening enables multiple worker processes to run at the same time. However, you should note that all processes will have their own copy of application state, in-process session state, ASP.NET cache, static data, and all that is needed to run applications. When the Web garden mode is enabled, the ASP.NET ISAPI launches as many worker processes as there are CPUs, each a full clone of the next (and each affinitized with the corresponding CPU). To balance the workload, incoming requests are partitioned among running processes in a round-robin manner. Worker processes get recycled as in the single processor case.&lt;br /&gt;When you enable a web-garden in IIS6.0, It creates multiple w3wp.exe to service that application pool. Each w3wp.exe process has it's own memory, threads etc.&lt;br /&gt;&lt;br /&gt;Web gardening has some side effects that you should be aware of: &lt;br /&gt;&lt;br /&gt;1. If your application uses session state, it must choose an out-of-process provider (NT Service or SQL). &lt;br /&gt;2. Application state and application statics are per process, not per computer. &lt;br /&gt;3. Caching is per process, not per computer. &lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://msdn2.microsoft.com/en-US/library/aa479328.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-444242467353889367?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/444242467353889367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=444242467353889367' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/444242467353889367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/444242467353889367'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/07/web-garden-model.html' title='Web Garden Model'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1003001494299541577</id><published>2007-07-05T06:23:00.000-07:00</published><updated>2007-07-05T06:25:08.587-07:00</updated><title type='text'>Attributes In C#</title><content type='html'>C# provides a mechanism for defining declarative tags, called attributes, which you can place on certain entities in your source code to specify additional information. The information that attributes contain can be retrieved at run time through reflection. You can use predefined attributes or you can define your own custom attributes. &lt;br /&gt;&lt;br /&gt;Every custom attribute class needs 2 things.&lt;br /&gt;&lt;br /&gt;1. An AttributeUsage Attribute to declare the class as an attribute. It specifies the language elements to which the attribute can be applied.&lt;br /&gt;2. This class must be derived directly or indirectly from System.Attribute class.&lt;br /&gt; &lt;br /&gt;Here is an Example:&lt;br /&gt;&lt;br /&gt;[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method,AllowMultiple=true)]&lt;br /&gt;public class MyAttribute : Attribute&lt;br /&gt;{&lt;br /&gt;   public double _version;&lt;br /&gt;   string _name;&lt;br /&gt;   public MyAttribute(string name,double ver)&lt;br /&gt;   {&lt;br /&gt;      this._name = name;&lt;br /&gt;      this._version = ver;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   //This method will retrive the attribute information.&lt;br /&gt;   public static void GetMyAttributeInfo(Type t) &lt;br /&gt;   {&lt;br /&gt;       object[] ClsAttrib =t.GetCustomAttributes(false);&lt;br /&gt;       MyAttribute MyAt=(MyAttribute)ClsAttrib[0];&lt;br /&gt;       System.Windows.Forms.MessageBox.Show("Name- " + MyAt._name + " , Version" + MyAt._version);&lt;br /&gt;       MethodInfo[] TheMethods = t.GetMethods(); &lt;br /&gt;       for (int i = 0; i &lt; TheMethods.GetLength(0); i++) &lt;br /&gt;       {&lt;br /&gt;          MethodInfo MethInfo = TheMethods[i];&lt;br /&gt;          object[] Attribs = MethInfo.GetCustomAttributes(false); &lt;br /&gt;          foreach (Attribute Attrib in Attribs) &lt;br /&gt;          {&lt;br /&gt;             if (Attrib is MyAttribute) &lt;br /&gt;             {&lt;br /&gt;               MyAttribute MyAtt = (MyAttribute)Attrib;&lt;br /&gt;               System.Windows.Forms.MessageBox.Show("Name- " + MyAtt._name + " , Version" + MyAtt._version);&lt;br /&gt;             }&lt;br /&gt;           }&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;[MyAttribute("sanjay",1.0)]&lt;br /&gt;public class TestMyAttribute&lt;br /&gt;{&lt;br /&gt;   [MyAttribute("ajay", 1.0)]&lt;br /&gt;   public void show()&lt;br /&gt;   {&lt;br /&gt;     System.Windows.Forms.MessageBox.Show("ajay");&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void Main()&lt;br /&gt;{&lt;br /&gt;   Base.TestMyAttribute At = new TestMyAttribute();&lt;br /&gt;   Base.MyAttribute.GetMyAttributeInfo(typeof(Base.TestMyAttribute));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://msdn2.microsoft.com/en-us/library/aa288454(VS.71).aspx&lt;br /&gt;http://www.c-sharpcorner.com/UploadFile/mgold/CreatingnUsingCustomAttributesinCS12032005055442AM/CreatingnUsingCustomAttributesinCS.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1003001494299541577?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1003001494299541577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1003001494299541577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1003001494299541577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1003001494299541577'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/07/attributes-in-c.html' title='Attributes In C#'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2150861648709814506</id><published>2007-07-05T03:40:00.000-07:00</published><updated>2007-07-05T03:44:53.059-07:00</updated><title type='text'>Creating Assembly Dynamically</title><content type='html'>public void CreateAssembly()&lt;br /&gt;{&lt;br /&gt;   AppDomain AppDom = AppDomain.CurrentDomain;&lt;br /&gt;&lt;br /&gt;   // create a new dynamic assembly&lt;br /&gt;   AssemblyName AsmName= new AssemblyName();&lt;br /&gt;   AsmName.Name = "MyAssembly";&lt;br /&gt;   AssemblyBuilder AsmBuild = AppDom.DefineDynamicAssembly(&lt;br /&gt;   AsmName, AssemblyBuilderAccess.Run);&lt;br /&gt;&lt;br /&gt;   // create a new module to hold code in the assembly&lt;br /&gt;   ModuleBuilder ModBuild = AsmBuild.DefineDynamicModule("MyModule");&lt;br /&gt;            &lt;br /&gt;   // create a type in the module&lt;br /&gt;   TypeBuilder TypeBuild = ModBuild.DefineType(&lt;br /&gt;   "MyClass", TypeAttributes.Public);&lt;br /&gt;&lt;br /&gt;   // create a method of the type&lt;br /&gt;   Type ReturnType = typeof(int);&lt;br /&gt;   Type[] ParamsType = new Type[0];&lt;br /&gt;   MethodBuilder MethBuild = TypeBuild.DefineMethod("MyMethod",&lt;br /&gt;   MethodAttributes.Public, ReturnType, ParamsType);&lt;br /&gt;&lt;br /&gt;   // generate the MSIL&lt;br /&gt;   ILGenerator Gen = MethBuild.GetILGenerator();&lt;br /&gt;   Gen.Emit(OpCodes.Ldc_I4, 1);&lt;br /&gt;   Gen.Emit(OpCodes.Ret);&lt;br /&gt;&lt;br /&gt;   //////////////////////////////////////////////////////////&lt;br /&gt;&lt;br /&gt;   // Now consume the type that is created above&lt;br /&gt;&lt;br /&gt;   Type TypeObj = TypeBuild.CreateType();&lt;br /&gt;&lt;br /&gt;   // create an instance of the new type&lt;br /&gt;   Object Obj = Activator.CreateInstance(TypeObj);&lt;br /&gt;   // create an empty arguments array&lt;br /&gt;    Object[] ObjArr = new Object[0];&lt;br /&gt;   // get the method and invoke it&lt;br /&gt;   MethodInfo MethInfo = TypeObj.GetMethod("MyMethod");&lt;br /&gt;   int RetVal = (int)MethInfo.Invoke(Obj, ObjArr);&lt;br /&gt;   MessageBox.Show("Method " + MethInfo + " in Class " + TypeObj + " returned " + RetVal);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://www.java2s.com/Code/CSharp/Development-Class/Illustratesruntimetypecreation.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2150861648709814506?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2150861648709814506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2150861648709814506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2150861648709814506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2150861648709814506'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/07/creating-assembly-dynamically.html' title='Creating Assembly Dynamically'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3554949650686569542</id><published>2007-07-05T00:37:00.000-07:00</published><updated>2007-07-05T00:40:11.079-07:00</updated><title type='text'>Application Domains in C#</title><content type='html'>Historically, process boundaries have been used to isolate applications running on the same computer. Each application is loaded into a separate process, which isolates the application from other applications running on the same computer.&lt;br /&gt;&lt;br /&gt;The applications are isolated because memory addresses are process-relative; a memory pointer passed from one process to another cannot be used in any meaningful way in the target process. In addition, you cannot make direct calls between two processes. Instead, you must use proxies, which provide a level of indirection.&lt;br /&gt;&lt;br /&gt;Application domains provide a more secure and versatile unit of processing that the common language runtime can use to provide isolation between applications. You can run several application domains in a single process with the same level of isolation that would exist in separate processes, but without incurring the additional overhead of making cross-process calls or switching between processes. The ability to run multiple applications within a single process dramatically increases server scalability.&lt;br /&gt;&lt;br /&gt;Application domains has the following benefits:&lt;br /&gt;&lt;br /&gt;1. Faults in one application cannot affect other applications.&lt;br /&gt;2. Individual applications can be stopped without stopping the entire process.&lt;br /&gt;3. Code running in one application cannot directly access code or resources from another application.Objects that pass between domains are either copied or accessed by proxy.&lt;br /&gt;4. Permissions granted to code can be controlled by the application domain in which the code is running.&lt;br /&gt;&lt;br /&gt;To access the code from another application, you can either load the assembly into the current application domain or create a new application domain and load the assembly into it.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Accessing Assembly Code in Current Application Domain &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Suppose you have an assembly named MyNameSpace.exe in the c:\ that you want to access in current application domain.&lt;br /&gt;&lt;br /&gt;C# Copy Code&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;    // Load the assembly into the current appdomain:&lt;br /&gt;    System.Reflection.Assembly newAssembly = System.Reflection.Assembly.LoadFrom(@"c:\MyNameSpace.exe");&lt;br /&gt;&lt;br /&gt;    // Instantiate RemoteObject:&lt;br /&gt;    newAssembly.CreateInstance("MyNameSpace.MyClass");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Accessing Assembly Code in Another Application Domain&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;When loading the assembly into a separate application domain, use AppDomain.ExecuteAssembly to access the default entry point or AppDomain.CreateInstance to create an instance of the class.&lt;br /&gt;&lt;br /&gt;C# Copy Code&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt; System.AppDomain NewAppDomain = System.AppDomain.CreateDomain("NewApplicationDomain");&lt;br /&gt;&lt;br /&gt;    // Load the assembly and call the default entry point:&lt;br /&gt;    NewAppDomain.ExecuteAssembly(@"c:\MyNameSpace.exe");&lt;br /&gt;&lt;br /&gt;    // Create an instance of RemoteObject:&lt;br /&gt;    NewAppDomain.CreateInstanceFrom(@"c:\MyNameSpace.exe", "MyNameSpace.MyClass");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;br /&gt;http://msdn2.microsoft.com/en-us/library/2bh4z9hs(VS.80).aspx&lt;br /&gt;http://msdn2.microsoft.com/en-us/library/ms173139(VS.80).aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3554949650686569542?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3554949650686569542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3554949650686569542' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3554949650686569542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3554949650686569542'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/07/application-domains-in-c.html' title='Application Domains in C#'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-5616870062156873548</id><published>2007-06-25T03:12:00.000-07:00</published><updated>2007-06-25T03:16:50.318-07:00</updated><title type='text'>Indexer in C#</title><content type='html'>Indexers allow you to index a class or a struct instance in the same way as an array.&lt;br /&gt;The systax is:&lt;br /&gt;&lt;br /&gt;[modifier] [return type] this [argument list]&lt;br /&gt; {&lt;br /&gt;  get&lt;br /&gt;  {&lt;br /&gt;   // codes for get accessor&lt;br /&gt;  }&lt;br /&gt;  set&lt;br /&gt;  {&lt;br /&gt;   // codes for set accessor&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Here is the C# code:&lt;br /&gt;&lt;br /&gt;public class PersonIndexer&lt;br /&gt;{&lt;br /&gt;int[] _age=new int[2];&lt;br /&gt;string[,] _name=new string[2,2];&lt;br /&gt;&lt;br /&gt;public int this[int i]&lt;br /&gt;{&lt;br /&gt;   get { return _age[i]; }&lt;br /&gt;   set { _age[i] = value; }&lt;br /&gt;}&lt;br /&gt;public string this[int i,int j]&lt;br /&gt;{&lt;br /&gt;   get { return _name[i, j]; }&lt;br /&gt;   set { _name[i, j] = value; }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;PersonIndexer Ind = new PersonIndexer();&lt;br /&gt;Ind[0] = 30;&lt;br /&gt;Ind[1] = 40;&lt;br /&gt;&lt;br /&gt;Ind[0, 0] = "sanjay";&lt;br /&gt;Ind[0, 1] = "saini";&lt;br /&gt;Ind[1, 0] = "Ram";&lt;br /&gt;Ind[1, 1] = "Kumar";&lt;br /&gt;MessageBox.Show(Ind[0, 0]+ " "+Ind[0, 1]+" is " + Convert.ToString(Ind[0])+" yrs. old.");&lt;br /&gt;MessageBox.Show(Ind[1, 0] + " " + Ind[1, 1] + " is " + Convert.ToString(Ind[1]) + " yrs. old.");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Note: &lt;br /&gt;&lt;br /&gt;1. If you declare more than one indexer in the same class, they must have different signatures.&lt;br /&gt;2. They can not be static.&lt;br /&gt;3. They can also be inherited.&lt;br /&gt;4. They can be overridden in the derived class and exibit polymorphism.&lt;br /&gt;5. They can be created abstract in the class.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://www.csharphelp.com/archives/archive140.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-5616870062156873548?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/5616870062156873548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=5616870062156873548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5616870062156873548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5616870062156873548'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/indexer-in-c.html' title='Indexer in C#'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8189840473964883903</id><published>2007-06-15T04:08:00.000-07:00</published><updated>2007-06-15T04:46:09.659-07:00</updated><title type='text'>Consuming Web Service from Client-Side code</title><content type='html'>We can consume web service from the client side using web service behaviour.The WebService behavior enables client-side script to invoke remote methods exposed by Web Services, or other Web servers, that support the SOAP and Web Services Description Language (WSDL) 1.1. This behavior provides developers the opportunity to use and leverage SOAP, without requiring expert knowledge of its implementation. The WebService behavior supports the use of a wide variety of data types, including intrinsic SOAP data types, arrays, objects, and XML data. &lt;br /&gt;The WebService behavior is implemented with an HTML Component (HTC) file as an attached behavior, so it can be used in Microsoft Internet Explorer 5 and later versions.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;WebService HTC File (webservice.htc)&lt;/strong&gt;&lt;br /&gt;The WebService behavior is encapsulated in an HTC file. Therefore, before you begin using the behavior in your own Web pages, download the WebService HTC File from the following location and copy it to a folder in your Web project.&lt;br /&gt;http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/behaviors/library/webservice/default.asp&lt;br /&gt;&lt;br /&gt;Now suppose you want to consume web service from "http://localhost/MathsWebService/MathsService.asmx" location whose web method "Sum" that takes 2 integer values and returns integer sum, you want to call from the client side code.&lt;br /&gt;Example-&lt;br /&gt;&lt;br /&gt;&lt; body onload="init()" &gt;&lt;br /&gt;    &lt; form id="form1" runat="server" &gt;&lt;br /&gt;        &lt; div id="service"  style="behavior: url(webservice.htc)" &gt;&lt;br /&gt;        &lt; /div &gt;&lt;br /&gt;        Num 1:&lt; asp:TextBox ID="n1"  runat="server" &gt; &lt; /asp:TextBox &gt;&lt; br /&gt;&lt;br /&gt;        Num 2:&lt; asp:TextBox ID="n2" runat="server" &gt; &lt; /asp:TextBox &gt;&lt; br /&gt;&lt;br /&gt;        &lt; asp:Button ID="btnsum" runat="server" OnClientClick="return fnSum()" Text="Sum" /&gt;        &lt;br /&gt;    &lt; /form &gt;&lt;br /&gt;&lt; /body &gt;&lt;br /&gt;&lt;br /&gt;Note:We have added web service behaviour in our web page using style attribute.&lt;br /&gt;&lt;br /&gt;&lt; script language="JavaScript" &gt;&lt;br /&gt;&lt;br /&gt;function init()&lt;br /&gt;{&lt;br /&gt;    service.useService("http://localhost/MathsWebService/MathsService.asmx?WSDL","MyMath");&lt;br /&gt;}&lt;br /&gt;function fnSum()&lt;br /&gt;{&lt;br /&gt;    var intA = document.getElementById('n1');&lt;br /&gt;    var intB = document.getElementById('n2');&lt;br /&gt;    service.MyMath.callService(Mycallback,"Sum", intA.value, intB.value);&lt;br /&gt;    return false;&lt;br /&gt;}&lt;br /&gt;function Mycallback(result)&lt;br /&gt;{&lt;br /&gt;    alert("Result = " + result.value);&lt;br /&gt;}&lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;Note: webservice.htc file contains useService and callService methods.&lt;br /&gt;&lt;br /&gt;This example will take 2 integer values from the textboxes and user click on Sum button the result will be displayed in the alert message.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://msdn2.microsoft.com/en-us/library/ms531032.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8189840473964883903?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8189840473964883903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8189840473964883903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8189840473964883903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8189840473964883903'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/consuming-web-service-from-client-side.html' title='Consuming Web Service from Client-Side code'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-5601216111661728319</id><published>2007-06-15T03:11:00.000-07:00</published><updated>2007-06-15T03:13:24.053-07:00</updated><title type='text'>Disco And UDDI</title><content type='html'>Web service Publishing means enabling a Web service user (consumer) to locate the web service description and instructing the consumer how they should interact with the Web service. The process of locating and interrogating Web service description is called the  discovery process. There are two ways for the discovery of Web services, DISCO and UDDI. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Discovery with DISCO&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In the past, most consumers found out about new Web Services (and their endpoint addresses) by browsing the Web, receiving an e-mail, or by word-of-mouth. But now you can publish a deployed Web Service using DISCO, you simply need to create a .disco file and place it in the vroot along with the other service-related configuration files.Or if you want to make discovery extremly simple for the counsumers, you can create a default web page of your website and place the url of the .disco file on it or place a like to redirect the users to the location of .disco file.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Web Services Discovery Tool (Disco.exe)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;There are currently two methods available for discovering the DISCO document. One is a command-line client called disco.exe and the other is the Add Web Reference feature in Visual Studio® .NET.&lt;br /&gt;Both methods generate .disco, .wsdl and .discomap files on the consumer's machine.&lt;br /&gt;&lt;br /&gt;The following command line simply takes the URL of the DISCO document to discover.&lt;br /&gt;&lt;br /&gt;disco.exe /out:&lt; directory name &gt; &lt; web service path like- http://webservicehost/webservice/service.disco &gt;&lt;br /&gt; &lt;br /&gt;Now use another command-line utility called wsdl.exe that can generate Web Service proxies(.cs/.vb) from WSDL documents or the .discomap files generated by disco.exe. You can run it like so:&lt;br /&gt;&lt;br /&gt;wsdl.exe /l:CS /out: &lt; path of .cs file &gt; &lt; resuls.discomap &gt;&lt;br /&gt;&lt;br /&gt;Now you can use these .cs/.vb proxy classes in your code just like other source files.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Discovery with UDDI&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The Universal Discovery, Description, and Integration (UDDI) project provides a global directory of Web Services. UDDI enables consumers to search and locate Web services if the consumer is not aware of the exact location of the service or the owner of the service. UDDI is for Web services like Google is for Web pages. UDDI allows us to easily find Web services based on a centralized and globally available registry of businesses which are accessible over the Internet. If you have a Web service and if you wish to publish it with UDDI then you need to visit the UDDI web site and register your service there. &lt;br /&gt;Microsoft and IBM (who, with Ariba, are jointly developing UDDI) both have operating sites up and running today at http://uddi.microsoft.com and http://www-3.ibm.com/services/uddi/, respectively.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://msdn.microsoft.com/msdnmag/issues/02/02/xml/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-5601216111661728319?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/5601216111661728319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=5601216111661728319' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5601216111661728319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5601216111661728319'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/disco-and-uddi.html' title='Disco And UDDI'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-393091933720904144</id><published>2007-06-14T05:34:00.000-07:00</published><updated>2007-06-14T05:38:36.409-07:00</updated><title type='text'>Implementing AJAX in asp.net application using XMLHttp</title><content type='html'>XMLHttp is an object that was originally designed by Microsoft to provide client-side access to XML documents on remote servers through the HTTP protocol. It exposes a simple API, which allows you to send requests (GET/POSTS) and get the resultant XML, HTML or binary data.&lt;br /&gt;&lt;br /&gt;Here, I am using same problem that I have used in the previous post.&lt;br /&gt;&lt;br /&gt;Problem: We have a dropdown server control on our web page that we want to populate with users name from the user table in the database when user clicks on the populate button without flickering effect on the web page.&lt;br /&gt;&lt;br /&gt;Follow these steps for implementing ajax solution to this problem in your web application using XMLHttp.&lt;br /&gt;&lt;br /&gt;1. Add dropdown control and Pupulate button on the web page.&lt;br /&gt;&lt;br /&gt;User Name : &lt; asp:DropDownList ID="ddlUsers"  runat="server" Width="100%" &gt;&lt;br /&gt;            &lt;/ asp:DropDownList &gt;&lt;br /&gt;&lt; input id="btnFill" onclick="getusername()" type="button" value="Fill Users using XMLHttp" /&gt;&lt;br /&gt;&lt;br /&gt;2. Write following java script on the aspx page.&lt;br /&gt;&lt;br /&gt;&lt; script language="javascript" type="text/javascript" &gt;&lt;br /&gt;function getusername()&lt;br /&gt;    {&lt;br /&gt; var Url ;&lt;br /&gt; Url ='ProcessXMLHttp.aspx';&lt;br /&gt;        var oServerXMLHTTP = createXMLHttp();&lt;br /&gt; /*oServerXMLHTTP.open("GET", Url, false);*/&lt;br /&gt; oServerXMLHTTP.open("POST", Url, false);&lt;br /&gt; // because we're using POST, we need to set some headers.&lt;br /&gt; oServerXMLHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); &lt;br /&gt; oServerXMLHTTP.setRequestHeader("Content-Length",0)&lt;br /&gt;&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;     oServerXMLHTTP.send();&lt;br /&gt;     var Response =oServerXMLHTTP.responseText.split(',');&lt;br /&gt;  &lt;br /&gt;     var user=document.getElementById('&lt;%=ddlUsers.ClientID%&gt;');&lt;br /&gt;     var tab=document.createElement('table');&lt;br /&gt;        for(i=0;i &lt; Response.length;i++)&lt;br /&gt;        {&lt;br /&gt;  &lt;br /&gt;            user.options[user.options.length]=new Option(Response[i],i);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt; catch(e)&lt;br /&gt; {&lt;br /&gt;     &lt;br /&gt; } &lt;br /&gt; return true;&lt;br /&gt; &lt;br /&gt;    }&lt;br /&gt;function createXMLHttp()&lt;br /&gt; { &lt;br /&gt; if (typeof XMLHttpRequest != "undefined") &lt;br /&gt; { &lt;br /&gt;     return new XMLHttpRequest(); &lt;br /&gt; } &lt;br /&gt; else if (window.ActiveXObject) &lt;br /&gt; { &lt;br /&gt;     var aVersions = [ "MSXML2.XMLHttp.5.0", &lt;br /&gt;     "MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0", &lt;br /&gt;     "MSXML2.XMLHttp","Microsoft.XMLHttp"]; &lt;br /&gt; for (var i = 0; i &lt; aVersions.length; i++)&lt;br /&gt;     { &lt;br /&gt;         try &lt;br /&gt;         { &lt;br /&gt;         var oXmlHttp = new ActiveXObject(aVersions[i]); &lt;br /&gt;         return oXmlHttp; &lt;br /&gt;         } &lt;br /&gt;         catch (oError)&lt;br /&gt;          { &lt;br /&gt;         //Do nothing &lt;br /&gt;         } &lt;br /&gt;     } &lt;br /&gt; } &lt;br /&gt; throw new Error("XMLHttp object could be created."); &lt;br /&gt;} &lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;In this script I have used post method for http request, you can also use Get method that I have commented out in the script.&lt;br /&gt;&lt;br /&gt;3. Now create ProcessXMLHttp.aspx page that you have passed as a url to the open method of XMLHttp object and write following code in its cs file.&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        GetUsers();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void GetUsers()&lt;br /&gt;    {&lt;br /&gt;        IBLLService ObjBLLService = BLLServiceFactory.GetBLLService();&lt;br /&gt;        DataSet Ds = ObjBLLService.GetData();&lt;br /&gt;&lt;br /&gt;        Response.Clear();&lt;br /&gt;        string str=String.Empty;&lt;br /&gt;        for (int i = 0; i &lt; Ds.Tables[0].Rows.Count; i++)&lt;br /&gt;            if(i==Ds.Tables[0].Rows.Count-1)&lt;br /&gt;            str = str + Ds.Tables[0].Rows[i][0].ToString() ;&lt;br /&gt;            else&lt;br /&gt;            str = str + Ds.Tables[0].Rows[i][0].ToString() + ",";&lt;br /&gt;&lt;br /&gt;        Response.Write(str);&lt;br /&gt;        Response.End();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;In the GetUsers method, Replace the following lines with your own code to get the users name data from the DB.&lt;br /&gt;&lt;br /&gt; IBLLService ObjBLLService = BLLServiceFactory.GetBLLService();&lt;br /&gt;        DataSet Ds = ObjBLLService.GetData();&lt;br /&gt;&lt;br /&gt;4. Now you are finished with the coding, its time to test it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-393091933720904144?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/393091933720904144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=393091933720904144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/393091933720904144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/393091933720904144'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/implementing-ajax-in-aspnet-application_14.html' title='Implementing AJAX in asp.net application using XMLHttp'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2396526332438897488</id><published>2007-06-14T03:26:00.000-07:00</published><updated>2007-06-14T06:03:17.486-07:00</updated><title type='text'>Implementing AJAX in asp.net application using Ajax.dll</title><content type='html'>Problem: We have a dropdown server control on our web page that we want to populate with users name from the user table in the database when user clicks on the populate button without flickering effect on the web page.&lt;br /&gt;&lt;br /&gt;Follow these steps for implementing ajax solution to this problem in your web application using ajax.dll&lt;br /&gt;&lt;br /&gt;1. Download the latest version of ajax.dll from the following link:&lt;br /&gt;&lt;br /&gt;http://ajax.schwarz-interactive.de/csharpsample/default.aspx&lt;br /&gt;&lt;br /&gt;2. Add the httphandler for ajax in the web.config file of your web app.&lt;br /&gt;   Example-&lt;br /&gt;&lt; httpHandlers &gt;&lt;br /&gt;&lt; add verb="POST, GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/&gt;&lt;br /&gt;&lt; /httpHandlers &gt;&lt;br /&gt;&lt;br /&gt;3. Register the aspx.cs class with the ajax.&lt;br /&gt;   Exlample-&lt;br /&gt;    protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        &lt;br /&gt;        Ajax.Utility.RegisterTypeForAjax(typeof(AjaxDemo));&lt;br /&gt;       &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;AjaxDemo -is the class name.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Now create the serverside ajax method in the .aspx.cs file.&lt;br /&gt;   Example-&lt;br /&gt;&lt;br /&gt;    [Ajax.AjaxMethod]&lt;br /&gt;    public DataSet GetUsers()&lt;br /&gt;    {&lt;br /&gt;        IBLLService ObjBLLService = BLLServiceFactory.GetBLLService();&lt;br /&gt;        DataSet Ds=ObjBLLService.GetData();&lt;br /&gt;        return Ds;&lt;br /&gt;    }&lt;br /&gt;In the GetUsers method, Replace the existing code with your own code to get the users name data from the DB.&lt;br /&gt;&lt;br /&gt;5.Write following java script on the .aspx page.&lt;br /&gt;&lt;br /&gt;&lt; script language="javascript" type="text/javascript" &gt;&lt;br /&gt;    &lt;br /&gt;    function getusername()&lt;br /&gt;    {&lt;br /&gt;    AjaxDemo.GetUsers(fillusers);&lt;br /&gt;    }&lt;br /&gt;    function fillusers(Response)&lt;br /&gt;    {&lt;br /&gt;    if(Response!=null)&lt;br /&gt;    {&lt;br /&gt;    var tab=Response.value.Tables[0];&lt;br /&gt;    var user=document.getElementById('&lt;%=ddlUsers.ClientID%&gt;');&lt;br /&gt;    for(i=0;i &lt; tab.Rows.length;i++)&lt;br /&gt;    {&lt;br /&gt;        var ro=tab.Rows[i];&lt;br /&gt;        user.options[user.options.length]=new Option(ro.firstname,i); // firstname is the field name in the DB table.&lt;br /&gt;    }&lt;br /&gt;    }&lt;br /&gt;    }&lt;br /&gt;&lt; /script &gt;&lt;br /&gt;&lt;br /&gt;Add dropdown control and Pupulate button on the web page.&lt;br /&gt;&lt;br /&gt;User Name : &lt; asp:DropDownList ID="ddlUsers"  runat="server" Width="100%" &gt;&lt;br /&gt;            &lt;/ asp:DropDownList &gt;&lt;br /&gt;&lt; input id="btnFill" onclick="getusername()" type="button" value="Fill Users using Ajax dll" /&gt;&lt;br /&gt;&lt;br /&gt;6. We are finished with the coding now its time to test it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2396526332438897488?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2396526332438897488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2396526332438897488' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2396526332438897488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2396526332438897488'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/implementing-ajax-in-aspnet-application.html' title='Implementing AJAX in asp.net application using Ajax.dll'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4616866249095954387</id><published>2007-06-14T00:02:00.000-07:00</published><updated>2007-06-14T00:03:26.487-07:00</updated><title type='text'>The Document Object Model (DOM)</title><content type='html'>The Document Object Model (DOM) is an application programming interface (API) for valid HTML and well-formed XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated With DOM API, programmers can build documents, navigate their structure, and add, modify, or delete elements and content. Anything found in an HTML or XML document can be accessed, changed, deleted, or added using DOM API.&lt;br /&gt;Its a W3C specification, one important objective for the DOM is to provide a standard programming interface that can be used in a wide variety of environments and applications.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://www.w3.org/TR/DOM-Level-2-Core/introduction.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4616866249095954387?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4616866249095954387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4616866249095954387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4616866249095954387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4616866249095954387'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/document-object-model-dom.html' title='The Document Object Model (DOM)'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4843648884848427601</id><published>2007-06-13T23:41:00.000-07:00</published><updated>2007-06-13T23:42:57.585-07:00</updated><title type='text'>Service-oriented architecture (SOA)</title><content type='html'>SOA is an architectural style whose goal is to achieve loose coupling among interacting software agents. A service is a unit of work done by a service provider to achieve desired end results for a service consumer. Both provider and consumer are roles played by software agents on behalf of their owners.&lt;br /&gt;SOA-based systems inter-operate based on a formal definition (or contract, e.g., WSDL) that is independent of the underlying platform (such as Java, .NET etc) and programming language (like. C#, Java). Services written in C# running on .NET platforms and services written in Java running on Java EE platforms, for example, can both be consumed by a common composite application. Applications running on either platform can also consume services running on the other as Web services, which facilitates reuse.&lt;br /&gt;For more information on the topic checkout following references.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://en.wikipedia.org/wiki/Service-oriented_architecture&lt;br /&gt;http://webservices.xml.com/pub/a/ws/2003/09/30/soa.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4843648884848427601?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4843648884848427601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4843648884848427601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4843648884848427601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4843648884848427601'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/service-oriented-architecture-soa.html' title='Service-oriented architecture (SOA)'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3901390508302853264</id><published>2007-06-13T22:37:00.000-07:00</published><updated>2007-06-13T23:40:49.813-07:00</updated><title type='text'>Session State Management using SQLServer</title><content type='html'>To configure session state management in a web application we have to use the sessionState section of the web.config file. sessionState can have following mode.&lt;br /&gt;&lt;br /&gt;1.Off - Indicates that the session state is turned off.&lt;br /&gt;2. InProc - session kept as live objects in web server (aspnet_wp.exe). Use "cookieless" configuration in web.config to add the sessionId onto the URL.&lt;br /&gt;3. StateServer - session serialized and stored in memory in a separate process (aspnet_state.exe). State Server can run on another machine. &lt;br /&gt;4. SQLServer - session serialized and stored in SQL server. &lt;br /&gt;5. Custom - Indicates that you will have a custom mechanism of session storage using a provider model of ASP.NET.&lt;br /&gt;&lt;br /&gt;Now to maintain session state with SQL server,first, we have to configure SQL server.&lt;br /&gt;&lt;br /&gt;Actually we need special database to maintain session state with the SQL server and .Net Framework provides us sql scripts for this purpose. Following is the list of these sql scripts.&lt;br /&gt;&lt;br /&gt;-&gt; InstallSqlState.sql-- Contains scripts to set up database for state management. Its creates database "ASPSTATE" that  contains stored procedures that create tables in tempdb. The tables(ASPStateTempSessions and ASPStateTempApplications) in tempdb are where session state is actually stored. Thus, when the SQL Server is shutdown, all session state is lost. It also creates a job called State_Job_DeleteExpiredSessions to delete expired sessions from tempdb. Recall that ASP.NET does not keep session resources alive indefinitely. To support this feature when a SQL Server is used to maintain state, the SQL Server Agent must be running so that the expired session deletion job runs as needed.&lt;br /&gt;&lt;br /&gt;-&gt; UninstallSqlState.sql-- Contains scripts for droping the database (ASPSTATE) and all supporting objects (e.g., the job to delete expired sessions). But before running this script, stop the Web server service to avoid any error Or use the SQL Server Enterprise Manager and find the processes accessing the ASPState database and delete them.&lt;br /&gt;&lt;br /&gt;-&gt; InstallPersistSqlState.sql-- contains scripts to set up database  for persistent state management. It causes the session state data to be stored in permanent tables in ASPState instead of temporary tables in tempdb.&lt;br /&gt;&lt;br /&gt;-&gt; UninstallPersistSqlState.sql-- Contains scripts for droping the database (ASPSTATE) and all supporting objects (e.g., the job to delete expired sessions).&lt;br /&gt;&lt;br /&gt;-&gt; InstallSqlStateTemplate.sql / UninstallSqlStateTemplate.sql--&lt;br /&gt;   These are templates files for installing the ASP.NET session state SQL objects&lt;br /&gt;   on a database other than the default 'ASPState'.&lt;br /&gt;   To create your own script files based on the template:&lt;br /&gt;   1. Create your own script files by coping the two template files.&lt;br /&gt;   2. Decide a name for your database (e.g. MyASPStateDB)&lt;br /&gt;   3. In your own script files, replace all occurences of "DatabaseNamePlaceHolder"&lt;br /&gt;      by your database name.&lt;br /&gt;   4. Install and uninstall ASP.NET session state SQL objects using your own&lt;br /&gt;      script files.&lt;br /&gt;&lt;br /&gt;You can run these file either in SQL Query Analyzer or using command line tool aspnet_regsql.exe.&lt;br /&gt;&lt;br /&gt;Now use the sessionState section of the web.config file to configure an ASP.NET Web application to use a SQL Server for session state management.&lt;br /&gt;&lt;br /&gt; &lt; sessionState&lt;br /&gt;    mode="SQLServer" &lt;br /&gt;    stateConnectionString="tcpip=localhost"&lt;br /&gt;    sqlConnectionString="data source=localhost;user id=sa;password=kkak"&lt;br /&gt;    cookieless="false"&lt;br /&gt;    timeout="20" /&gt;&lt;br /&gt;&lt;br /&gt;In case you have setup custom database for the session state management using InstallSqlStateTemplate.sql then add database name in the sqlConnectionString. Like...&lt;br /&gt;&lt;br /&gt;&lt; sessionState&lt;br /&gt;    mode="SQLServer" &lt;br /&gt;    stateConnectionString="tcpip=localhost"&lt;br /&gt;    sqlConnectionString="data source=localhost; database=MyASPStateDB;user id=sa;password=kkak"&lt;br /&gt;    cookieless="false"&lt;br /&gt;    timeout="20" /&gt;&lt;br /&gt;&lt;br /&gt;Note: The session state timeout interval is specified by using the timeout parameter.By default ASP .NET uses cookies to identify which requests belong to a particular session.If cookies are not available, a session can be tracked by adding a session identifier to the URL. To disable cookies, set sessionState cookieless="true".&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://www.dbazine.com/sql/sql-articles/cook9&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3901390508302853264?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3901390508302853264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3901390508302853264' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3901390508302853264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3901390508302853264'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/session-state-management-using.html' title='Session State Management using SQLServer'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1727993124469263885</id><published>2007-06-13T00:31:00.000-07:00</published><updated>2007-06-13T02:04:53.054-07:00</updated><title type='text'>Difference between Destructor, Dispose and Finalize methods</title><content type='html'>Here, I have given a brief description of these 3 methods.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Destructor&lt;/strong&gt;&lt;br /&gt;They are special methods that contains clean up code for the object. You can not call them explicitly in your code as they are called implicitly by GC. In C# they have same name as the class name preceded by the "~" sign. Like-&lt;br /&gt;&lt;br /&gt;Class MyClass&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; ~MyClass()&lt;br /&gt; {&lt;br /&gt; .....&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In VB.NET, destructors are implemented by overriding the Finalize method of the System.Object class.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Dispose&lt;/strong&gt;&lt;br /&gt;These are just like any other methods in the class and can be called explicitly but they have a special purpose of cleaning up the object. In the dispose method we write clean up code for the object. It is important that we  freed up all the unmanaged recources in the dispose method like database connection, files etc.&lt;br /&gt;The class implementing dispose method should implement IDisposable interface.A Dispose method should call the GC.SuppressFinalize method for the object it is disposing if the class has desturctor because it has already done the work to clean up the object, then it is not necessary for the garbage collector to call the object's Finalize method.&lt;br /&gt;Reference: http://msdn2.microsoft.com/en-us/library/aa720161(VS.71).aspx&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Finalize&lt;/strong&gt;&lt;br /&gt;A Finalize method acts as a safeguard to clean up resources in the event that your Dispose method is not called. You should only implement a Finalize method to clean up unmanaged resources. You should not implement a Finalize method for managed objects, because the garbage collector cleans up managed resources automatically. Finalize method is called by the GC implicitly therefore you can not call it from your code.&lt;br /&gt;&lt;br /&gt;Note: In C#, Finalize method can not be override, so you have to use destructor whose internal implementation will override the Finalize method in MSIL.But in the VB.NET, Finalize method can be override because it does support destructor method.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1727993124469263885?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1727993124469263885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1727993124469263885' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1727993124469263885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1727993124469263885'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/difference-between-destructor-dispose.html' title='Difference between Destructor, Dispose and Finalize methods'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3020057611714308702</id><published>2007-06-12T23:37:00.000-07:00</published><updated>2007-06-12T23:41:21.553-07:00</updated><title type='text'>Error: Do not override object.Finalize. Instead, provide a destructor.</title><content type='html'>You cannot call or override the Object.Finalize method from the C#. Because C# provides destructors as the mechanism for writing finalization code. You must use the destructor syntax in C# to perform cleanup operations. This syntax is convenient because it implicitly calls the Finalize method for an object's base class. This guarantees that Finalize is called for all levels of destructors from which the current class is derived.&lt;br /&gt;&lt;br /&gt;Suppose you have written a destructor in your code, like this:&lt;br /&gt;&lt;br /&gt;~DemoClass()&lt;br /&gt;{&lt;br /&gt;   // Perform some cleanup operations here.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This code implicitly translates to the following:&lt;br /&gt;&lt;br /&gt;protected override void Finalize()&lt;br /&gt;{&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;      // Perform some cleanup operations here.&lt;br /&gt;   }&lt;br /&gt;   finally&lt;br /&gt;   {&lt;br /&gt;      base.Finalize();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;So if you have a destructor in your class and your are also trying to override Finalize function then you wil l get following build error.&lt;br /&gt;&lt;br /&gt;"Type already defines a member called 'Finalize' with the same parameter types."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3020057611714308702?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3020057611714308702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3020057611714308702' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3020057611714308702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3020057611714308702'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/error-do-not-override-objectfinalize.html' title='Error: Do not override object.Finalize. Instead, provide a destructor.'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-729351331129831431</id><published>2007-06-12T05:30:00.000-07:00</published><updated>2007-06-12T05:43:54.705-07:00</updated><title type='text'>ClickOnce</title><content type='html'>ClickOnce is new windows based application deployment technology. It has made the deployment of windows based application quite easy. It’s rightly called clickonce because end-user can install application published using this technology by just single click.&lt;br /&gt;&lt;br /&gt;To publish your windows application follows these steps:&lt;br /&gt;&lt;br /&gt;1. Open the property of your windows project and choose the publish tab.&lt;br /&gt;2. Now click on publish wizard button.&lt;br /&gt;3. Publish wizard window will open, alternatively you can open this wizard from Build-&gt;Publish locattion in the menue.&lt;br /&gt;4. Now specify the location on the harddisk where you want to create publish folder and click next.&lt;br /&gt;5. Now choose the installation method like from website,from UNC path or from CD and click next.&lt;br /&gt;6. Then choose whether the application will be available offline or not and click next.&lt;br /&gt;7. Last, click on finish.&lt;br /&gt;&lt;br /&gt;If you have choosen installation from website option then clickonce application will open in the IE. On the web page you have to just click on install button to install the application.&lt;br /&gt;&lt;br /&gt;ClickOnce applications can be deployed via web servers, file servers or CDs. You can also configure during publishing whether the application should check for an update or not.&lt;br /&gt;&lt;br /&gt;Reference: http://msdn2.microsoft.com/en-us/netframework/aa497348.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-729351331129831431?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/729351331129831431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=729351331129831431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/729351331129831431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/729351331129831431'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/clickonce.html' title='ClickOnce'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1094805031632563320</id><published>2007-06-12T04:24:00.000-07:00</published><updated>2007-06-12T04:25:33.873-07:00</updated><title type='text'>SessionId changes with every request in the asp.net2.0 application</title><content type='html'>For any web programmer, its obvious to think and believe that SessionId remains same through out the user sessiona and it was right till asp.net1.1. But in asp.net2.0, this behavior has changed. In the asp.net application new sessionid is returned with the response to every request.&lt;br /&gt;&lt;br /&gt;According to MSDN the reason/solution is:&lt;br /&gt;&lt;br /&gt;"When using cookie-based session state, ASP.NET does not allocate storage for session data until the Session object is used. As a result, a new session ID is generated for each page request until the session object is accessed. If your application requires a static session ID for the entire session, you can either implement the Session_Start method in the application's Global.asax file and store data in the Session object to fix the session ID, or you can use code in another part of your application to explicitly store data in the Session object."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1094805031632563320?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1094805031632563320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1094805031632563320' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1094805031632563320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1094805031632563320'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/sessionid-changes-with-every-request-in.html' title='SessionId changes with every request in the asp.net2.0 application'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8769360793417282656</id><published>2007-06-12T03:37:00.000-07:00</published><updated>2007-06-12T03:47:36.103-07:00</updated><title type='text'>IIS 6.0 Process Model</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_bXen--6DV8Q/Rm54tD-ulCI/AAAAAAAAAAU/CfiNNCAHNr0/s1600-h/IIS6RequestProcess.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_bXen--6DV8Q/Rm54tD-ulCI/AAAAAAAAAAU/CfiNNCAHNr0/s320/IIS6RequestProcess.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5075126545650979874" /&gt;&lt;/a&gt;&lt;br /&gt;The IIS 6 process model is the default model on machines running Windows 2003 Server operating system. It introduces several changes and improvements over the IIS 5 process model. One of the biggest changes is the concept of application pools. On IIS 5.X all web applications, that is, all AppDomains, were hosted by the ASP.NET worker process. To achieve a finer granularity over security boundaries and personalization, the IIS 6 process model allows applications to run inside different copies of a new worker process, w3wp.exe. Each application pool can contain multiple AppDomains and is hosted in a single copy of the worker process. In other words, the shift is from a single process hosting all applications to multiple processes hosting each an application pool. This model is also called the worker process isolation mode.&lt;br /&gt;Another change is that in IIS 6 request is received at lower kernal level and routed by http.sys to the application pools unlike in IIS 5.X where request is received by a user process called  inetinfo.exe.&lt;br /&gt;Each application pool has its own w3wp.exe worker process. The w3wp.exe worker process, differently from the aspnet_wp.exe process used in IIS 5 model, isn’t ASP.NET specific, and is used to handle any kind of requests. The specific worker process then decides which ISAPI modules to load according to the type of resources it needs to serve.&lt;br /&gt;&lt;br /&gt;Reference: http://dotnetslackers.com/articles/iis/ASPNETInternalsIISAndTheProcessModel.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8769360793417282656?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8769360793417282656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8769360793417282656' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8769360793417282656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8769360793417282656'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/iis-60-process-model.html' title='IIS 6.0 Process Model'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_bXen--6DV8Q/Rm54tD-ulCI/AAAAAAAAAAU/CfiNNCAHNr0/s72-c/IIS6RequestProcess.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-5041585992896239730</id><published>2007-06-12T03:26:00.000-07:00</published><updated>2007-06-12T03:37:19.138-07:00</updated><title type='text'>IIS 5.X Process Model</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_bXen--6DV8Q/Rm51Fz-ulBI/AAAAAAAAAAM/zF55naGhoII/s1600-h/IIS5RequestProcess.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_bXen--6DV8Q/Rm51Fz-ulBI/AAAAAAAAAAM/zF55naGhoII/s320/IIS5RequestProcess.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5075122572806231058" /&gt;&lt;/a&gt;&lt;br /&gt;This is the default process model available on Windows 2000 and XP machines. As mentioned it consists in the IIS inetinfo.exe process listening by default on the TCP port 80 for incoming HTTP requests and queuing them into a single queue, waiting to be processed. If the request is specific to ASP.NET, the processing is delegated to the ASP.NET ISAPI extension, aspnet_isapi.dll. This, in turn, communicates with the ASP.NET worker process, aspnet_wp.exe via named pipes and finally is the worker process which takes care of delivering the request to the ASP.NET HTTP runtime environment.&lt;br /&gt;Therefore all ASP.NET web applications hosted on IIS are actually hosted inside the worker process, too. However, this doesn’t mean that all the applications are run under the same context and share all their data. As mentioned, ASP.NET introduces the concept of AppDomain, which is essentially a sort of managed lightweight process which provides isolation and security boundaries. Each IIS virtual directory is executed in a single AppDomain, which is loaded automatically into the worker process whenever a resource belonging to that application is requested for the first time. Once the AppDomain is loaded – that is, all the assemblies required to satisfy that request are loaded into the AppDomain – the control is actually passed to the ASP.NET pipeline for the actual processing. Multiple AppDomains can thus run under the same process, while requests for the same AppDomain can be served by multiple threads. However, a thread doesn’t belong to an AppDomain and can serve requests for different AppDomains, but at a given time a thread belongs to a single AppDomain.&lt;br /&gt;&lt;br /&gt;Reference: http://dotnetslackers.com/articles/iis/ASPNETInternalsIISAndTheProcessModel.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-5041585992896239730?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/5041585992896239730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=5041585992896239730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5041585992896239730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/5041585992896239730'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/iis-5x-process-model.html' title='IIS 5.X Process Model'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_bXen--6DV8Q/Rm51Fz-ulBI/AAAAAAAAAAM/zF55naGhoII/s72-c/IIS5RequestProcess.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-697168169885510230</id><published>2007-06-12T02:56:00.000-07:00</published><updated>2007-06-12T03:24:43.098-07:00</updated><title type='text'>The ASP.NET Process Model</title><content type='html'>&lt;strong&gt;Uder IIS 5.X&lt;/strong&gt;, all ASP.NET-related requests received by the inetinfo.exe  are delegated to aspnet_isapi.dll. It dispatches these request to an external worker process called aspnet_wp.exe. The aspnet_isapi.dll, hosted in the IIS process inetinfo.exe, passes the control to aspnet_wp.exe, along with all the information concerning the incoming request. The communication between the two is performed via named pipes, a well known mechanism for IPC (Inter Process Communication). The ASP.NET worker process performs a considerable number of tasks, together with the ISAPI extension. Each web application, corresponding to a different virtual directory hosted on IIS, is executed in the context of the same process, the ASP.NET worker process. To provide isolation and abstraction from the execution context the ASP.NET model introduces the concept of Application Domains, in brief AppDomains. They can be considered as lightweight processes.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Under IIS 6&lt;/strong&gt;, incoming requests are handled by Http.sys program at lower – Kernel – level. Then It routes the request to the right application pool. A worker process (W3wp.exe) is attached with every application pool.&lt;br /&gt;In IIS6.0, aspnet_wp.exe process is not used, in favour of another process called w3wp.exe. Furthermore, inetinfo.exe is no longer used to forward HTTP requests to ISAPI extensions, although it keeps running for serving other protocols requests.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-697168169885510230?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/697168169885510230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=697168169885510230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/697168169885510230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/697168169885510230'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/aspnet-process-model.html' title='The ASP.NET Process Model'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-1071499710470837451</id><published>2007-06-12T01:08:00.000-07:00</published><updated>2007-06-12T01:18:27.658-07:00</updated><title type='text'>.NET 2.0 transaction model</title><content type='html'>Currently .net provides 3 transaction models.&lt;br /&gt;&lt;br /&gt;1. Using ADO.NET data providers.&lt;br /&gt;2. Using enterprise services transaction.&lt;br /&gt;3. Using System.Transactions for .NET Framework 2.0 &lt;br /&gt;&lt;br /&gt;The first 2 models have some shortcoming that we are going to discuss now.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. The ADO.NET transaction model&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In the transaction model we can not update more than one database in single transaction.&lt;br /&gt;&lt;br /&gt;Lets have an example:&lt;br /&gt;&lt;br /&gt;SqlConnection con = new SqlConnection("Connection String");&lt;br /&gt;SqlTransaction tr = con.BeginTransaction();&lt;br /&gt;SqlCommand cmd = new SqlCommand("Update query", con, tr);&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;cmd.ExecuteNonQuery();&lt;br /&gt;tr.Commit();&lt;br /&gt;}&lt;br /&gt;catch (Exception exc)&lt;br /&gt;{&lt;br /&gt;tr.Rollback();&lt;br /&gt;}&lt;br /&gt;finally&lt;br /&gt;{&lt;br /&gt;con.Close();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In the code above, the transaction object is actually created from a connection to a single database. So there is no direct way of grouping updates to more than one database into a single transaction.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Enterprise services transactions&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Though this model remove the shortcoming of the previous model as it provides distributed transaction manager that enable you to have transactions independent of the database but it also has some shortcomings:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;*&lt;/strong&gt; Class needs to inherit from the ServicedComponent class to implement enterprise service transactions that restrict your class from inheriting from any other base class.&lt;br /&gt;&lt;strong&gt;*&lt;/strong&gt; It takes transaction as a distributed transaction. Even if single database is involved, enterprise services will still take it as a distributed transaction and handle it as such. As a result, it using more resources than needed. &lt;br /&gt;&lt;strong&gt;*&lt;/strong&gt; The assembly you create need to be deployed in component services to run under the COM+ context.For that assembly must be strong named and registered using regsvcs.exe utility.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Introducing System.Transactions&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The System.Transactions model is a new addition to the .NET 2.0 framework. It addresses the shortcomings in the &lt;br /&gt;&lt;br /&gt;above discussed models, and brings the best features of the ADO.NET and enterprise services transaction models &lt;br /&gt;&lt;br /&gt;together.&lt;br /&gt;In System.Transactions, you have the TransactionScope object you can use to scope a set of statements and group &lt;br /&gt;&lt;br /&gt;them under one transaction. &lt;br /&gt;Example - &lt;br /&gt;&lt;br /&gt;C# Code&lt;br /&gt;class AccountManager&lt;br /&gt;{&lt;br /&gt;void TransferCash(Account from, Account to, double amt)&lt;br /&gt;{&lt;br /&gt;using(TransactionScope scope=new TransactionScope())&lt;br /&gt;{&lt;br /&gt;from.Withdraw(amt);&lt;br /&gt;to.Deposit(amt);&lt;br /&gt;scope.Complete();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;As you can see in the code above, class needs not to inherit from any other class. System.Transactions is smart &lt;br /&gt;&lt;br /&gt;enough to decide whether to use a distributed transaction or not. In case of single database is involved, it &lt;br /&gt;&lt;br /&gt;uses lightweight transaction and if there are multiple databases involved, it will use a distributed &lt;br /&gt;&lt;br /&gt;transaction.&lt;br /&gt;&lt;br /&gt;Reference: http://www.simple-talk.com/dotnet/.net-framework/.net-2.0-transaction-model/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-1071499710470837451?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/1071499710470837451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=1071499710470837451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1071499710470837451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/1071499710470837451'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/net-20-transaction-model.html' title='.NET 2.0 transaction model'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-8429487943830398918</id><published>2007-06-11T23:51:00.000-07:00</published><updated>2007-06-11T23:53:36.606-07:00</updated><title type='text'>Internet Explorer does not show contents of App_offline.htm</title><content type='html'>It happens because under default configuration, Internet Explorer first looks at the page size and if it's less than 512 bytes 404 status code friendly message is displayed instead of your App_offline.htm content.&lt;br /&gt;&lt;br /&gt;So if you use the app_offline.htm feature, you should make sure you have at least 512 bytes of content within it to make sure that IE shows its content instead of 404 status code friendly message.&lt;br /&gt;&lt;br /&gt;Configure "Show Friendly Http Errors" feature of IE6.&lt;br /&gt;&lt;br /&gt;This can be configured in the Tools-&gt;Internet Options-&gt;Advanced tab within IE, and is on by default with IE6.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-8429487943830398918?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/8429487943830398918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=8429487943830398918' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8429487943830398918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/8429487943830398918'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/internet-explorer-does-not-show.html' title='Internet Explorer does not show contents of App_offline.htm'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-6184529704164096113</id><published>2007-06-11T23:33:00.000-07:00</published><updated>2007-06-11T23:34:06.077-07:00</updated><title type='text'>Temporarily shut down your ASP.NET 2.0 web application</title><content type='html'>There is a simple way to bring down your ASP.NET 2.0 application. The only thing you have to do is to create simple html file called App_offline.htm and add it to your ASP.NET 2.0 web application root directory.&lt;br /&gt;&lt;br /&gt;After you add this file in your web app, ASP.NET 2.0 runtime stops the application and unloads whole application domain. It stops processing new incomming requests and serves your App_offline.htm file insted. Because whole application domain is unloaded all application files and assemblies are now unlocked and you can make any necessary changes.&lt;br /&gt;&lt;br /&gt;When you want to make your web application online, just exclude/delete/rename App_offline.htm file from your web project.&lt;br /&gt;&lt;br /&gt;when using App_offline.htm file to temporarily shut down your ASP.NET 2.0 web application. When this file is present, all requests are served with this file and returned with status code 404 Not Found whereas web application pages are only temporarily unavailable, but this status code says they were not found.Search engine spiders would interpret this status code and remove requested page from their search database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-6184529704164096113?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/6184529704164096113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=6184529704164096113' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6184529704164096113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/6184529704164096113'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/temporarily-shut-down-your-aspnet-20.html' title='Temporarily shut down your ASP.NET 2.0 web application'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2312512494933098328</id><published>2007-06-11T23:02:00.000-07:00</published><updated>2007-06-11T23:03:15.344-07:00</updated><title type='text'>Different types of GNU licence</title><content type='html'>GNU is a recursive acronym for "GNU's Not Unix". The GNU project was announced in 1983 by Richard Stallman with the goal of creating a complete operating system -- called the GNU system or simply GNU -- that is free software, meaning that users are allowed to copy, modify and redistribute it. The GNU project is now carried out under the auspices of the Free Software Foundation (FSF).&lt;br /&gt;&lt;br /&gt;There are 3 types of GNU licence.&lt;br /&gt;&lt;br /&gt;1. GPL - GNU General Public Licence&lt;br /&gt;&lt;br /&gt;Under this licence, disclosure of source code to the target audience is necessary.&lt;br /&gt;&lt;br /&gt;2. LGPL - GNU Lesser General Public License&lt;br /&gt;&lt;br /&gt;It applies to certain designated libraries, and&lt;br /&gt;is quite different from the ordinary General Public License.  We use&lt;br /&gt;this license for certain libraries in order to permit linking those&lt;br /&gt;libraries into non-free programs.&lt;br /&gt;&lt;br /&gt;3. GFDL - GNU Free Documentation License&lt;br /&gt;&lt;br /&gt;The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially.&lt;br /&gt;&lt;br /&gt;Reference: http://www.gnu.org/licenses/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2312512494933098328?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2312512494933098328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2312512494933098328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2312512494933098328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2312512494933098328'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/different-types-of-gnu-licence.html' title='Different types of GNU licence'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-2389868633359423624</id><published>2007-06-11T22:13:00.000-07:00</published><updated>2007-06-11T22:31:09.507-07:00</updated><title type='text'>Merging Data of the DataTables in the ADO.NET1.1</title><content type='html'>Here, I am giving 3 code samples for merging data from the datatables.&lt;br /&gt;&lt;br /&gt;//common code&lt;br /&gt;&lt;br /&gt;SqlConnection con=new SqlConnection(@"server=localhost\sqlexpress;database=demo;uid=sa;pwd=kkak");&lt;br /&gt;con.Open();&lt;br /&gt;SqlDataAdapter da1=new SqlDataAdapter("select * from table1",con);&lt;br /&gt;SqlDataAdapter da2=new SqlDataAdapter("select * from table2",con);&lt;br /&gt;&lt;br /&gt;// sample -1&lt;br /&gt;&lt;br /&gt;DataSet ds1=new DataSet();&lt;br /&gt;da1.Fill(ds1,"table1");&lt;br /&gt;DataSet ds2=new DataSet();&lt;br /&gt;da2.Fill(ds2,"table2");&lt;br /&gt;ds1.Merge(ds2.Tables["table2"]);&lt;br /&gt;&lt;br /&gt;// sample -2&lt;br /&gt;&lt;br /&gt;DataSet ds1=new DataSet();&lt;br /&gt;da1.Fill(ds1,"table1");&lt;br /&gt;DataTable dt2=ds1.Tables["table1"].Clone();&lt;br /&gt;da2.Fill(dt2);&lt;br /&gt;ds1.Merge(dt2);&lt;br /&gt;&lt;br /&gt;// sample -3&lt;br /&gt;&lt;br /&gt;DataSet ds1=new DataSet();&lt;br /&gt;da1.Fill(ds1,"table1");&lt;br /&gt;DataSet ds2=new DataSet();&lt;br /&gt;da2.Fill(ds2,"table2");&lt;br /&gt;for(int i=0;i&lt; ds2.Tables["table2"].Rows.Count;i++)&lt;br /&gt;{&lt;br /&gt;DataRow dr=ds2.Tables["table2"].Rows[i];&lt;br /&gt;ds1.Tables["table1"].ImportRow(dr);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-2389868633359423624?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/2389868633359423624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=2389868633359423624' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2389868633359423624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/2389868633359423624'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/merging-data-of-datatables-in-adonet11.html' title='Merging Data of the DataTables in the ADO.NET1.1'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3024519524707530721</id><published>2007-06-11T06:01:00.000-07:00</published><updated>2007-06-11T06:04:41.834-07:00</updated><title type='text'>How to make website SSL enable.</title><content type='html'>Secure Socket Layer(SSL) is used for secured communication over the internet. Banking services, e-commerce etc. websites implement SSL so that they can be accessible through Https protocol for secured communication. If you wish, you can configure only a section of your website should be accessible through https and rest of the website can be accessed through http protocol. Like in the online shopping website only the payment section of the website can be configured to be access through https protocol.&lt;br /&gt;&lt;br /&gt;In order to make website SSL enabled, we need a certificate. There are many different web sites that provide certificates for use on IIS like www.verisighn.com.&lt;br /&gt;Although, windows comes pre-installed with some certificates of trusted companies. These certificates can be viewed by running certmgr.msc from the comsole window. For any certificate in the list of trusted certificates your program(IE), will not give you warning when  you access their website with SSL enabled.&lt;br /&gt;&lt;br /&gt;To show how to setup an SSL website we will use a trial certificate that Verisign provides to anyone. Before that create the certificate request.&lt;br /&gt;&lt;br /&gt;Follow these steps:&lt;br /&gt;&lt;br /&gt;1. Open the IIS manager window.&lt;br /&gt;2. Right click on the website/virtual directory and choose property window.&lt;br /&gt;3. In the Property window choose Directory Security tab and click on server certificate button.&lt;br /&gt;4. Certificate Wizard window will open, click on next and choose Create a new certificate option. Now follow the wizard steps.&lt;br /&gt;5. The web server certificate wizard will create a certificate request and it will ask you where you want to save it to. Save it somewhere where you can easily access it because you will need to open up the file and submit it to Verisign in order for a certificate response to be sent back to you.&lt;br /&gt;6.Open the text file that contains certificate request and copy its content.&lt;br /&gt;7. Now open http://www.verisign.com/ in IE. Once the page has loaded up find the link "SSL Trial ID" and click on it.&lt;br /&gt;8. The Verisign web site will now take you though the process of obtaining a certificate.&lt;br /&gt;9. In this process on the step "Submit CSR" enter in the certificate request that you copied earlier and click on continue.&lt;br /&gt;10. After the process steps complete, your certificate response will be e-mailed to you. &lt;br /&gt;11. Now check your mail account for the certificate response,At the bottom of the e-mail Verisign sent you is the certificate that you need. Copy this text from the BEGIN CERTIFICATE to the END CERTIFICATE include those lines. &lt;br /&gt;12. Open notepad, paste the text into it and save the file as response.txt. &lt;br /&gt;13. Go back to your web site's Properties dialog and click on the Directory Security tab. Click on the Server Certificate button. Click "Next" until you come to the screen shown. Make sure the "Process the pending request and install the certificate" option is selected. Click Next.&lt;br /&gt;14.In the next screen click on browse to browse the response.txt file, click on next and complete the rest of the steps.&lt;br /&gt;15. Click on the "Edit" button located in the Directory Security tab of the web site's Properties dialog. &lt;br /&gt;16. Check the "Require secure channel (SSL)" checkbox and click on OK.&lt;br /&gt;&lt;br /&gt;Now Our site have become SSL enabled.To access your SSL enabled website use https instead of http.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To configure a perticular web page inntead of whole site to be accessed using https protocol, right click on that perticular web page in the IIS manager and open its property window.Click on the "Edit" button located in the Directory Security tab of the web site's Properties dialog and Check the "Require secure channel (SSL)" &lt;br /&gt;checkbox and click on OK.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3024519524707530721?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3024519524707530721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3024519524707530721' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3024519524707530721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3024519524707530721'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/how-to-make-website-ssl-enable.html' title='How to make website SSL enable.'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-3515191571346017231</id><published>2007-06-11T04:32:00.000-07:00</published><updated>2007-06-11T04:41:33.294-07:00</updated><title type='text'>Error : 'RSA key container could not be opened.'</title><content type='html'>This error occurs if the user does not have the right to access the key container.&lt;br /&gt;&lt;br /&gt;Use following command to give permission to the web suer a/c "ASPNET"&lt;br /&gt;&lt;br /&gt;aspnet_regiis -pa "Key Container Name" "ASPNET"&lt;br /&gt;&lt;br /&gt;Like - aspnet_regiis -pa "NetFrameworkConfigurationKey" "ASPNET"&lt;br /&gt;&lt;br /&gt;Note -Key container name could be found in the machine.config file under configProtectedData section.&lt;br /&gt;&lt;br /&gt;Path of machine.config file is %WinDir%\Microsoft.Net\Framework\v2.0\Config&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-3515191571346017231?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/3515191571346017231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=3515191571346017231' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3515191571346017231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/3515191571346017231'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/error-rsa-key-container-could-not-be.html' title='Error : &apos;RSA key container could not be opened.&apos;'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-4489060775177433114</id><published>2007-06-11T04:16:00.000-07:00</published><updated>2007-06-11T04:32:36.459-07:00</updated><title type='text'>Encrypt Configuration Sections in ASP.NET 2.0 Using RSA</title><content type='html'>RSAProtectedConfigurationProvider uses the RSA public key encryption to encrypt and decrypt data.It supports machine-level and user-level key containers for key storage. Machine-level key containers are available to all users, but a user-level key container is available to that user only.&lt;br /&gt;&lt;br /&gt;Use RSA machine key containers if application runs on its own dedicated server with no other applications or you want multiple app use same key. It stores in the following folder:&lt;br /&gt;&lt;br /&gt;\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys&lt;br /&gt;&lt;br /&gt;Use a user-level key container if you run your application in a shared hosting environment and you want to make sure that your application's sensitive data is not accessible to other applications on the server. It stores in the following folder:&lt;br /&gt;&lt;br /&gt;\Documents and Settings\{UserName}\Application Data\Microsoft\Crypto\RSA&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;By default RSAProtectedConfigurationProvider is configured to use the machine-level key container.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Following command is used to encrypt configuration section in web.config file with RSA:&lt;/strong&gt;&lt;br /&gt;aspnet_regiis -pe "section name" -app "/application name"&lt;br /&gt;&lt;br /&gt;section name - appSettings, connectionStrings, identity, sessionState etc.&lt;br /&gt;&lt;br /&gt;Like - aspnet_regiis -pe "connectionStrings" -app "/MyWebApplication"&lt;br /&gt;&lt;br /&gt;If you are using asp.net web server then give physical path of web app and use -pef option like -&lt;br /&gt;&lt;br /&gt;aspnet_regiis -pef "connectionStrings" -app "c:\MyWebApplication"&lt;br /&gt;&lt;br /&gt;To grant access to the ASP.NET application identity use following command:&lt;br /&gt;&lt;br /&gt;aspnet_regiis -pa "NetFrameworkConfigurationKey" "ASPNET"&lt;br /&gt;&lt;br /&gt;If you are not sure which identity to use, check the identity from a Web page by using the following code:&lt;br /&gt;&lt;br /&gt;using System.Security.Principal;&lt;br /&gt;...&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Response.Write(WindowsIdentity.GetCurrent().Name);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Decrypt configuration section in web.config file with RSA using following command:&lt;/strong&gt;&lt;br /&gt;aspnet_regiis -pd "section name" -app "/application name"&lt;br /&gt;&lt;br /&gt;If you are using asp.net web server then give physical path of web app and use -pdf option like -&lt;br /&gt;&lt;br /&gt;aspnet_regiis -pdf "connectionStrings" -app "c:\MyWebApplication"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Following sections can not be encrypted :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;processmodel&lt;br /&gt;runtime&lt;br /&gt;mscorlib&lt;br /&gt;startup&lt;br /&gt;system.runtime.remoting&lt;br /&gt;configprotecteddata&lt;br /&gt;satelliteassemblies&lt;br /&gt;cryptographysettings&lt;br /&gt;cryptonamemapping&lt;br /&gt;cryptoclasses&gt;&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;br /&gt;http://msdn2.microsoft.com/En-US/library/ms998283.aspx&lt;br /&gt;http://www.c-sharpcorner.com/Blogs/BlogDetail.aspx?BlogId=229&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-4489060775177433114?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/4489060775177433114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=4489060775177433114' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4489060775177433114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/4489060775177433114'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/encrypt-configuration-sections-in.html' title='Encrypt Configuration Sections in ASP.NET 2.0 Using RSA'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6046577960778787715.post-7069498701276572007</id><published>2007-06-11T01:25:00.000-07:00</published><updated>2007-06-15T03:10:31.789-07:00</updated><title type='text'>Introduction of XHTML</title><content type='html'>XHTML is a web standard which has been agreed by the W3C. Its a combination of XML and HTML.XML was designed to describe data and HTML was designed to display data.Therefore, by combining HTML and XML, and their strengths, we got a markup language XHTML for writing better formatted web page.&lt;br /&gt;&lt;br /&gt;Following are some of XHTML feature:&lt;br /&gt;1. Its a case sensitive.&lt;br /&gt;2. All tags must be in lower case.&lt;br /&gt;3. All tags must use id instead of name attribute.&lt;br /&gt;4. Web page must have DOCTYPE tag.&lt;br /&gt;5. DOCTYPE could be strict, transitional or frameset.&lt;br /&gt;6. All attributes of a tag must be quoted.&lt;br /&gt;7. Opening tag must match with closing tag for container tags.&lt;br /&gt;8. Empty tags like line break &lt; br &gt; must be followed by space and forword slash like - &lt; br /&gt;.&lt;br /&gt;9. Attributes must not be shortened. Like in case of checkbox tag write &lt; input type="checkbox" checked="checked" &gt; instead of &lt; input type="checkbox" checked &gt;.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href="http://www.freewebmasterhelp.com/tutorials/xhtml"&gt;http://www.freewebmasterhelp.com/tutorials/xhtml&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.w3schools.com/xhtml/"&gt;http://www.w3schools.com/xhtml/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6046577960778787715-7069498701276572007?l=sanjaysainitech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanjaysainitech.blogspot.com/feeds/7069498701276572007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6046577960778787715&amp;postID=7069498701276572007' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7069498701276572007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6046577960778787715/posts/default/7069498701276572007'/><link rel='alternate' type='text/html' href='http://sanjaysainitech.blogspot.com/2007/06/introduction-of-xhtml.html' title='Introduction of XHTML'/><author><name>sanjay saini</name><uri>http://www.blogger.com/profile/03018435962450831911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_bXen--6DV8Q/SYAyaGZT-EI/AAAAAAAAATs/qcy2Nqfdcqg/S220/P1020864.JPG'/></author><thr:total>0</thr:total></entry></feed>
