<?xml version="1.0" encoding="UTF-8"?><!-- generator="b2evolution/0.9.0.12" -->
<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"					xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel rdf:about="http://charora.com/blog/index.php">
	<title>Blog - All</title>
	<link>http://charora.com/blog/index.php</link>
	<description>Articles on Microsoft Technologies</description>
	<dc:language>en-US</dc:language>
	<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=0.9.0.12"/>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
	<items>
		<rdf:Seq>
					<rdf:li rdf:resource="http://charora.com/blog/index.php/technicalarticles/2006/08/11/how_do_i_get_the_username_in_windows_ser_1"/>
					<rdf:li rdf:resource="http://charora.com/blog/index.php/technicalarticles/2006/08/11/how_to_call_a_web_service_using_javascri_1"/>
					<rdf:li rdf:resource="http://charora.com/blog/index.php/sharelinks/2006/08/11/http_www_callcentermovie_com"/>
					<rdf:li rdf:resource="http://charora.com/blog/index.php/sharelinks/2006/08/11/interviewing_at_microsoft"/>
					<rdf:li rdf:resource="http://charora.com/blog/index.php/troubleshooting/2006/08/11/unable_to_search_in_sharepoint_portal_se_2003"/>
				</rdf:Seq>
	</items>
</channel>
<item rdf:about="http://charora.com/blog/index.php/technicalarticles/2006/08/11/how_do_i_get_the_username_in_windows_ser_1">
	<title>How do I get the Username in Windows Services?</title>
	<link>http://charora.com/blog/index.php/technicalarticles/2006/08/11/how_do_i_get_the_username_in_windows_ser_1</link>
	<dc:date>2006-08-12T00:18:49Z</dc:date>
	<dc:creator>Charora</dc:creator>
	<dc:subject>Windows Services</dc:subject>
	<description>SYMPTOMS
If a Windows Service running under Local System Account, System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString() returns NT AUTHOURITY\SYSTEM

You want to get who logged on to the machine?

CAUSE
Windows Service is running under Local System Account. Current user credentials will be NT AUTHOURITY\SYSTEM. You have to query WMI to get current users logged on to the machine.

WORKAROUND
To work around this problem, use following code.


ManagementObjectSearcher searcher = new 
ManagementObjectSearcher("SELECT UserName, Name FROMWin32_ComputerSystem");

foreach (ManagementObject mo in searcher.Get()) {
if (mo["UserName"] != null) {
   vUserName = mo["UserName"].ToString();
}
if (mo["Name"] != null) {
   strComputer = mo["Name"].ToString();
}
}
searcher.Dispose();
searcher = null;


Email me if you want VB.NET or C++.NET Code
</description>
	<content:encoded><![CDATA[	<p>SYMPTOMS<br />
If a Windows Service running under Local System Account, System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString() returns NT AUTHOURITY\SYSTEM</p>
	<p>You want to get who logged on to the machine?</p>
	<p>CAUSE<br />
Windows Service is running under Local System Account. Current user credentials will be NT AUTHOURITY\SYSTEM. You have to query WMI to get current users logged on to the machine.</p>
	<p>WORKAROUND<br />
To work around this problem, use following code.</p>
	<blockquote><p>
ManagementObjectSearcher searcher = new<br />
ManagementObjectSearcher("SELECT UserName, Name FROMWin32_ComputerSystem");</p>
	<p>foreach (ManagementObject mo in searcher.Get()) {<br />
if (mo["UserName"] != null) {<br />
   vUserName = mo["UserName"].ToString();<br />
}<br />
if (mo["Name"] != null) {<br />
   strComputer = mo["Name"].ToString();<br />
}<br />
}<br />
searcher.Dispose();<br />
searcher = null;
</p></blockquote>
	<p>Email me if you want VB.NET or C++.NET Code</p>
]]></content:encoded>
</item>
<item rdf:about="http://charora.com/blog/index.php/technicalarticles/2006/08/11/how_to_call_a_web_service_using_javascri_1">
	<title>How to call a web service using Javascript?</title>
	<link>http://charora.com/blog/index.php/technicalarticles/2006/08/11/how_to_call_a_web_service_using_javascri_1</link>
	<dc:date>2006-08-12T00:16:32Z</dc:date>
	<dc:creator>Charora</dc:creator>
	<dc:subject>Web Services</dc:subject>
	<description>For example:
You want to get a client name from the client list. "GetClientName" function exposed through web service name called "Service1.asmx" and the function takes "Client Code" as a passing variable.

Copy the WebService behavior (webservice.htc file) into the Web project folder.
You can download webservice.htc file at this link: http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/behaviors/library/webservice/default.asp

Copy this javscript code and name it webservice.js and copy into the Web project folder.


var iCallID1;

function onBlur()
{			
  Get_ClientName();
}

function onEnter()
{			
 var kCode=event.keyCode;
 if(kCode==13)
   {
     Get_ClientName();
   }
}

function onWSresult()
{
if (event.result.error)
{
var xfaultcode = event.result.errorDetail.code;
var xfaultstring = event.result.errorDetail.string;
var xfaultsoap = event.result.errorDetail.raw;

alert("Error: " + xfaultcode + "|" + xfaultstring + "|" + xfaultsoap + "|");
}
else
{

if (iCallID1==event.result.id) {
   document.all("ClientName").innerHTML = event.result.value;
}
}
}

function Get_ClientName() {
if (document.all("ClientCode").value != "") {
   service.useService("http://www.charora.com/WebServices/Service1.asmx?WSDL","MyWebService");
   iCallID1 = service.MyWebService.callService("GetClientName", document.all("ClientCode").value);
}
else {
   alert ("Please enter client code ... ");
}
}


Create test.htm and include webservice.js in the test.htm

add a DIV tag and with following attributes
id="service" 
style="behavior:url(webservice.htc)" 
onresult="onWSresult();" 

add input tag and with following attributes
type="text" 
name="ClientCode" 
Text="" 
onblur="onBlur();" 
onkeypress="onEnter();"

add another input tag and with following attributes
type="text" 
name="ClientName" 
Text="" 



Finally, browse the test.htm file and enter client code and hit enter.

You will get the client name.
</description>
	<content:encoded><![CDATA[	<p>For example:<br />
You want to get a client name from the client list. "GetClientName" function exposed through web service name called "Service1.asmx" and the function takes "Client Code" as a passing variable.</p>
	<p>Copy the WebService behavior (webservice.htc file) into the Web project folder.</p>
	<blockquote><p>You can download webservice.htc file at this link: <a href="http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/behaviors/library/webservice/default.asp">http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/behaviors/library/webservice/default.asp</a></p></blockquote>
	<p>Copy this javscript code and name it webservice.js and copy into the Web project folder.</p>
	<blockquote><p>
var iCallID1;</p>
	<p>function onBlur()<br />
{<br />
  Get_ClientName();<br />
}</p>
	<p>function onEnter()<br />
{<br />
 var kCode=event.keyCode;<br />
 if(kCode==13)<br />
   {<br />
     Get_ClientName();<br />
   }<br />
}</p>
	<p>function onWSresult()<br />
{<br />
if (event.result.error)<br />
{<br />
var xfaultcode = event.result.errorDetail.code;<br />
var xfaultstring = event.result.errorDetail.string;<br />
var xfaultsoap = event.result.errorDetail.raw;</p>
	<p>alert("Error: " + xfaultcode + "|" + xfaultstring + "|" + xfaultsoap + "|");<br />
}<br />
else<br />
{</p>
	<p>if (iCallID1==event.result.id) {<br />
   document.all("ClientName").innerHTML = event.result.value;<br />
}<br />
}<br />
}</p>
	<p>function Get_ClientName() {<br />
if (document.all("ClientCode").value != "") {<br />
   service.useService("http://www.charora.com/WebServices/Service1.asmx?WSDL","MyWebService");<br />
   iCallID1 = service.MyWebService.callService("GetClientName", document.all("ClientCode").value);<br />
}<br />
else {<br />
   alert ("Please enter client code ... ");<br />
}<br />
}
</p></blockquote>
	<p>Create test.htm and include webservice.js in the test.htm</p>
	<p>add a DIV tag and with following attributes</p>
	<blockquote><p>id="service"<br />
style="behavior:url(webservice.htc)"<br />
onresult="onWSresult();" </p></blockquote>
	<p>add input tag and with following attributes</p>
	<blockquote><p>type="text"<br />
name="ClientCode"<br />
Text=""<br />
onblur="onBlur();"<br />
onkeypress="onEnter();"</p></blockquote>
	<p>add another input tag and with following attributes</p>
	<blockquote><p>type="text"<br />
name="ClientName"<br />
Text=""
</p></blockquote>
	<p>Finally, browse the test.htm file and enter client code and hit enter.</p>
	<p>You will get the client name.</p>
]]></content:encoded>
</item>
<item rdf:about="http://charora.com/blog/index.php/sharelinks/2006/08/11/http_www_callcentermovie_com">
	<title>http://www.callcentermovie.com/</title>
	<link>http://charora.com/blog/index.php/sharelinks/2006/08/11/http_www_callcentermovie_com</link>
	<dc:date>2006-08-12T00:01:48Z</dc:date>
	<dc:creator>Charora</dc:creator>
	<dc:subject>Interesting Links</dc:subject>
	<description>http://www.callcentermovie.com/ Interesting call center movie ...</description>
	<content:encoded><![CDATA[<p><a href="http://www.callcentermovie.com/">http://www.callcentermovie.com/</a></p>	<p>Interesting call center movie ...
</p>
]]></content:encoded>
</item>
<item rdf:about="http://charora.com/blog/index.php/sharelinks/2006/08/11/interviewing_at_microsoft">
	<title>Interviewing at Microsoft</title>
	<link>http://charora.com/blog/index.php/sharelinks/2006/08/11/interviewing_at_microsoft</link>
	<dc:date>2006-08-11T23:59:41Z</dc:date>
	<dc:creator>Charora</dc:creator>
	<dc:subject>Interesting Links</dc:subject>
	<description>http://www.sellsbrothers.com/fun/msiview/ Interesting Link</description>
	<content:encoded><![CDATA[<p><a href="http://www.sellsbrothers.com/fun/msiview/">http://www.sellsbrothers.com/fun/msiview/</a></p>	<p>Interesting Link
</p>
]]></content:encoded>
</item>
<item rdf:about="http://charora.com/blog/index.php/troubleshooting/2006/08/11/unable_to_search_in_sharepoint_portal_se_2003">
	<title>Unable to search in SharePoint Portal Server 2003</title>
	<link>http://charora.com/blog/index.php/troubleshooting/2006/08/11/unable_to_search_in_sharepoint_portal_se_2003</link>
	<dc:date>2006-08-11T19:30:23Z</dc:date>
	<dc:creator>Charora</dc:creator>
	<dc:subject>MS SHAREPOINT</dc:subject>
	<description>SYMPTOMS
Whatever you try to search for in SharePoint Portal Server 2003, You do not get any results, you may receive the following error message in the error log if you go to "Site Settings->Configure search and indexing->View errors and warnings on:" and click on "portal content" or "non portal content"

The address could not be found, (0x80041209 - Cannot Connect to the server. Please make sure the site is accessible. )

The address could not be found, (0x80041206 - A server error occurred. Check that the server is available. )

CAUSE
full-text search is not configured properly

WORKAROUND
To work around this problem, follow these steps.

1. Login as SharePoint Administrator Group Account
2. Go to SharePoint Central Administration
3. Click on Windows SharePoint Services from left navigation bar.
4. Click on Configure full-text search and uncheck and check "Enable full-text search and index component" under Search Settings and type "SharePoint Administrator Group Account" User ID and Password if prompted.
4. Open Enterprise Manager in SQL Server 2000 or SQL Server Management Studio in SQL Server 2005. 
5. Go to the database server then open the "SITE" database
6. You should see Full-Text Catalog node, right click on the catalog icon to start full population. If you receive an error message then run this stored procedure. Make sure you are running the stored procedute in the "Site" database. 

EXEC sp_fulltext_database 'enable' 
GO 
 
This should fix the problem
 


 



</description>
	<content:encoded><![CDATA[	<p>SYMPTOMS<br />
Whatever you try to search for in SharePoint Portal Server 2003, You do not get any results, you may receive the following error message in the error log if you go to "Site Settings->Configure search and indexing->View errors and warnings on:" and click on "portal content" or "non portal content"</p>
	<p><strong>The address could not be found, (0x80041209 - Cannot Connect to the server. Please make sure the site is accessible. )</strong></p>
	<p><strong>The address could not be found, (0x80041206 - A server error occurred. Check that the server is available. )</strong></p>
	<p>CAUSE<br />
full-text search is not configured properly</p>
	<p>WORKAROUND<br />
To work around this problem, follow these steps.</p>
	<p>1. Login as SharePoint Administrator Group Account<br />
2. Go to SharePoint Central Administration<br />
3. Click on Windows SharePoint Services from left navigation bar.<br />
4. Click on Configure full-text search and uncheck and check "Enable full-text search and index component" under Search Settings and type "SharePoint Administrator Group Account" User ID and Password if prompted.<br />
4. Open Enterprise Manager in SQL Server 2000 or SQL Server Management Studio in SQL Server 2005.<br />
5. Go to the database server then open the "SITE" database<br />
6. You should see Full-Text Catalog node, right click on the catalog icon to start full population. If you receive an error message then run this stored procedure. Make sure you are running the stored procedute in the "Site" database. </p>
	<p>EXEC sp_fulltext_database 'enable'<br />
GO </p>
	<p>This should fix the problem</p>
]]></content:encoded>
</item>
</rdf:RDF>
