<?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:blogger='http://schemas.google.com/blogger/2008' 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-6075603515700651644</id><updated>2024-09-27T04:45:50.259-07:00</updated><title type='text'>Tahir Khan&#39;s technical blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-8280685386733515688</id><published>2014-01-15T07:31:00.000-08:00</published><updated>2014-01-16T08:41:38.411-08:00</updated><title type='text'>Helpful scripts for SQL Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
There is nothing new or revolutionary about the following scripts but I am compiling them here for anyone that these may help.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;SQL Server database marked &#39;suspect&#39;&lt;/b&gt;&lt;/h3&gt;
There are various reasons that the DBMS may mark your database as suspect . Some of these are&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The database could have been corrupted&lt;/li&gt;
&lt;li&gt;Not enough space for the DBMS to run a recovery operation.&lt;/li&gt;
&lt;li&gt;OS locks on the files&lt;/li&gt;
&lt;li&gt;Unexpected sql server shut down.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
To resolve this copy and paste the following script into SSMS. Replace [MyDatabaseName] to the actual database that you are trying to recover.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;use master&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;go&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;EXEC&lt;/span&gt; &lt;span style=&quot;color: #990000;&quot;&gt;sp_resetstatus&lt;/span&gt; [MyDatabaseName];&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;ALTER DATABASE&lt;/span&gt; [MyDatabaseName] &lt;span style=&quot;color: blue;&quot;&gt;SET EMERGENCY&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DBCC&lt;/span&gt; checkdb(MyDatabaseName)&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;ALTER DATABASE&lt;/span&gt; MyDatabaseName &lt;span style=&quot;color: blue;&quot;&gt;SET SINGLE_USER WITH ROLLBACK IMMEDIATE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DBCC &lt;/span&gt;CheckDB (MyDatabaseName, REPAIR_ALLOW_DATA_LOSS)&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;ALTER DATABASE&lt;/span&gt; MyDatabaseName&lt;span style=&quot;color: blue;&quot;&gt; SET MULTI_USER&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Get a list of all indexes on all tables in your database&lt;/b&gt;&lt;/h3&gt;
There are instances when you need a list of all the tables, with index description and keys in your database. The following script lets you do just that.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@IndexInfoTemp &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;TABLE &lt;/span&gt;(index_name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;(250)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,index_description &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;(250)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,index_keys &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;(250)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@IndexInfo &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;TABLE &lt;/span&gt;(table_name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;sysname&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,index_name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;(250)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,index_description &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;(250)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,index_keys &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;(250)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@Tables &lt;span style=&quot;color: blue;&quot;&gt;Table &lt;/span&gt;(RowID &amp;nbsp; &amp;nbsp; &amp;nbsp; int not null &lt;span style=&quot;color: blue;&quot;&gt;identity&lt;/span&gt;(1,1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,TableName &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;sysname&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@MaxRow &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@CurrentRow &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@CurrentTable &lt;span style=&quot;color: blue;&quot;&gt;sysname&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;INSERT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO &lt;/span&gt;@Tables&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;DISTINCT &lt;/span&gt;t.name&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;sys.indexes&lt;/span&gt; i&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #999999;&quot;&gt;INNER JOIN&lt;/span&gt; &lt;span style=&quot;color: #38761d;&quot;&gt;sys.tables&lt;/span&gt; t ON i&lt;span style=&quot;color: magenta;&quot;&gt;.object_id&lt;/span&gt; = t.&lt;span style=&quot;color: magenta;&quot;&gt;object_id&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHERE &lt;/span&gt;i.Name &lt;span style=&quot;color: #999999;&quot;&gt;IS NOT NULL&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;SELECT &lt;/span&gt;@MaxRow=&lt;span style=&quot;color: magenta;&quot;&gt;@@ROWCOUNT&lt;/span&gt;,@CurrentRow=1&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;WHILE &lt;/span&gt;@CurrentRow&amp;lt;=@MaxRow&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT &lt;/span&gt;@CurrentTable=TableName &lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;/span&gt;@Tables &lt;span style=&quot;color: blue;&quot;&gt;WHERE &lt;/span&gt;RowID=@CurrentRow&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;INSERT INTO&lt;/span&gt; @IndexInfoTemp&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;exec &lt;/span&gt;&lt;span style=&quot;color: #990000;&quot;&gt;sp_helpindex&lt;/span&gt; @CurrentTable&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; INSERT INTO&lt;/span&gt; @IndexInfo&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (table_name &amp;nbsp; , index_name , index_description , index_keys)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @CurrentTable , index_name , index_description , index_keys&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;/span&gt;@IndexInfoTemp&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;DELETE FROM&lt;/span&gt; @IndexInfoTemp&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SET &lt;/span&gt;@CurrentRow=@CurrentRow+1&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;END &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;--WHILE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;from &lt;/span&gt;@IndexInfo&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Kill all sleeping processes in SQL Server&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
There may be occasions where you may want to get a list and subsequently kill all sleeping processes. Here is a script that lets you do that.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@v_spid &lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE&lt;/span&gt; c_Users &lt;span style=&quot;color: blue;&quot;&gt;CURSOR&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FAST_FORWARD&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;FOR&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &lt;/span&gt;SPID&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;F&lt;span style=&quot;color: blue;&quot;&gt;ROM master&lt;/span&gt;..&lt;span style=&quot;color: #38761d;&quot;&gt;sysprocesses &lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;NOLOCK&lt;/span&gt;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &lt;/span&gt;spid&amp;gt;50&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;status&lt;/span&gt;=&#39;&lt;span style=&quot;color: red;&quot;&gt;sleeping&lt;/span&gt;&#39;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;DATEDIFF&lt;/span&gt;(mi,last_batch,&lt;span style=&quot;color: magenta;&quot;&gt;GETDATE&lt;/span&gt;())&amp;gt;=60&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;AND &lt;/span&gt;spid&amp;lt;&amp;gt;&lt;span style=&quot;color: magenta;&quot;&gt;@@spid&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;OPEN &lt;/span&gt;c_Users&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;FETCH NEXT FROM&lt;/span&gt; c_Users &lt;span style=&quot;color: blue;&quot;&gt;INTO &lt;/span&gt;@v_spid&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;WHILE &lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;@@FETCH_STATUS&lt;/span&gt;=0)&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;BEGIN&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &lt;span style=&quot;color: magenta;&quot;&gt;PRINT &lt;/span&gt;&#39;&lt;span style=&quot;color: red;&quot;&gt;Exterminating&lt;/span&gt; &#39;+&lt;span style=&quot;color: magenta;&quot;&gt;CONVERT&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;,@v_spid)+&lt;span style=&quot;color: red;&quot;&gt;&#39;...&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;EXEC&lt;/span&gt;(&#39;&lt;span style=&quot;color: red;&quot;&gt;KILL &lt;/span&gt;&#39;+@v_spid)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FETCH NEXT FROM&lt;/span&gt; c_Users &lt;span style=&quot;color: blue;&quot;&gt;INTO &lt;/span&gt;@v_spid&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;CLOSE &lt;/span&gt;c_Users&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DEALLOCATE &lt;/span&gt;c_Users&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/8280685386733515688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2014/01/helpful-scripts-for-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/8280685386733515688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/8280685386733515688'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2014/01/helpful-scripts-for-sql-server.html' title='Helpful scripts for SQL Server'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-2333085989173169387</id><published>2013-10-07T08:29:00.000-07:00</published><updated>2013-10-07T08:29:22.885-07:00</updated><title type='text'>VS 2012 - Some of the properties associated with the solution could not be read</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Recently, I upgraded one of the team projects to VS2012. Post upgrade, whenever I tried opening the solution, VS would complain with the message, &quot;Some of the properties associated with the solution could not be read&quot;.&lt;br /&gt;
&lt;br /&gt;
I opened up the solution file that did not have this issue (the one in the dev branch) and compared it to the recently upgraded solution. When I compared the solution files the value for the &quot;SccNumberOfProjects&quot; was different. There were supposed to be only 20 projects part of the solution but for some odd reason the value for this attribute was 21 in the upgraded version.&lt;br /&gt;
&lt;br /&gt;
I changed the value of this attribute to 20 in the upgraded solution file (had to changes this in a couple of spots in the solution file) and the problem went away.&lt;br /&gt;
&lt;br /&gt;
Hope this helps.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/2333085989173169387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2013/10/vs-2012-some-of-properties-associated.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/2333085989173169387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/2333085989173169387'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2013/10/vs-2012-some-of-properties-associated.html' title='VS 2012 - Some of the properties associated with the solution could not be read'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-545414628338351295</id><published>2013-04-26T10:41:00.000-07:00</published><updated>2013-04-26T10:41:19.407-07:00</updated><title type='text'>Unexpected Error &quot;12037&quot;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
When downloading something from a secure site you may sometimes get the following error&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;Error 12037 - SSL certificate date that was received from the server is bad. The certificate is expired.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;If this is the case, then check your clock settings. Most often then not this is because of a wrong time/zone on your machine.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;Hope this helps.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/545414628338351295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2013/04/unexpected-error-12037.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/545414628338351295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/545414628338351295'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2013/04/unexpected-error-12037.html' title='Unexpected Error &quot;12037&quot;'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-8345686053718146453</id><published>2012-12-17T08:19:00.002-08:00</published><updated>2012-12-17T08:19:45.391-08:00</updated><title type='text'>Http 500 Internal server error</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Scenario: I deployed an application as a virtual directory under the default site and my application threw a HTTP 500 error.&lt;br /&gt;
&lt;br /&gt;
Resolution: The reason was that the default site and my virtual directory that was configured as an application had common keys (keys with the same name). I removed the key from the application in the virtual directory and the problem went away. One way to find any config issues in IIS7 is to open the configuration editor in IIS7 for the site you are troubleshooting. The configuration editor will throw specific exceptions if it cannot successfully open the config which is how I found the issue with duplicate keys.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/8345686053718146453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2012/12/http-500-internal-server-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/8345686053718146453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/8345686053718146453'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2012/12/http-500-internal-server-error.html' title='Http 500 Internal server error'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-624866590234682473</id><published>2011-09-27T09:46:00.000-07:00</published><updated>2011-09-27T09:46:22.841-07:00</updated><title type='text'>Error -2147024893 while uninstalling ss2k5 reporting services</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;While recently trying to uninstall reporting services 2k5 from my machine I ran into this nasty error. Researching this I found that the default site was running. Stopped the default site, re-ran the uninstallation and everything is hunky dory again.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/624866590234682473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/09/error-2147024893-while-uninstalling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/624866590234682473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/624866590234682473'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/09/error-2147024893-while-uninstalling.html' title='Error -2147024893 while uninstalling ss2k5 reporting services'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-5915691744786664924</id><published>2011-05-24T07:41:00.000-07:00</published><updated>2011-05-24T07:41:18.798-07:00</updated><title type='text'>Enable Session State in a WCF service</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;The concept of session in a WCF service is widely different from a typical ASP.NET application where the session is initiated and maintained on the server. Sessions in WCF are per call and are created in the context of the channel that received the service request. I will keep this simple. If you need access to Session data in a WCF service there are 2 things that need to happen. In the web.config of your service application, the aspnetcompatibility needs to be enabled like so....&lt;br /&gt;
1.&lt;br /&gt;
&amp;lt;system.serviceModel&amp;gt;&lt;br /&gt;
&amp;lt;serviceHostingEnvironment aspNetCompatibiltyEnabled=&quot;true&quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Add the following line to the class that implements your service interface like so...&lt;br /&gt;
&lt;br /&gt;
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]&lt;br /&gt;
&lt;br /&gt;
The AspNetCompatibilityRequirementsMode enum has three possible values, Allowed NotAllowed and Required. Set the value of this enum according to your needs.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/5915691744786664924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/enable-session-state-in-wcf-service.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/5915691744786664924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/5915691744786664924'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/enable-session-state-in-wcf-service.html' title='Enable Session State in a WCF service'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-1609647281129021238</id><published>2011-05-24T07:26:00.000-07:00</published><updated>2011-05-24T07:26:11.403-07:00</updated><title type='text'>System.Web.HttpContext unavailable in a service class library</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I encountered this recently. I have a service that implements an aggregate interface. Each interface is implemented in a seperate class library. I needed access to System.Web.HttpContext in one of my projects. When I tried to add a reference to the System.Web namespace I did not see this namespace listed in the list of available namespaces. Intrigued I checked my project properties and saw that the project was referencing .Net Client Profile of .Netfrx40. I changed this to the full .Netfrx40 and tried adding the reference again and VOILA I was able to add the namespace reference to my project and now have access to HttpContext.&lt;br /&gt;
&lt;br /&gt;
Happy Coding! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/1609647281129021238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/systemwebhttpcontext-unavailable-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/1609647281129021238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/1609647281129021238'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/systemwebhttpcontext-unavailable-in.html' title='System.Web.HttpContext unavailable in a service class library'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-1445129585124377299</id><published>2011-05-23T18:02:00.000-07:00</published><updated>2011-05-23T18:02:43.831-07:00</updated><title type='text'>PFX also known as the Parallel framework</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;If you have ever written multi-threaded code and wished to take advantage of multi cores/processors on your machine without writing a lot of code to partition your data and managing concurrency then you gotta take a look at the new task parallelism constructs offered by .NetFrx40. Thread concurrency is when your sequential code executes simultaneously amongst the cores in parallel. Also known as parallel programming, this is achieved by using the new PFX library. Parallel LINQ, the parallel class, the task parallelism constructs and the concurrent collections are collectively known as the PFX. The parallel class together with the task construct is called the Task Parallel Library or TPL.&lt;br /&gt;
&lt;br /&gt;
So, how can the Parallel class help? Imagine you have a list that represents a collection of objects that you want some db operation to be performed on. Moreover, you want to take advantage of your hardware that has two dual core processors. If your collection has say, for instance 4 items in it, your sequential code will iterate over this collection using the same thread.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;foreach(var m in list)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { do some db processing }&lt;br /&gt;
&lt;br /&gt;
When you use the Parallel.Foreach construct you can then do the same work over 4 threads executing simultaneously, one on each core. Your code would look something like the following.&lt;br /&gt;
&lt;br /&gt;
Parallel.Foreach(list, ()=&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
Same code as above in sequential code. &lt;br /&gt;
}); &lt;br /&gt;
&lt;br /&gt;
The runtime manages the work and aggregates the result from the originating thread/processor.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;A few things to keep in mind. When using the task parallelism constructs remember you still have to manage access to critical sections within your thread, so you do have to lock access to critical sections within your threads.&lt;br /&gt;
&lt;br /&gt;
I benchmarked the performance difference and it is in the order of magnitude in my project. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/1445129585124377299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/pfx-also-known-as-parallel-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/1445129585124377299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/1445129585124377299'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/pfx-also-known-as-parallel-framework.html' title='PFX also known as the Parallel framework'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-2690069050586293935</id><published>2011-05-19T07:06:00.000-07:00</published><updated>2011-05-19T07:06:33.970-07:00</updated><title type='text'>Entity Framework: The ObjectContext instance has been disposed and can no longer be used for operations that require a connection</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I had a piece of sequential code that executed in its own task (PFX). This was a sequential foreach loop. I changed this foreach to Parallel.Foreach and my code bombed. I do not think that the issue had anything to do with me trying to execute the foreach loop on all the cores at once. The actual problem was that I was retuning a value from within a using statement and EF did not like it.&lt;br /&gt;
&lt;br /&gt;
Once the removed the return value from my method outside the using statement all is well.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/2690069050586293935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/entity-framework-objectcontext-instance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/2690069050586293935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/2690069050586293935'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/entity-framework-objectcontext-instance.html' title='Entity Framework: The ObjectContext instance has been disposed and can no longer be used for operations that require a connection'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-1169730386875606308</id><published>2011-05-02T08:40:00.000-07:00</published><updated>2011-05-02T08:40:55.984-07:00</updated><title type='text'>log4net: No appenders could be found for logger</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;This is my initial foray into Log4Net for use with my WCF service. Since Log4Net is configuration based, if you do not see anything logged to your destination (in my case it is a database) then you have missed something in your config (that should not be any surprise, my point is to reinforce the reader to double check their config settings). In my particular case I am using the AdoNetAppender. I configured my database, installed and referenced the Log4net dll&#39;s and set about to log my first exception. After messing with it for a couple of hours I realized that I was missing the &amp;lt;appender-ref ref=&quot;AdoNetAppender&quot; /&amp;gt; key in my config. The exception that was being thrown by Log4Net was&lt;br /&gt;
&lt;br /&gt;
log4net: Logger: No appenders could be found for logger [PSLogger, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] repository [log4net-default-repository]&lt;br /&gt;
log4net: Logger: Please initialize the log4net system properly.&lt;br /&gt;
log4net: Logger:&amp;nbsp;&amp;nbsp;&amp;nbsp; Current AppDomain context information: &lt;br /&gt;
log4net: Logger:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BaseDirectory&amp;nbsp;&amp;nbsp; : C:\$\1.0\PSAuditService\PSAuditService\&lt;br /&gt;
log4net: Logger:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FriendlyName&amp;nbsp;&amp;nbsp;&amp;nbsp; : dbd5742-18-129488220968600299&lt;br /&gt;
log4net: Logger:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DynamicDirectory: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\ec718ec8\d90fe912&lt;br /&gt;
&lt;br /&gt;
After adding the afore mentioned key all seems to be well.&lt;br /&gt;
&lt;br /&gt;
Hope this helps someone.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/1169730386875606308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/log4net-no-appenders-could-be-found-for.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/1169730386875606308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/1169730386875606308'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/05/log4net-no-appenders-could-be-found-for.html' title='log4net: No appenders could be found for logger'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-3513431047696029993</id><published>2011-04-17T11:03:00.000-07:00</published><updated>2011-04-17T11:03:05.445-07:00</updated><title type='text'>This collection already contains an address with scheme Http. There can be at most  one address per scheme in this collection</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Recently, I deployed my fully tested WCF service to a shared hosting environment and I was greeted by this nasty message the first time I tried to test my service by entering the url in the address bar. Upon researching the issue I realized that my ISP had allowed my service to be accessible using multiple host names. Obviously, I did not have access to their IIS, so had to come up with an alternate solution. In my solution, I created a custom ServiceHostFactory and forced WCF to use this host factory.&lt;br /&gt;
&lt;br /&gt;
1. Create a new class that inherits from the ServiceHostFactory.&lt;br /&gt;
2. Override the CreateServiceHost, create a new servicehost type with the Uri of that you want the service to bind to and return the new servicehost from the CreateServiceHost method.&lt;br /&gt;
&amp;nbsp;3. Change the .svc file of your service to use the new custom service host that you have created. This is done by providing the namespace name of your servicehost in the Factory attribute of the .svc file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope this helps.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/3513431047696029993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/04/this-collection-already-contains.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/3513431047696029993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/3513431047696029993'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/04/this-collection-already-contains.html' title='This collection already contains an address with scheme Http. There can be at most  one address per scheme in this collection'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-2893472807444166149</id><published>2011-02-23T12:54:00.000-08:00</published><updated>2011-02-23T12:54:45.999-08:00</updated><title type='text'>Error 500.19. MSSQL Server 2005 Reporting Services and Windows 7</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I recently started working with SSRS once again after a sabbath of 4 years and tell you what....it was kinda difficult to recollect everything. Well for once I was working on a new OS with an old version of SQLServer. I installed SqlServer2005 and reporting services, the fired up the reporting services configuration editor to setup my reporting server. Following are the caveats that you need to remember for a sucessful install and initialization of reporting services.&lt;br /&gt;
Since SSRS uses .Net framework 2.0 do not use the default AppPool to run your reporting services (the default app pool in my case was using .Net framework 4) . It will make your life hell. To resolve this, open up IIS manager on your windows7 machine and click on your report server site. In the Actions pane click Basic Settings and then the Select button in the &#39;Edit Application&#39; dialog box. This will open another dialog box that should let you change the app pool that your report server is using. &lt;br /&gt;
Since the report server virtual directory is installed under \%systemdrive%\Program Files (x86)\Microsoft SQL Server\MSSQL.3\Reporting Services, Windows7 will not let you run the site using the IUSR account. You will have to expressly grant the IUSR account read permission in the least. This was the reason in my case for Error 500.19.&lt;br /&gt;
Hope this helps. Enjoy!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/2893472807444166149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/02/error-50019-mssql-server-2005-reporting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/2893472807444166149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/2893472807444166149'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/02/error-50019-mssql-server-2005-reporting.html' title='Error 500.19. MSSQL Server 2005 Reporting Services and Windows 7'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-3946542227474599086</id><published>2011-02-23T06:59:00.000-08:00</published><updated>2011-02-23T06:59:49.672-08:00</updated><title type='text'>An unknown error has occured in the WMI Provider. Error Code 8000000A</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Recently while using reporting services configuration editor on a Windows 7 machine I ran into this error. On first look, I thought I was toast and would have to spend oodles of hours trying to fix it. The solution is pretty simple.....run the reporting services configuration editor as an administrator and this annoying error should go away. Would be helpful if Microsoft could put a little hint in the error thrown something like &#39;Are you running the configuration editor as an administrator?&#39;, kinda like the missing assembly reference hint on a typical .Net compile. Dont you agree?&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/3946542227474599086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/02/unknown-error-has-occured-in-wmi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/3946542227474599086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/3946542227474599086'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2011/02/unknown-error-has-occured-in-wmi.html' title='An unknown error has occured in the WMI Provider. Error Code 8000000A'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6075603515700651644.post-5944558354524796568</id><published>2010-10-27T07:56:00.000-07:00</published><updated>2010-10-27T07:56:01.774-07:00</updated><title type='text'>Setting up a &#39;RAM Drive&#39; and deploying your windows mobile app.</title><content type='html'>Recently I have started doing windows mobile development and to my dismay the storage space for programs on the emulator is limited to 32 MB by default. Well, that would obviously not work especially when you are deploying WCF related namespaces alongwith your other project dependent assemblies. &lt;br /&gt;
Luckily, there is a work around to this problem. You can setup a virtual storage card on your device that points to a local drive on your development PC. This is how you would do it. I am using a Windows Mobile 6 Professional Emulator&lt;br /&gt;
&lt;br /&gt;
1. Fire up the emulator from within Visual Studio (Tools -&amp;gt; Device Emulator Manager).&lt;br /&gt;
2. Click File -&amp;gt; Configure from the menu.&lt;br /&gt;
3. On the General Tab, towards the bottom you will see a place holder for your Shared Folder. &lt;br /&gt;
4. Click browse [..] and select the folder on your local machine you would like to use as a virtual storage card.&lt;br /&gt;
You should now be able to see details of your storage card on your device.&lt;br /&gt;
&lt;br /&gt;
DEPLOYING your windows mobile app to the device and debugging in VS (I am using VS 2008).&lt;br /&gt;
&lt;br /&gt;
1. In VS, right click your project and select properties.&lt;br /&gt;
2.&amp;nbsp;Click the devices&amp;nbsp;tab.&lt;br /&gt;
3. Click on the ellisis [..] button beside the Output file folder.&lt;br /&gt;
4. Select Root folder from the drop down and specify a path (subdirectory) where you would like VS to deploy your application.&lt;br /&gt;
5. Select Ok and you should be in business.</content><link rel='replies' type='application/atom+xml' href='http://tahirkhanstechnicalblog.blogspot.com/feeds/5944558354524796568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2010/10/setting-up-ram-drive-and-deploying-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/5944558354524796568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6075603515700651644/posts/default/5944558354524796568'/><link rel='alternate' type='text/html' href='http://tahirkhanstechnicalblog.blogspot.com/2010/10/setting-up-ram-drive-and-deploying-your.html' title='Setting up a &#39;RAM Drive&#39; and deploying your windows mobile app.'/><author><name>KahnIm</name><uri>http://www.blogger.com/profile/15648155370878015425</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>