<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Tamir Shlomi&amp;#39;s Blog</title><link>http://blogs.microsoft.co.il/blogs/tamirs/</link><description>Welcome to Tamir Shlomi&amp;#39;s blog.
All about .NET, OOP and SQL server</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>System.IO.FileNotFoundException: Could not load file or assembly ‘Assembly’ or one of its dependencies. The system cannot find the file specified</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2011/10/25/system-io-filenotfoundexception-could-not-load-file-or-assembly-assembly-or-one-of-its-dependencies-the-system-cannot-find-the-file-specified.aspx</link><pubDate>Tue, 25 Oct 2011 17:44:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:920418</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=920418</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2011/10/25/system-io-filenotfoundexception-could-not-load-file-or-assembly-assembly-or-one-of-its-dependencies-the-system-cannot-find-the-file-specified.aspx#comments</comments><description>&lt;p&gt;First step: check if the assembly is really in the bin folder.&lt;/p&gt;  &lt;p&gt;It’s there but you still get the error?&lt;/p&gt;  &lt;p&gt;There might be few reasons for the framework to fail when trying to load your assembly.    &lt;br /&gt;To find the real one you can use nice tool from MS, called “&lt;a href="http://msdn.microsoft.com/en-us/library/e74a18c4.aspx" target="_blank"&gt;Fuslogvw.exe&lt;/a&gt;” which is assembly binding log viewer you can use for your .NET application (it’s auto installed with VS).&lt;/p&gt;  &lt;p&gt;After opening this tool, start your application and wait for the exception to be thrown.    &lt;br /&gt;go back to the tool, hit the refresh to watch the list of the assemblies your application tried to load, double click the one that cause the exception to view the log details.&lt;/p&gt;  &lt;p&gt;In my case I found the following error:    &lt;br /&gt;&lt;em&gt;Bind result: hr = 0x8007000b. An attempt was made to load a program with an incorrect format      &lt;br /&gt;------       &lt;br /&gt;ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;After having the exact error in my hand, I could google and find it was 32/64 bit issue.    &lt;br /&gt;The problematic assembly was 32 bit instead of 64.&lt;/p&gt;  &lt;p&gt;I think it’s a great diagnostic tool.&lt;/p&gt;  &lt;p&gt;HTH,    &lt;br /&gt;Tamir.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=920418" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Configuration/default.aspx">Configuration</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Diagnostic/default.aspx">Diagnostic</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Deployment/default.aspx">Deployment</category></item><item><title>What Is It “Disposable Mail”?, Or: How To Confirm Activation Mails Using Temp Email Address</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2011/01/18/what-is-it-disposable-mail-or-how-to-confirm-activation-mails-using-temp-email-address.aspx</link><pubDate>Mon, 17 Jan 2011 22:00:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:774383</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=774383</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2011/01/18/what-is-it-disposable-mail-or-how-to-confirm-activation-mails-using-temp-email-address.aspx#comments</comments><description>&lt;p&gt;We don’t want that every site we’re registering to will have our real email. &lt;br /&gt;Place a comment on forum, watch members-only messages etc. require full registration to the relevant site, passing all the exhausting steps to create account. &lt;br /&gt;Except the long procedure, that site wants our email (for confirmation and spam us with the offers), maybe they’ll display it on their site and other spammers will get it and we’ll have to fight annoying emails every day.&lt;/p&gt;
&lt;p&gt;really don’t want it, right?&lt;/p&gt;
&lt;p&gt;This is where the temp mail address (or disposable mail) providers comes in :-) &lt;br /&gt;You can get a temporary email address which will be accessible for 10 minutes, an hour or any other (very) short period of time. &lt;br /&gt;10 minutes should be enough to get the registration confirmation mail or any other quick mail we should receive. &lt;br /&gt;Using this kind of service we’re simply having our count active without leaving any personal info for the site :-)&lt;/p&gt;
&lt;p&gt;Just google “temp mail address” or “disposable mail”. there are even services that enables attachments (seems it’s not that obvious feature).&lt;/p&gt;
&lt;p&gt;Few services for sample are: &lt;a href="http://www.mailinator.com/"&gt;www.mailinator.com&lt;/a&gt;, &lt;a href="http://www.10minutemail.com/"&gt;www.10minutemail.com&lt;/a&gt; and there’s a lot more.&lt;/p&gt;
&lt;p&gt;Hurray! No more spam!&lt;/p&gt;
&lt;p&gt;Hope this helps, &lt;br /&gt;Tamir Shlomi.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=774383" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx">Tips &amp;amp; Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tech/default.aspx">Tech</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/OffTopic/default.aspx">OffTopic</category></item><item><title>Change Table Schema (Or Any Other Database Object) Using Alter Schema, MS SQL Server</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2010/12/29/change-table-schema-or-any-other-database-object-using-alter-schema-ms-sql-server.aspx</link><pubDate>Tue, 28 Dec 2010 22:33:29 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:761054</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=761054</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2010/12/29/change-table-schema-or-any-other-database-object-using-alter-schema-ms-sql-server.aspx#comments</comments><description>&lt;p&gt;This week I was using a database that contains few different schemas.   &lt;br /&gt;In the SPROC I was trying to execute some command on a new table I’ve just created but couldn’t find it on the SQL intelliSense.&lt;/p&gt;  &lt;p&gt;I thought it was intellisens cache issue so I refreshed it (using Ctrl+Shift+R), waited for few seconds and still couldn’t find it.&lt;/p&gt;  &lt;p&gt;After a minute or two I’ve noticed it is exist, but&lt;strong&gt; &lt;/strong&gt;on the default dbo schema instead of the desired schema. bad.&lt;/p&gt;  &lt;p&gt;When you create a new DB object on a schema different than the one it was intended for you don’t have to drop the object and recreate is again, it’s much simple. Just use the “ALTER SCHEMA” command to transfer an object between database schemas.&lt;/p&gt;  &lt;p&gt;Example:&lt;/p&gt;  &lt;p&gt;&lt;font style="background-color:#ffffff;" color="#0000ff"&gt;ALTER SCHEMA&lt;/font&gt; &lt;font color="#ff0000"&gt;targetSchema&lt;/font&gt; &lt;font color="#0000ff"&gt;TRANSFER &lt;/font&gt;&lt;font color="#ff0000"&gt;currentSchema&lt;/font&gt;.&lt;font color="#ff0000"&gt;objectName&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;More details, on the &lt;a href="http://msdn.microsoft.com/en-us/library/ms173423(v=SQL.110).aspx" target="_blank"&gt;MSDN&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hope this helps,   &lt;br /&gt;Tamir Shlomi.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=761054" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Database/default.aspx">Database</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>Connect SQL Server Named Instance Using Specific Port Number</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2010/01/25/connect-sql-server-named-instance-using-specific-port-number.aspx</link><pubDate>Mon, 25 Jan 2010 14:54:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:508500</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=508500</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2010/01/25/connect-sql-server-named-instance-using-specific-port-number.aspx#comments</comments><description>&lt;p&gt;Recently I encountered an exception while trying to connect to SQL Server named instance.&lt;/p&gt;
&lt;p&gt;We have a main server with SQL Server 2005 installed on as the default instance and another SQL Server 2008 installed as a named instance.&lt;/p&gt;
&lt;p&gt;The connection string I used was: &lt;br /&gt;&amp;quot;&lt;em&gt;&lt;strong&gt;Data Source=ServerName\InstanceName,1433;network library=dbmssocn;Initial Catalog=MyDataBaseName;Integrated security=SSPI&lt;/strong&gt;&lt;/em&gt;&amp;quot;&lt;/p&gt;We are using TCP/IP as the underlying connection method in order to connect to SQL Server. This can be done by using the connection string &lt;a href="http://support.microsoft.com/kb/238949" target="_blank"&gt;network library&lt;/a&gt; property. &lt;br /&gt;When the connection is made over TCP/IP, you can specify the desired port number to connect to at the &lt;em&gt;data source &lt;/em&gt;property (as you can see above - port 1433). 
&lt;p&gt;When I was trying to execute the &lt;a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.open.aspx" target="_blank"&gt;SqlConnection.Open()&lt;/a&gt; method, SqlException has been thrown. The SQL connection tried to connect the database that was located on the default SQL instance of the specified server (instead of the named instance) and encounter an error.&lt;/p&gt;
&lt;p&gt;At the beginning, I was pretty sure that this was because of the &amp;quot;Network library=dbmssocn&amp;quot; setting, but after a little research I&amp;#39;ve found that the problem that cause the connection to be established to the default instance instead of the desired named instance, was the fact that I&amp;#39;ve provide that specific port number.&lt;/p&gt;
&lt;p&gt;Only the SQL Server default instance listens to the 1433 port. Any other named instance uses a dynamic port number (This is all by default, and absolutely configurable).&lt;/p&gt;
&lt;p&gt;When specifying port number among SQL named instance, the named instance &lt;strong&gt;will be ignored &lt;/strong&gt;and the connection will be created against the default instance. &lt;br /&gt;That is why the exception has been thrown, as the database wasn&amp;#39;t exist on the default instance, but on the named one I&amp;#39;ve provided.&lt;/p&gt;
&lt;p&gt;Omitting the port number solves this issue and enables you to connect the named instance as well over TCP/IP.&lt;/p&gt;
&lt;p&gt;As mentioned above, you can easily configure your SQL Server named instance to use a fixed port number (e.g. for firewalls configuration).&lt;/p&gt;
&lt;p&gt;The most important thing you have to ensure when playing the ports configuration is when you&amp;#39;re writing the connection string, if you want to specify a port number, the SQL instance you turn to must be listening to that port. Otherwise, an error might be thrown.&lt;/p&gt;
&lt;p&gt;Anyway, the port number is a main factor of the connection string. If you&amp;#39;re trying to connect the default instance, but you providing one of the named instance ports, you&amp;#39;ll be connected to that named instance, and vice versa, if you try to connect a named instance but you specify the default instance port, you&amp;#39;ll be connected with the default instance. &lt;br /&gt;The connection will be made to the instance who&amp;#39;s listening to that port. &lt;br /&gt;When no one listen that port, you&amp;#39;ll get an exception saying:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)&amp;quot;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If the port is been listened, but belongs to another SQL Server instance which doesn&amp;#39;t have the database with the same name or you&amp;#39;re not authorized to access it, you&amp;#39;ll get another SqlException saying that the database couldn&amp;#39;t be open due to login permissions. &lt;br /&gt;If the database exists on the other server and you have permissions, your query will be executed against that (unwanted) server/database who&amp;#39;s listening to your port so be careful with that.&lt;/p&gt;
&lt;p&gt;Again, you can omit the port number and as long as the &lt;a href="http://msdn.microsoft.com/en-us/library/ms181087.aspx" target="_blank"&gt;SQL browser service&lt;/a&gt; is on, you won&amp;#39;t have any problem with that as the SQL browser service will find the port for you.&lt;/p&gt;
&lt;p&gt;You might consider turning the SQL browser service off, in order to enforce the client to know in advance the port number and specify it at the connection string when connecting the SQL server (e.g. for security reasons).&lt;/p&gt;
&lt;p&gt;That was a little bit overhead with SQL server instances and their TCP/IP ports but this is a cool stuff :-)&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;Tamir Shlomi.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Resources and further reading:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Setting connection string properties: &lt;/em&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/ms378988(SQL.90).aspx" href="http://msdn.microsoft.com/en-us/library/ms378988(SQL.90).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms378988(SQL.90).aspx&lt;/a&gt; 
&lt;li&gt;&lt;em&gt;Network library property:&lt;/em&gt; &lt;a title="http://support.microsoft.com/kb/238949" href="http://support.microsoft.com/kb/238949"&gt;http://support.microsoft.com/kb/238949&lt;/a&gt; 
&lt;li&gt;&lt;em&gt;Configuring SQL Server TCP/IP ports: &lt;/em&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/ms177440.aspx" href="http://msdn.microsoft.com/en-us/library/ms177440.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms177440.aspx&lt;/a&gt; 
&lt;li&gt;&lt;em&gt;Configuring SQL Server TCP/IP ports (more detailed, step-by-step guide): &lt;/em&gt;&lt;a title="http://www.databasejournal.com/features/mssql/article.php/3689846/Using-Non-Standard-Port-for-SQL-Server.htm" href="http://www.databasejournal.com/features/mssql/article.php/3689846/Using-Non-Standard-Port-for-SQL-Server.htm"&gt;http://www.databasejournal.com/features/mssql/article.php/3689846/Using-Non-Standard-Port-for-SQL-Server.htm&lt;/a&gt; 
&lt;li&gt;&lt;em&gt;SQL browser service: &lt;a title="http://msdn.microsoft.com/en-us/library/ms181087.aspx" href="http://msdn.microsoft.com/en-us/library/ms181087.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms181087.aspx&lt;/a&gt;&lt;/em&gt; &lt;/li&gt;&lt;/ol&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=508500" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Connection+String/default.aspx">Connection String</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Configuration/default.aspx">Configuration</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Database/default.aspx">Database</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>Override The XmlIgnoreAttribute When Using XmlSerializer</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/11/08/override-the-xmlignoreattribute-when-using-xmlserializer.aspx</link><pubDate>Sun, 08 Nov 2009 17:45:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:440210</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=440210</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/11/08/override-the-xmlignoreattribute-when-using-xmlserializer.aspx#comments</comments><description>&lt;p&gt;This post is about how to serialize type with properties that are decorated with XmlIgnoreAttribute (or any other XmlAttribute) using the XmlSerializer.&lt;/p&gt;
&lt;p&gt;When we will try to serialize an instance of type that one or more of its properties marked with XmlIgnoreAttribute, it will be unsurprising to find out that those properties are not shown at the serialized XML.&lt;/p&gt;
&lt;p&gt;We could just remove the XmlIgnoreAttribute from those properties, but what if the entity type declaration is out of our project scope or we can’t change it for some reason so the XmlIgnoreAttribute can’t be removed?&lt;/p&gt;
&lt;p&gt;Nice solution for this issue is by using the &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlattributeoverrides.aspx" target="_blank"&gt;XmlAttributeOverrides&lt;/a&gt; object which allows us to override an exist XmlAttributes and use it in order to create a new XmlSerializer that will be able to override those pre-defined attributes.&lt;/p&gt;
&lt;p&gt;The XmlAttributeOverrides object will instantiate a new Hashtable that will contains all the attributes to be override, so when creating the XmlSerializer, we will pass the XmlAttributeOverrides as second argument. &lt;br /&gt;Now, when serializing instance of that type, all the properties will be serialized, whether they decorated with XmlIgnoreAttribute or whether they aren’t.&lt;/p&gt;
&lt;p&gt;Here is a code sample for creating XmlSerializer overrider that will serialize properties with XmlIgnoreAttribute: &lt;br /&gt;&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;" id="codeSnippet"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;static&lt;/span&gt; XmlSerializer GetOverriderSerializer(Type entityType)&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;{&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    &lt;span style="COLOR:#008000;"&gt;// Create the XmlAttributeOverrides and XmlAttributes objects.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    XmlAttributeOverrides xmlOverrider = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; XmlAttributeOverrides();&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    &lt;span style="COLOR:#008000;"&gt;// get the type of the XmlIgnoreAttribute for the LINQ query&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    Type xmlIgnoreAttributeType = &lt;span style="COLOR:#0000ff;"&gt;typeof&lt;/span&gt;(XmlIgnoreAttribute);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    &lt;span style="COLOR:#008000;"&gt;// get all the property names which marks with XmlIgnoreAttribute&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    IEnumerable&amp;lt;&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; properties =&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;        from property &lt;span style="COLOR:#0000ff;"&gt;in&lt;/span&gt; entityType.GetProperties()&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;        let attributes =&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;            property.GetCustomAttributes(xmlIgnoreAttributeType, &lt;span style="COLOR:#0000ff;"&gt;true&lt;/span&gt;)&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;        &lt;span style="COLOR:#0000ff;"&gt;where&lt;/span&gt; attributes.Count() &amp;gt; 0&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;        select property.Name;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    &lt;span style="COLOR:#008000;"&gt;// assign XmlAttribute to override those fields with XmlIgnoreAttribute&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    &lt;span style="COLOR:#0000ff;"&gt;foreach&lt;/span&gt; (&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; propertyName &lt;span style="COLOR:#0000ff;"&gt;in&lt;/span&gt; properties)&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;        XmlAttributes xmlAttribute = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; XmlAttributes&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;        {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;            XmlIgnore = &lt;span style="COLOR:#0000ff;"&gt;false&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;        };&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;        xmlOverrider.Add(entityType, propertyName, xmlAttribute);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    }&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    &lt;span style="COLOR:#008000;"&gt;// create the overrider serialzier&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    XmlSerializer serializer = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; XmlSerializer(entityType, xmlOverrider);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;    &lt;span style="COLOR:#0000ff;"&gt;return&lt;/span&gt; serializer;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Of course this code can be changed to override any other XmlAttribute.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Hope you find this helpful :-)&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Tamir Shlomi&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=440210" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/XML/default.aspx">XML</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Serialization/default.aspx">Serialization</category></item><item><title>Generic List&lt;T&gt; Using svcutil.exe</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/06/16/generic-list-lt-t-gt-using-svcutil-exe.aspx</link><pubDate>Tue, 16 Jun 2009 05:56:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:338021</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=338021</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/06/16/generic-list-lt-t-gt-using-svcutil-exe.aspx#comments</comments><description>&lt;p&gt;When using the svcutil.exe in order to create WCF proxy, any reflected collection will be converted into System.Array by default.&lt;/p&gt;
&lt;p&gt;Good to know that this can be controlled using the svcutil.exe. &lt;br /&gt;You can define the output data type for collections using the &amp;quot;/ct:&amp;quot; keyword.&lt;/p&gt;
&lt;p&gt;For example, generating generic list collection (System.Collections.Generic.List&amp;lt;T&amp;gt;) will be done like that:&lt;/p&gt;
&lt;p&gt;svcutil.exe &lt;a href="http://localhost/Services/Sample.svc?wsdl"&gt;http://localhost/Services/Sample.svc?wsdl&lt;/a&gt; &lt;font color="#ff0000"&gt;/ct:System.Collections.Generic.List`1&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;This brings us all of the generics advantages and it is much more comfortable for working then the old System.Array.&lt;/p&gt;
&lt;p&gt;You can choose other collection types like ArrayList, Collection etc. &lt;br /&gt;Dictionary output data type can be controlled either.&lt;/p&gt;
&lt;p&gt;When using Visual Studio 2008, there is ready to use menu where you can define that. &lt;br /&gt;Right click your relevant service reference –&amp;gt; Configure service reference option and you can choose the output data type for collections and dictionaries types.&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;Tamir Shlomi&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=338021" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/WCF/default.aspx">WCF</category></item><item><title>Visual Studio Tips And Tricks</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/06/15/visual-studio-tips-and-tricks.aspx</link><pubDate>Mon, 15 Jun 2009 07:28:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:338002</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=338002</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/06/15/visual-studio-tips-and-tricks.aspx#comments</comments><description>&lt;p&gt;Visual Studio .NET Tips &amp;amp; Tricks is a very useful e-book you can download for free.&lt;/p&gt;
&lt;p&gt;Justifying its reputation, it contains a lot of useful tips and tricks about advanced using the IDE which makes coding much more comfortable and effective.&lt;/p&gt;
&lt;p&gt;I think that even experienced Visual Studio user will find it useful.&lt;/p&gt;
&lt;p&gt;Please note: even though it’s refers to the Visual Studio versions before the VS2008 it is still helpful as the most is the same across all the versions.&lt;/p&gt;
&lt;p&gt;As I mentioned before, it&amp;#39;s for free so here is the &lt;a href="http://www.infoq.com/books/vsnettt" target="_blank"&gt;download link&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Enjoy, :-)&lt;br /&gt;Tamir Shlomi&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=338002" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx">Tips &amp;amp; Tricks</category></item><item><title>RadDock With RadToolTipManager / RadToolTip</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/05/31/raddock-with-radtooltipmanager-radtooltip.aspx</link><pubDate>Sun, 31 May 2009 07:45:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:283223</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=283223</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/05/31/raddock-with-radtooltipmanager-radtooltip.aspx#comments</comments><description>&lt;p&gt;Will they dance together?&lt;/p&gt;
&lt;p&gt;Well, guess not that easy.&lt;/p&gt;
&lt;p&gt;When you are using RadToolTipManager and set its ‘AutoTooltipify’ property to “true”, &lt;br /&gt;every element on the page that has a &amp;#39;title&amp;#39; attribute will be automatically “tooltify” with RadToolTip instead of the yellow default one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The RadToolTip and RadDock integration problem:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The expected behavior is to have &lt;strong&gt;only one&lt;/strong&gt; tool tip, the telerik’s one, absolutely not double tooltips (telerik’s and the default). &lt;br /&gt;Updated to the current version of the RadControls for ASP.NET (version #2009.1.430.35), when the RadDock control will be tooltify by RadToolTipManager he’ll have them both. &lt;br /&gt;Additionally, while the default tooltip is updated (as expected) to display “expand” when the RadDock is collapsed and inversely, the RadToolTip will keep the tooltip text from the load time, which means that when the RadDock state was “collapsed” on the page rendering, it will keep display “expand” even after expanding it (when it should display “collapse”).&lt;/p&gt;
&lt;p&gt;Here is some screenshots describe the problem:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.microsoft.co.il/blogs/tamirs/CollapsedMode_620C677F.png" target="_blank"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="Collapsed Mode" border="0" alt="Collapsed Mode" src="http://blogs.microsoft.co.il/blogs/tamirs/CollapsedMode_thumb_7A2FD1DA.png" width="244" height="69" /&gt;&lt;/a&gt; &lt;br /&gt;RadDock is collapsed. Notice the double tooltips and that the RadToolTip text keeps the “collapse” value from loading time while the default tooltip works as expected.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/tamirs/ExpandedMode_5863F949.png" target="_blank"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="Expanded Mode" border="0" alt="Expanded Mode" src="http://blogs.microsoft.co.il/blogs/tamirs/ExpandedMode_thumb_2FE51735.png" width="244" height="120" /&gt;&lt;/a&gt; &lt;br /&gt;RadDock is expended. Still, there is double tooltips.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Suggested workaround:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We have two problems to deal with: first, is the unnecessary default tooltip and second is the RadToolTip wrong text.&lt;/p&gt;
&lt;p&gt;As first step, let’s register the RadDock “OnClientInitialize” event. &lt;br /&gt;Inside the handler, get the HTML element related with the “ExpandCollapse” command and remove its default tooltip by the removeAttribute() method. &lt;br /&gt;This will unsure we will have only single tooltip element for the control. &lt;br /&gt;Now, to ensure the RadToolTip will display the correct value, get the RadToolTipManager of the page (notice you catch the right one if you have more than one) and call its getToolTipByElement() method using the ExpandCollapse element as parameter. &lt;br /&gt;This will find the tooltip element related with the “ExpandCollapseCommand”. &lt;br /&gt;After having the ExpandCollapse element’s tooltip, register its &amp;quot;OnClientBeforeShow” event, there we can validate the tooltip text as fix it when necessary. &lt;br /&gt;At the OnClientBeforeShow event of the ExpandCollapseCommand’s tooltip, we relying on the element CSS class name to set the correct text, as although the displayed text is wrong, the RadDock CSS class switches as expected. &lt;br /&gt;Last thing we need to do is register the RadDock “OnClientCommand” event, as any collapse/expand command restores the default tooltip, so we have to remove it again.&lt;/p&gt;
&lt;p&gt;Here is the complete script for copy ‘n paste. Just wire your controls with the relevant events and fix the script to match your elements ID:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100.76%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;HEIGHT:661px;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&amp;lt;script type=&lt;span style="COLOR:#006080;"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; language=&lt;span style="COLOR:#006080;"&gt;&amp;quot;javascript&amp;quot;&lt;/span&gt;&amp;gt;
    &lt;span style="COLOR:#0000ff;"&gt;function&lt;/span&gt; radDockInitialize(radDock, args) {
        &lt;span style="COLOR:#008000;"&gt;// get the ExpandCollapse command&amp;#39;s element&lt;/span&gt;
        &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; expandCollapseElement = radDock.getCommand(&lt;span style="COLOR:#006080;"&gt;&amp;#39;ExpandCollapse&amp;#39;&lt;/span&gt;).get_element();
        &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (expandCollapseElement == &lt;span style="COLOR:#0000ff;"&gt;null&lt;/span&gt;) &lt;span style="COLOR:#0000ff;"&gt;return&lt;/span&gt;;
        &lt;span style="COLOR:#008000;"&gt;// remove the default tooltip&lt;/span&gt;
        expandCollapseElement.removeAttribute(&lt;span style="COLOR:#006080;"&gt;&amp;#39;title&amp;#39;&lt;/span&gt;);
        &lt;span style="COLOR:#008000;"&gt;// get the RadToolTipManager&lt;/span&gt;
        &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; ttManager = $find(&lt;span style="COLOR:#006080;"&gt;&amp;#39;radToolTipManager&amp;#39;&lt;/span&gt;);
        &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (ttManager) {
            &lt;span style="COLOR:#008000;"&gt;// get the tooltip for the ExpandCollapse element&lt;/span&gt;
            &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; expandCollapseTooltip = &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;&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; ttManager.getToolTipByElement(expandCollapseElement);
            &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (expandCollapseTooltip != &lt;span style="COLOR:#0000ff;"&gt;null&lt;/span&gt;) {
                &lt;span style="COLOR:#008000;"&gt;// register the element&amp;#39;s tooltip before show event&lt;/span&gt;
                expandCollapseTooltip.add_beforeShow(toolTipBeforeShow);
            }
        }
    }

    &lt;span style="COLOR:#0000ff;"&gt;function&lt;/span&gt; radDockCommand(radDock, args) {
        &lt;span style="COLOR:#008000;"&gt;// get the ExpandCollapse command&amp;#39;s element&lt;/span&gt;
        &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; expandCollapseElement = radDock.getCommand(&lt;span style="COLOR:#006080;"&gt;&amp;#39;ExpandCollapse&amp;#39;&lt;/span&gt;).get_element();
        &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (expandCollapseElement != &lt;span style="COLOR:#0000ff;"&gt;null&lt;/span&gt;) {
            &lt;span style="COLOR:#008000;"&gt;// remove the default tooltip in each collapse/expand command&lt;/span&gt;
            expandCollapseElement.removeAttribute(&lt;span style="COLOR:#006080;"&gt;&amp;#39;title&amp;#39;&lt;/span&gt;);
        }
    }

    &lt;span style="COLOR:#0000ff;"&gt;function&lt;/span&gt; toolTipBeforeShow(tooltip, eventArgs) {
        &lt;span style="COLOR:#008000;"&gt;// get the tooltip target control (the expand collapse element)&lt;/span&gt;
        &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; targetControl = tooltip.get_targetControl();
        &lt;span style="COLOR:#008000;"&gt;// rely the element class name to set the correct tooltip text&lt;/span&gt;
        &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (targetControl.className.match(/collapse/i)) {
            tooltip.set_content(&lt;span style="COLOR:#006080;"&gt;&amp;#39;Collapse&amp;#39;&lt;/span&gt;);
        }
        &lt;span style="COLOR:#0000ff;"&gt;else&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (targetControl.className.match(/expand/i)) {
            tooltip.set_content(&lt;span style="COLOR:#006080;"&gt;&amp;#39;Expand&amp;#39;&lt;/span&gt;);
        }
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Works perfectly. &lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;Tamir Shlomi&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=283223" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Telerik/default.aspx">Telerik</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Rad+Web+Controls/default.aspx">Rad Web Controls</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/CSS/default.aspx">CSS</category></item><item><title>OwnerAttribute Or: How To Own Visual Studio 2008 Unit Test</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/04/30/ownerattribute-or-how-to-own-visual-studio-2008-unit-test.aspx</link><pubDate>Thu, 30 Apr 2009 12:34:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:276784</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=276784</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/04/30/ownerattribute-or-how-to-own-visual-studio-2008-unit-test.aspx#comments</comments><description>&lt;p&gt;When working on a large project with a lot of test methods, that each one of them might be under the responsibility of another developer, finding your own unit test methods in the endless list is just like finding a needle in a haystack.&lt;/p&gt;
&lt;p&gt;This can be easily become much simple.&lt;/p&gt;
&lt;p&gt;When creating unit test for a process, Visual Studio generates unit test method decorated with the TestMethodAttribute. Now, to “own” the unit test, just add new attribute named “&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.ownerattribute(VS.80).aspx" target="_blank"&gt;OwnerAttribute&lt;/a&gt;” which specify the person responsible for the process behind that unit test.&lt;/p&gt;
&lt;p&gt;Sample:&lt;/p&gt;
&lt;div&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;[&lt;span style="COLOR:#2b91af;"&gt;TestMethod&lt;/span&gt;]
[&lt;span style="COLOR:#2b91af;"&gt;Owner&lt;/span&gt;(&lt;span style="COLOR:#a31515;"&gt;&amp;quot;Tamir Shlomi&amp;quot;&lt;/span&gt;)]
&lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;void&lt;/span&gt; UnitTestMethod()
{
    ...
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now, after you marked all your unit test with the OwnerAttribute, all you need to do to find your own unit tests is opening the TestView window (Test –&amp;gt; Windows –&amp;gt; TestView) and filter by Owner using the name you supplied at the OwnerAttribute and only yours unit tests will be listed, ready for running.&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;Tamir Shlomi&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=276784" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Unit+Test/default.aspx">Unit Test</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx">Tips &amp;amp; Tricks</category></item><item><title>Error: "Ajax client-side framework failed to load" After Login</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/04/23/error-quot-ajax-client-side-framework-failed-to-load-quot-after-login.aspx</link><pubDate>Thu, 23 Apr 2009 13:44:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:267341</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=267341</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/04/23/error-quot-ajax-client-side-framework-failed-to-load-quot-after-login.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;“Ajax client-side framework failed to load”.&lt;/font&gt; &lt;br /&gt;&lt;/strong&gt;If you encountered with the error message above after login to your site and you&amp;#39;re using the ASP.NET membership framework (and you verified that MS AJAX is properly installed), &lt;br /&gt;you can add the following configuration section to your web.config:&lt;/p&gt;
&lt;div&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;configuration&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
...
  &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;location&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;path&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;ScriptResource.axd&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
     &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;system.web&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
       &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;authorization&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
         &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;allow&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;users&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
       &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;authorization&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
     &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;system.web&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
   &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;location&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
...
&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;configuration&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This configuration setting allows any user accessing the ScriptResource.axd file &lt;br /&gt;who’s required for the AJAX client side framework to load, as when the website deny unauthorized users from accessing the required web page and redirect them back into the login page the required script files might not be downloaded for them and the above error may occur. &lt;br /&gt;Allowing access to this file for any user may fix this problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;Tamir Shlomi&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=267341" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Debug Javascript Over Running Website</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/24/debug-javascript-over-running-website.aspx</link><pubDate>Tue, 24 Mar 2009 16:42:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:257177</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=257177</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/24/debug-javascript-over-running-website.aspx#comments</comments><description>&lt;p&gt;Debugging javascript over running website should not be a problem, as long as you&amp;#39;re equipped with Firebug plug-in for Firefox. &lt;br /&gt;Just find the relevant script peace of code and insert new breakpoint.&lt;/p&gt;
&lt;p&gt;What if you don&amp;#39;t have Firebug installed, or you need to debug the script specifically over Internet Explorer for some reason (e.g. no javascript error on FF, only with IE)?&lt;/p&gt;
&lt;p&gt;Nice trick is to use the &amp;quot;&lt;strong&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/22/internet-explorer-web-development-helper.aspx" target="_blank"&gt;Web Development Helper&lt;/a&gt;&lt;/strong&gt;&amp;quot; IE plug-in to achieve this. &lt;br /&gt;Just open its Script Console window and write:&lt;/p&gt;
&lt;div&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;strong&gt;debugger;
&lt;/strong&gt;problematicFunction(args);&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Press the &amp;quot;execute&amp;quot;.&lt;/p&gt;
&lt;p&gt;This how we&amp;#39;re able to insert &amp;quot;debugger&amp;quot; into the javascript without editing the original code. &lt;br /&gt;The &amp;quot;debugger&amp;quot; will stop the script just before executing the bugged function so you will be able to step into and exam the objects/values to find the error cause.&lt;br /&gt;&lt;br /&gt;Hope this helps,&lt;br /&gt;Tamir Shlomi&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=257177" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/HTML/default.aspx">HTML</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Internet+Explorer/default.aspx">Internet Explorer</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx">Tips &amp;amp; Tricks</category></item><item><title>Internet Explorer Web Development Helper</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/22/internet-explorer-web-development-helper.aspx</link><pubDate>Sun, 22 Mar 2009 10:06:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:252473</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=252473</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/22/internet-explorer-web-development-helper.aspx#comments</comments><description>&lt;p&gt;Every web developer using Firefox might have Firebug plug-in installed.&lt;/p&gt;
&lt;p&gt;For the ones who uses Internet Explorer during the development there is similar tool that you probably already know, the &amp;quot;IE Developer Toolbar&amp;quot;. &lt;br /&gt;&lt;br /&gt;It&amp;#39;s very nice one but it is lacking a bit compared to Firebug.&lt;/p&gt;
&lt;p&gt;This post will talk about the &amp;quot;&lt;strong&gt;Web Development Helper&lt;/strong&gt;&amp;quot; which is a complementary tool for IE web developers, developed by &lt;a href="http://www.nikhilk.net/" target="_blank"&gt;Nikhil Kothari&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This tool introduce few helpful features, here is some of them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Script Console:&lt;/strong&gt; to execute your javascript code straight from the browser console. &lt;br /&gt;Additionally you can also load exist script file or save script to a file. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HTTP Logging: &lt;/strong&gt;log HTTP request sent from the browser and view the request and response details (much lighter, not over detailed like Fiddler). &lt;br /&gt;Include JSON viewer, very useful feature especially with AJAX calls. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Script Class Browser: &lt;/strong&gt;allows you to explore the javascript classes sent to the client side similarly as the .NET Reflector. you can watch the classes declaration and method overloads etc, just like the image below: &lt;br /&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/tamirs/ScriptClassBrowser_606AD97C.png"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="ScriptClassBrowser" border="0" alt="ScriptClassBrowser" src="http://blogs.microsoft.co.il/blogs/tamirs/ScriptClassBrowser_thumb_4CE29B3D.png" width="244" height="191" /&gt;&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;There are some more features like the DOM inspector, page information viewer and so on, &lt;br /&gt;so if you don&amp;#39;t have this installed already, it is very recommended to have it. &lt;br /&gt;For further reading and download, click &lt;a href="http://projects.nikhilk.net/WebDevHelper" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;br /&gt;Tamir Shlomi&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=252473" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/HTML/default.aspx">HTML</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Internet+Explorer/default.aspx">Internet Explorer</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx">Tips &amp;amp; Tricks</category></item><item><title>Delete space between table rows</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/18/delete-space-between-table-rows.aspx</link><pubDate>Wed, 18 Mar 2009 08:13:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:250735</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=250735</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/18/delete-space-between-table-rows.aspx#comments</comments><description>&lt;p style="DIRECTION:ltr;" align="left"&gt;There is a bug with IE (6/7) that when you try to draw a table to splice few images together there is some space between rows, that doesn’t clear even when you set the table cellpadding, cellspacing or even the border with “0” value.&lt;/p&gt;
&lt;p style="DIRECTION:ltr;" align="left"&gt;Something like this:&lt;/p&gt;
&lt;div style="DIRECTION:ltr;" align="left"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;table&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;cellspacing&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;cellpadding&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;border&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
       &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;img&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;src&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;first.gif&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
       &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;img&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;src&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;second.gif&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;table&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p style="DIRECTION:ltr;" align="left"&gt;It’s nothing with your WYSIWYG editor, it’s only the Internet Explorer. &lt;br /&gt;(Well, other browsers might be bugged too, but not FF/Chrome)&lt;/p&gt;
&lt;p style="DIRECTION:ltr;" align="left"&gt;&lt;strong&gt;&lt;font size="3"&gt;What you can do to remove that space?&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style="DIRECTION:ltr;" align="left"&gt;Two solutions: &lt;br /&gt;The first and quick one is to &lt;strong&gt;shrink&lt;/strong&gt; your HTML with no space (even not a row breaking) inside the TD elements. &lt;br /&gt;Like this:&lt;/p&gt;
&lt;div style="DIRECTION:ltr;" align="left"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;table&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;cellspacing&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;cellpadding&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;border&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;img&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;src&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;first.gif&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;img&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;src&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;second.gif&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;table&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div style="DIRECTION:ltr;" align="left"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="DIRECTION:ltr;" align="left"&gt;Be careful when you are using Visual Studio “Format Selection” option (CTRL K+D) or other quick formatting, it will set back those spaces and row breaks.&lt;/div&gt;
&lt;div style="DIRECTION:ltr;" align="left"&gt;Except this kind of case, I have noticed many times that IE set unneeded spaces between elements when there is space (or lines breaks) in the markup.&lt;/div&gt;
&lt;p style="DIRECTION:ltr;" align="left"&gt;Second option is setting vertical-align to your images using CSS. &lt;br /&gt;Setting the upper image to the bottom and the bottom image to the top will fix that too. &lt;br /&gt;Find more detailed explanation about this option &lt;a href="http://blogs.microsoft.co.il/blogs/shlomo/archive/2009/03/14/td-tr-vertical-align.aspx" target="_blank"&gt;here&lt;/a&gt; at &lt;a href="http://blogs.microsoft.co.il/blogs/shlomo" target="_blank"&gt;Shlomo&amp;#39;s blog&lt;/a&gt; [Hebrew].&lt;/p&gt;
&lt;div dir="ltr" align="left"&gt;Hope this helps,&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;Tamir Shlomi&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=250735" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/HTML/default.aspx">HTML</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Internet+Explorer/default.aspx">Internet Explorer</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/CSS/default.aspx">CSS</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx">Tips &amp;amp; Tricks</category></item><item><title>Page_Load Event Fires Twice</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/16/page-load-event-fires-twice.aspx</link><pubDate>Mon, 16 Mar 2009 11:57:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:249816</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>16</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=249816</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/16/page-load-event-fires-twice.aspx#comments</comments><description>&lt;p style="TEXT-ALIGN:left;DIRECTION:ltr;" align="left"&gt;I had a very annoying bug today. &lt;br /&gt;One of the pages at my web application raises its Page_Load event twice for some reason. &lt;br /&gt;At the first time, Page.IsPostBack = true, and false at the second time.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:left;DIRECTION:ltr;" align="left"&gt;One of the interesting things was that this wrong behavior described above was occurring only when browsing using Internet Explorer. Firefox wasn’t post back again (well, except if you right clicked the image and choose “View Image”, then it was posting back one more time, but not twice at a time). &lt;br /&gt;Go figure.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:left;DIRECTION:ltr;" align="left"&gt;I tried to debug my code, maybe I was executing some code that cause the page to load again, maybe something from the client-side was doing post back to the server, nothing.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:left;DIRECTION:ltr;" align="left"&gt;Start googling.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:left;DIRECTION:ltr;" align="left"&gt;I did found a few reasons about what can cause the page load event to fire twice: &lt;br /&gt;things like setting the Page’s “AutoEventWireup” property as “true” (while explicit wiring the page event in code), redirecting back to the page itself, or maybe one of the auto post back controls fire the wasted post back and none of those cases was not my problem.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:left;DIRECTION:ltr;" align="left"&gt;When googling, I noticed someone talk about img element (or another element’s background-image url) that when its src attribute ignored, set to nothing (“”) or just “#” it can make the page load event to fire twice, but I was very skeptic about it, so I try to check options that seems more relevant to me.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:left;DIRECTION:ltr;" align="left"&gt;After trying all the options, I searched my app where I set “” to src of an image, and I did found one image that cause this double post back. &lt;br /&gt;This image src should be set on the client side so i didn’t set it on the markup, so as a solution for this issue, I set the initial image src using 1x1 px transparent image. &lt;br /&gt;Page_Load raise only once each.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:left;DIRECTION:ltr;" align="left"&gt;The explanation for this odd behavior is very simple: &lt;br /&gt;When you create an img element and leave its src attribute empty, it will automatically set as your root directory (e.g. “http://www.mysite.com/”). &lt;br /&gt;Therefore, when the Page_Load event fire for the first time, with the original post back (POST request) the Page.IsPostBack will be set with “true”. But when the server response will be parsed at the client side, another GET request will be fired to the server, requesting that image (that its src was set to the root url by default) and this is why the Page.IsPostBack property will be initialized with “false” value&amp;nbsp; for the second time. &lt;br /&gt;So, notice that all of your page images will have their src filled :-)&lt;/p&gt;
&lt;div dir="ltr" align="left"&gt;Hope this helps,&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;Tamir Shlomi&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=249816" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/HTML/default.aspx">HTML</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Telerik RadComboBox Cause An Error Saying: “Stop running this script?”</title><link>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/11/adding-items-to-radcombobox-cause-error-saying-stop-running-this-script.aspx</link><pubDate>Wed, 11 Mar 2009 09:54:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:246059</guid><dc:creator>Tamir Shlomi</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/tamirs/rsscomments.aspx?PostID=246059</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/tamirs/archive/2009/03/11/adding-items-to-radcombobox-cause-error-saying-stop-running-this-script.aspx#comments</comments><description>&lt;p dir="ltr" align="left"&gt;In our current project we are using the RadControls toolkit for ASP.NET AJAX from Telerik at the presentation layer.&lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;One of the controls we were used the most was the RadComboBox for its wide client side API, enables you to make changes at the client side without bothering the server with tasks like filling new list of items, remove some etc.&lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;I had few cascading combo boxes and I was using AJAX web-service to add items to the one depends on the other selected value on the client-side. &lt;br /&gt;Everything was fine until one big response sent back from the WS with new list of items and IE prompted the following script error message:&lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;&amp;quot;Stop running this script? &lt;br /&gt;A script on page is causing Internet Explorer to run slowly...&amp;quot; &lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/tamirs/scriptTimeOutError_3035ED33.png"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="IE Script Time Out Error Message" border="0" alt="IE Script Time Out Error Message" src="http://blogs.microsoft.co.il/blogs/tamirs/scriptTimeOutError_thumb_1B46FB71.png" width="244" height="113" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;Well, I checked the response from the WS and it wasn&amp;#39;t that big, but still, the script was already exceed its time-out period and cause an error message to alert.&lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;The &lt;a href="http://www.telerik.com/help/aspnet-ajax/combo_itemsclientside.html" target="_blank"&gt;Telerik formal way&lt;/a&gt; for adding new RadComboBoxItems at the client side is like this:&lt;/p&gt;
&lt;div style="TEXT-ALIGN:left;" dir="ltr"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#0000ff;"&gt;function&lt;/span&gt; AddNewItem()
{   
   &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; combo = $find(&lt;span style="COLOR:#006080;"&gt;&amp;quot;&amp;lt;%= RadComboBox1.ClientID %&amp;gt;&amp;quot;&lt;/span&gt;);
   &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; comboItem = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; Telerik.Web.UI.RadComboBoxItem();
   comboItem.set_text(&lt;span style="COLOR:#006080;"&gt;&amp;quot;New Item&amp;quot;&lt;/span&gt;);
   &lt;b&gt;combo.trackChanges();&lt;/b&gt;
   combo.get_items().add(comboItem);
   comboItem.select();
   &lt;b&gt;combo.commitChanges();&lt;/b&gt;
} &lt;/pre&gt;&lt;/div&gt;
&lt;p dir="ltr" align="left"&gt;notice the “trackChanges” and the “commitChanges” methods, which&amp;#39;s responsible to transparent the client changes at the server side.&lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;Those two calls to track and commit are the bottleneck preventing the script from running free as long as they tracking changes for many items.&lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;If you remove them, you can find how fast this script running, but the direct result will be losing all those items on the server side.&lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;To enjoy the speed when there is no tracking and get the finally user’s selected item, I used a nice trick ;)&lt;/p&gt;
&lt;p dir="ltr" align="left"&gt;I used the same way for adding new items, &lt;strong&gt;without&lt;/strong&gt; the track/commit changes methods, and set new client event handler at the form submit button with the following functionality:&lt;/p&gt;
&lt;div style="TEXT-ALIGN:left;" dir="ltr"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#0000ff;"&gt;function&lt;/span&gt; onSubmitForm () {
   &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; combo = $find(&lt;span style="COLOR:#006080;"&gt;&amp;quot;&amp;lt;%= RadComboBox1.ClientID %&amp;gt;&amp;quot;&lt;/span&gt;);
   &lt;span style="COLOR:#008000;"&gt;// clearing the combo items so the following combo item insert will take effect.&lt;/span&gt;
   &lt;span style="COLOR:#008000;"&gt;// notice: combo items will be reset after post back, except this saved one.&lt;/span&gt;
   combo.clearItems();
   &lt;span style="COLOR:#008000;"&gt;// create new ComboItem for the user&amp;#39;s selected item&lt;/span&gt;
   &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; selectedItem = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; Telerik.Web.UI.RadComboBoxItem();
   selectedItem.set_text(combo.get_text());
   selectedItem.set_value(combo.get_value());
   &lt;span style="COLOR:#008000;"&gt;// add the item to the combo under &amp;quot;Tracking changes&amp;quot; mode&lt;/span&gt;
   combo.trackChanges();
   combo.get_items().add(selectedItem);
   combo.commitChanges();
}&lt;/pre&gt;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;This code will set the selected item as “known” item even through post back, so it will be found in the combo items collection at the server side.&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;Now, even for more than 50 records, the response with the client side work is very fast.&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;As already mentioned, this solution taking care the script time out problem and keeps only the selected item. All other items will not be displayed after posting back to the server,&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;(this can be solved at the server side at the post back) but it answer my needs.&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;Another possible way to solve this script time out error is to mimic multithreaded behavior by splitting the work using the window.setTimeOut() or window.setInterval() functions and insert only few items each time under track changes mode.&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;BTW, Mozilla announced their own mechanism for creating threads at the client side with their &lt;a href="https://developer.mozilla.org/en/The_Thread_Manager" target="_blank"&gt;Thread Manager&lt;/a&gt; using Firefox 3.&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;Hope this helps,&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;Tamir Shlomi&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=246059" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Telerik/default.aspx">Telerik</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/Rad+Web+Controls/default.aspx">Rad Web Controls</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/tamirs/archive/tags/C_2300_/default.aspx">C#</category></item></channel></rss>
