<?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-4826608231128891172</id><updated>2024-09-24T18:52:43.756-07:00</updated><title type='text'>A .Net muse</title><subtitle type='html'>Musings of a .Net developer based in the U.K.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4826608231128891172.post-4344473186115643829</id><published>2010-04-08T02:29:00.000-07:00</published><updated>2010-04-08T02:29:00.798-07:00</updated><title type='text'>HTML Redirect</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: verdana; font-size: 1em; line-height: 1.5em;&quot;&gt; I was asked the other day how to perform an HTML redirect and thought  I&#39;d share it. I know it&#39;s quite a simple thing, but as they say on Who  Wants To Be A Millionaire, the question&#39;s only easy if you know the  answer!  &lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #f4f4f4; font-family: Courier New; font-size: 1em; line-height: 1.5em;&quot;&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;title&amp;gt;Your Page Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;meta content=&quot;0;url=http://www.domain-name-to-redirect-to.com&quot; http-equiv=&quot;REFRESH&quot;&gt;&amp;lt;/meta&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your optional text here.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: verdana; font-size: 1em; line-height: 1.5em;&quot;&gt; The first line that we&#39;re interested in is, &amp;lt;meta content=&quot;0;url=http://www.domain-name-to-redirect-to.com&quot; http-equiv=&quot;REFRESH&quot;&amp;gt;&amp;lt;/meta&amp;gt;.&amp;nbsp; This  will redirect the user to the appropriate website after 0 seconds.&amp;nbsp; You  can make the browser redirect as short or as long as you wish.&lt;br /&gt;
&lt;br /&gt;
Finally, in the BODY tag, you can enter optional text which you can  display to the user, informing them, perhaps, that you are redirecting  them.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana; font-size: 1em; line-height: 1.5em;&quot;&gt; The HTML redirect has a further application; I frequently write websites  for customers who sign up for hosting packages where the control panel  does not allow the MIME types to be altered or added to. So if someone  accidentally lands on &lt;span style=&quot;background-color: #f4f4f4; color: black; font-family: courier new;&quot;&gt;www.website-name.com&lt;/span&gt;,  your files will be displayed (.aspx, .aspx.cs...). If you really want  them to go to &lt;span style=&quot;background-color: #f4f4f4; color: black; font-family: courier new;&quot;&gt;www.website-name.com/Login.aspx&lt;/span&gt;,  you can write a redirect page. First, find out from the hosting  provider the default MIME types and then create a file, using one of the  names provided, copy the above code, and you have your own redirect to &lt;span style=&quot;background-color: #f4f4f4; color: black; font-family: Courier New;&quot;&gt;www.website-name.com/Login.aspx! &lt;/span&gt; &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/4344473186115643829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/04/html-redirect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/4344473186115643829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/4344473186115643829'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/04/html-redirect.html' title='HTML Redirect'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-91794101494295888</id><published>2010-04-07T02:27:00.000-07:00</published><updated>2010-04-07T02:27:00.465-07:00</updated><title type='text'>Webservices and data structures</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: verdana; font-size: 1em; line-height: 1.5em;&quot;&gt; Today I needed to write some webservices to talk to our Microsoft  Navision system, but instead of just passing over individual data types,  I needed to pass over large amounts of data in one call. To achieve  this, I created classes to hold the data to pass back and forth. To  achieve this, I created a folder in my webservice, and placed the  classes in the folder.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana; font-size: 1em; line-height: 1.5em;&quot;&gt; The structure of one of the classes (customer) is show below:  &lt;/div&gt;&lt;div style=&quot;background-color: #f4f4f4; font-family: Courier New; font-size: 1em; line-height: 1.5em;&quot;&gt; namespace WebService&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;public class wss_Customer&lt;br /&gt;
&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string No_ = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string Names = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string Name2 = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string Address = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string Address2 = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string City = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string Contact = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string PhoneNo_ = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public decimal CreditLimit_LCY = 0.0M;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string CurrencyCode = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string SalespersonCode = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string CustomerDiscGroup = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public bool PricesIncludingVAT = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string PostCode = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string County = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string VATBusPostingGroup = string.Empty;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public int CreditStatus = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public int Blocked = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public bool AllowLineDisc_ = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public string CustomerPriceGroup = string.Empty;&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: verdana; font-size: 1em; line-height: 1.5em;&quot;&gt; Once I had created the classes, I thought I&#39;d return to my console,  calling app, update the webservice reference and start filling the class  structure, without first writing the web method routines. But I  couldn&#39;t see the class structures. After much &#39;faffing&#39; about, I found  that I needed to at least write the web method stubs, including the  necessary class structure, as show below:  &lt;/div&gt;&lt;div style=&quot;background-color: #f4f4f4; font-family: Courier New; font-size: 1em; line-height: 1.5em;&quot;&gt; [WebMethod]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public int PostUnsynchedCustomer_18(wss_Customer custToSynch, string  value)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: verdana; font-size: 1em; line-height: 1.5em;&quot;&gt; After doing this, compiling the webservice, updating the webservice  reference in the console app, I found that I could see the class  structure and start populating it with data. &lt;br /&gt;
&lt;br /&gt;
I would love to hear if anyone else has had similar problems or  alternative ways of achieving this.  &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/91794101494295888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/04/webservices-and-data-structures.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/91794101494295888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/91794101494295888'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/04/webservices-and-data-structures.html' title='Webservices and data structures'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-5463321915817447171</id><published>2010-04-06T08:35:00.000-07:00</published><updated>2010-04-06T08:36:35.853-07:00</updated><title type='text'>Altering the error message in a asp:CustomerValidator</title><content type='html'>&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Word.Document&quot; name=&quot;ProgId&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Generator&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Originator&quot;&gt;&lt;/meta&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml&quot; rel=&quot;File-List&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_preview.wmf&quot; rel=&quot;Preview&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx&quot; rel=&quot;themeData&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot;&gt;&lt;/link&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:&quot;Cambria Math&quot;;
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1107304683 0 0 415 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-520092929 1073786111 9 0 415 0;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:-520092929 1073806591 9 0 415 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:&quot;&quot;;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:&quot;Times New Roman&quot;;
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:&quot;Times New Roman&quot;;
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;  &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;I&#39;m currently using an asp:CustomerValidator, and depending on some of the logic within the method that I&#39;m using, I wanted to alter the error message.&amp;nbsp; So after a little playing around I found that you can access the error message through the sender param that&#39;s passed in to your validation method.&amp;nbsp; So here&#39;s the method signature which everyone will be familiar with&lt;/span&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Word.Document&quot; name=&quot;ProgId&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Generator&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Originator&quot;&gt;&lt;/meta&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml&quot; rel=&quot;File-List&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_preview.wmf&quot; rel=&quot;Preview&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx&quot; rel=&quot;themeData&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot;&gt;&lt;/link&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:&quot;Cambria Math&quot;;
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1107304683 0 0 415 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-520092929 1073786111 9 0 415 0;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:-520092929 1073806591 9 0 415 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:&quot;&quot;;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:&quot;Times New Roman&quot;;
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:&quot;Times New Roman&quot;;
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;  &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9pt; line-height: 115%;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt; line-height: 115%;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ETAValueCheck(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: #2b91af;&quot;&gt;ServerValidateEventArgs&lt;/span&gt; args)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;So through the &lt;/span&gt;sender&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt; param you can access the ErrorMessage property as follows:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Word.Document&quot; name=&quot;ProgId&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Generator&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Originator&quot;&gt;&lt;/meta&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml&quot; rel=&quot;File-List&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_preview.wmf&quot; rel=&quot;Preview&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx&quot; rel=&quot;themeData&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CROBERT%7E1.ANG%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot;&gt;&lt;/link&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:&quot;Cambria Math&quot;;
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1107304683 0 0 415 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-520092929 1073786111 9 0 415 0;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:-520092929 1073806591 9 0 415 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:&quot;&quot;;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:&quot;Times New Roman&quot;;
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:&quot;Times New Roman&quot;;
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;  &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt; line-height: 115%;&quot;&gt;((&lt;span style=&quot;color: #2b91af;&quot;&gt;CustomValidator&lt;/span&gt;)sender).ErrorMessage = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;This is a test&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;And that&#39;s it!&amp;nbsp; It really is that easy!&amp;nbsp; Simples!&amp;nbsp;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/5463321915817447171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/04/altering-error-message-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/5463321915817447171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/5463321915817447171'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/04/altering-error-message-in.html' title='Altering the error message in a asp:CustomerValidator'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-7805513402953580860</id><published>2010-04-06T02:24:00.000-07:00</published><updated>2010-04-06T02:24:00.707-07:00</updated><title type='text'>ASP.NET Caching</title><content type='html'>&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;If you want to cache images or anything, in your ASP.NET page, you can  either use the following in the markup: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;%@ OutputCache Location=&quot;None&quot; %&amp;gt; &lt;/span&gt; &lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
or set the Cache property of the HttpResponse in your code-behind class:  &lt;/span&gt; &lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Response.Cache.SetCacheability(HttpCacheability.No Cache);&lt;/span&gt;   &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/7805513402953580860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/04/aspnet-caching.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/7805513402953580860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/7805513402953580860'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/04/aspnet-caching.html' title='ASP.NET Caching'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-347496400500230922</id><published>2010-04-05T02:23:00.000-07:00</published><updated>2010-04-05T02:23:00.307-07:00</updated><title type='text'>CSS Gradient Background</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; I wanted to create a gradient background to use on one of my web sites  today, and thought I&#39;d share this.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; &lt;u&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;/u&gt;  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; Create a new graphic file in your favourite graphics package (Firefox,  Photoshop etc).&amp;nbsp; Make the image the following dimensions:  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; Width: 1px&lt;br /&gt;
Height: 1000px  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; Now choose web safe colours, as this will ensure that the colours are  displayed as you want them to.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; Finally, using the gradient tool, fill the 1px x 1000px area with your  chosen colours.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; &lt;u&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;/u&gt;  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; Now choose where you want the background gradient to appear, i.e. the  body tag, a container tag etc.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; Open your CSS file and type the following:  &lt;/div&gt;&lt;span style=&quot;color: #a31515;&quot;&gt; &lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; .body &lt;br /&gt;
{ &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;background-image&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;url(../Images/GradientBackground.jpg)&lt;/span&gt;;  &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;background-repeat&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;repeat-x&lt;/span&gt;;  &lt;br /&gt;
}  &lt;/div&gt;&lt;/span&gt; &lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; There you have it, you&#39;re background will now have a lovely gradient  colour!  &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/347496400500230922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/04/css-gradient-background.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/347496400500230922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/347496400500230922'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/04/css-gradient-background.html' title='CSS Gradient Background'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-5436867323786499508</id><published>2010-04-04T02:22:00.000-07:00</published><updated>2010-04-04T02:22:00.336-07:00</updated><title type='text'>SQL Server Row_Number()</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt;I wanted to do some, for me, unusual SELECT statements on data that we  had for one of our customers; I wanted to select data between two  sequential values, but unfortunately, none of the columns assisted me in  anyway (they have a lot of varchar columns).&amp;nbsp; So I remember that with  SQL Server 2005, Microsoft provided some sort of row ID.&amp;nbsp; So after a bit  of digging around (in other words Googling!), I found Microsoft provide  the function ROW_NUMBER().&amp;nbsp; Ha ha, just the ticket!&amp;nbsp; So after 10  minutes of playing with the new function, here is what I came up with:  &lt;/div&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WITH&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;temp_table_name&gt; &lt;/temp_table_name&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SELECT&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;ROW_NUMBER&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;OVER&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ORDER&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;BY&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;field_name&gt; &lt;/field_name&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ASC&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;ROWID&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;table_name&gt;&lt;/table_name&gt;&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;)  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;select&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;From&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;temp_table_name&gt; &lt;/temp_table_name&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;where&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; ROWID &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;between&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 0 &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;and&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 10&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt;The &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;temp_table_name&gt;&lt;/temp_table_name&gt;&lt;/b&gt;&lt;/span&gt; isn&#39;t  the normal #temp table, because if you do a select from it, the table  doesn&#39;t exist, only within the WITH clause.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt;I hope this helps others as it took me time to find the answer and if  anyone knows what the WITH clause means, I would be interested to hear.  &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/5436867323786499508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/04/sql-server-rownumber.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/5436867323786499508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/5436867323786499508'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/04/sql-server-rownumber.html' title='SQL Server Row_Number()'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-2115077363912255971</id><published>2010-04-03T02:21:00.000-07:00</published><updated>2010-04-03T02:21:00.112-07:00</updated><title type='text'>You are not authorized to view this page</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; I was at a customer site the other day, attempting to set up IIS web  site for my web service (.asmx), but I kept getting the error message,  &quot;You are not authorized to view this page&quot;.&amp;nbsp; I couldn&#39;t figure out what  was causing this and was trying everything from changing the permissions  to deleting the web site and starting again, but nothing was working.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; After a while I managed to get a different error message saying that the  XML for the file, filename.asmx.cs, was incorrect!&amp;nbsp; What?&amp;nbsp; Then it  dawned on me that I had written the web service against .Net 3.5, and so  installed the .Net 3.5 re-distributable.&amp;nbsp; Great, the XML message  disappeared, but the &quot;...not authorized&quot; page was back! &lt;img alt=&quot;Cry&quot; border=&quot;0&quot; height=&quot;18&quot; src=&quot;http://www.enything.net/editors/tiny_mce/plugins/emotions/images/smiley-cry.gif&quot; title=&quot;Cry&quot; width=&quot;18&quot; /&gt;  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; So after a lot of playing around, I found that the following settings  made the error message disappear:  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; 1. Go to the Directory Security tab and put a tick in the box, Enable  Anonymous Access, and un-tick the remaining four boxes.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; 2. Go to the web service extensions section and click the Allow button  for, All Unknown ISAPI Extensions.  &lt;/div&gt;3. And I uninstalled the .Net 3.5 re-distributable and then re-install  it.  &lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; Brilliant!&amp;nbsp; The XML message went away and so too did the error message. &lt;img alt=&quot;Cool&quot; border=&quot;0&quot; height=&quot;18&quot; src=&quot;http://www.enything.net/editors/tiny_mce/plugins/emotions/images/smiley-cool.gif&quot; title=&quot;Cool&quot; width=&quot;18&quot; /&gt;  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; However, I then had a different message from my code saying that the  user, NETWORK ACCESS, code couldn&#39;t access the Microsoft.Net x.x  folder.&amp;nbsp; So I navigated to the said folder, and gave read &amp;amp; write  permissions to the user, NETWORK ACCESS.  &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; This finally solved my problem and I was away.&amp;nbsp; Hope this helps.  &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/2115077363912255971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/04/you-are-not-authorized-to-view-this.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/2115077363912255971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/2115077363912255971'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/04/you-are-not-authorized-to-view-this.html' title='You are not authorized to view this page'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-2839400035483137807</id><published>2010-04-02T02:20:00.000-07:00</published><updated>2010-04-02T02:20:00.551-07:00</updated><title type='text'>RaiseBubbleEvent</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; I&#39;ve just discovered the cool RaiseBubbleEvent that&#39;s provided within  ASP.NET.&amp;nbsp; As the name suggests, it bubbles up event from the called  methods, to the calling methods.&amp;nbsp; So, first, here&#39;s the code and  afterwards I&#39;ll tell you why I needed to make use of it. &lt;/div&gt;&lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;  SomeCalledMethod() &lt;br /&gt;
{ &lt;br /&gt;
&lt;blockquote&gt;    &lt;span style=&quot;color: green;&quot;&gt;/* Do some processing */&lt;/span&gt;  &lt;br /&gt;
...  &lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;/* Now raise the bubble event up to the calling  method.&amp;nbsp; &lt;/span&gt;  &lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;Whoever consumes this bubble event, they will  know that it&#39;s telling them to Rebind.&amp;nbsp; Any phrase/word can be placed in  here */&lt;/span&gt;  &lt;br /&gt;
CommandEventArgs args = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;CommandEventArgs&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Rebind&quot;&lt;/span&gt;,  &lt;span style=&quot;color: #2b91af;&quot;&gt;String&lt;/span&gt;.Empty);  &lt;br /&gt;
RaiseBubbleEvent(&lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;, args);  &lt;br /&gt;
&lt;/blockquote&gt;} &lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;  protected &lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt;  OnBubbleEvent(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; source, &lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt; args)&lt;/span&gt;   { &lt;br /&gt;
&lt;blockquote&gt;    &lt;span style=&quot;color: #2b91af;&quot;&gt;CommandEventArgs&lt;/span&gt; e = (&lt;span style=&quot;color: #2b91af;&quot;&gt;CommandEventArgs&lt;/span&gt;)args;  &lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (e.CommandName == &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Rebind&quot;&lt;/span&gt;)  &lt;br /&gt;
{  &lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;//Rebind code goes here&lt;/span&gt;  &lt;br /&gt;
}  &lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;  &lt;br /&gt;
&lt;/blockquote&gt;} &lt;br /&gt;
&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; The reason that I&#39;m having to use this code is because I&#39;m creating a  web shop for a customer of ours and creating a shopping basket/cart.&amp;nbsp;  The markup for the cart became quite long as I have 40 textboxes  allowing the customer to type in part numbers directly, instead of  browsing, so I thought I&#39;d create a couple of user controls that could  be reused in other projects.&amp;nbsp; However, when the user clicked on the  &quot;place all 40 items in the cart&quot; button, it has to do some validation  etc and then if successful, the shopping cart has to be displayed, but  the logic to display the cart was in the basket.aspx page, and how was I  going to inform this page that the shopping cart needed to be  displayed. &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; So after a few suggestions from my colleagues, I tried using javascript  and window.location.reload(), then history.go(0) and finally  window.location.href=window.location.href.&amp;nbsp; Unfortunately the first two  went into an endless loop reloading the page, asking did I really want  to reload the page and the final one worked, but it just reloaded empty  controls.&amp;nbsp; So I thought, okay, I&#39;ll use &amp;amp; set EnableViewState in the  root for page, usercontrol and asp controls, but still no luck.&amp;nbsp; I then  came across RaiseBubbleEvent and learnt of it&#39;s magical powers!&amp;nbsp; I wish  I had been introduced to it years ago! &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; Anyway, happy bubbling! &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/2839400035483137807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/04/raisebubbleevent.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/2839400035483137807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/2839400035483137807'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/04/raisebubbleevent.html' title='RaiseBubbleEvent'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-631885534786842109</id><published>2010-04-01T02:18:00.000-07:00</published><updated>2010-04-01T02:18:00.483-07:00</updated><title type='text'>IIS 7 ISAPI Filters</title><content type='html'>&lt;div style=&quot;font-family: Verdana,sans-serif; font-size: 1em; line-height: 1.5em;&quot;&gt;Wow!&amp;nbsp; I have just spent nearly 4  hours trying to get a new web site up and running on Windows Server  2008, for one of our customers (as explained &lt;a href=&quot;http://www.enything.net/post/Error-Cannot-write-configuration-file-due-to-insufficient-permissions.aspx&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; in another article, but this time relating to  having insufficient IIS permissions), all courtesy of the ISAPI filters  and ISAPI extensions not being installed.&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif; font-size: 1em; line-height: 1.5em;&quot;&gt;I knew where to install them on  Vista, but it was Windows Server 2008 that was causing me the problems  because they&#39;re not enabled in the same place. So, for those who need to  know in Vista, follow the instructions immediately below. For those  wanting to achieve it on Windows Server 2008, scroll down a little.&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif; font-size: 1em; line-height: 1.5em;&quot;&gt;&lt;strong&gt;&lt;u&gt;Vista&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Go to: &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Control Panel&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;  -&amp;gt; &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Programs and Features&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; -&amp;gt; &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Turn Windows  features on and off&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; (on the left hand side of the screen) and  then navigate to what is shown below (you&#39;ll need at least ISAPI &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Extensions&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;  and &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;ISAPI Filters&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; ticked):&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwezRtkcG7FF3IDm5ddb14uh8sJRtb4725ILzHnjvEIV1-20E7EkfCiRkGgBQych2d5lE68JIuB9_HLM2zWoOiyUXVUUrgJdlEBIPgdm-ddx9a7pL0llVD3QGaF3PyDgDPpZOhxOdxt1mS/s1600-h/VistaISAPI.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwezRtkcG7FF3IDm5ddb14uh8sJRtb4725ILzHnjvEIV1-20E7EkfCiRkGgBQych2d5lE68JIuB9_HLM2zWoOiyUXVUUrgJdlEBIPgdm-ddx9a7pL0llVD3QGaF3PyDgDPpZOhxOdxt1mS/s320/VistaISAPI.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif; line-height: 1.5em;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;strong&gt;&lt;u&gt;Windows Server 2008&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Go to: &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Control Panel&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;  -&amp;gt; &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Programs and Features&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; -&amp;gt; &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Turn Windows  features on and off&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; (on the left hand side of the screen) and  then choose the Roles value on the left -&amp;gt; followed by Web Server  (IIS). Then on the right hand side, choose the Add Role Services. Then  navigate to the Application Development and tick the &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;ASP.NET&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;,  &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;ISAPI Extensions&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; &amp;amp; &lt;/span&gt;&lt;strong style=&quot;font-family: Verdana,sans-serif;&quot;&gt;ISAPI Filters&lt;/strong&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;.  As shown below:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAz8FhdoB_ymQwCH5FC5HPP-XnRXIxYJfeiEZAU0sxKhshmjc0PfEGqbEVzuSlA-mRMxXReeTdAYuaew_24U9H7DZWGdGLJrCfhdgUwHQUU9ZzPxbsb1BPAAbW5OzqHMcGXC7-87U-WrN6/s1600-h/Server2008ISAPI.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAz8FhdoB_ymQwCH5FC5HPP-XnRXIxYJfeiEZAU0sxKhshmjc0PfEGqbEVzuSlA-mRMxXReeTdAYuaew_24U9H7DZWGdGLJrCfhdgUwHQUU9ZzPxbsb1BPAAbW5OzqHMcGXC7-87U-WrN6/s320/Server2008ISAPI.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/631885534786842109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/04/iis-7-isapi-filters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/631885534786842109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/631885534786842109'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/04/iis-7-isapi-filters.html' title='IIS 7 ISAPI Filters'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwezRtkcG7FF3IDm5ddb14uh8sJRtb4725ILzHnjvEIV1-20E7EkfCiRkGgBQych2d5lE68JIuB9_HLM2zWoOiyUXVUUrgJdlEBIPgdm-ddx9a7pL0llVD3QGaF3PyDgDPpZOhxOdxt1mS/s72-c/VistaISAPI.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4826608231128891172.post-8709841959213428978</id><published>2010-03-31T02:17:00.000-07:00</published><updated>2010-03-31T02:17:00.747-07:00</updated><title type='text'>Failed to start monitoring changes to Global.asax</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; I was happily coding away the other day, when I came across the  following error message when compiling my code in VS 2008: Failed to  start monitoring changes to global.asax.&amp;nbsp; After a scratch of the head  and another attempt at compiling, I still got the same message.&amp;nbsp; After a  bit of digging around, I found the problem was in my web.config file  and the offending line was:  &lt;/div&gt;&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; &lt;identity impersonate=&quot;true&quot; password=&quot;your_password&quot; username=&quot;your_domain_name\your_username&quot;&gt;  &lt;/identity&gt;&lt;/div&gt;&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; After I removed this line, it compiled successfully.&amp;nbsp; Strange thing was,  I have had this line in my web.config file for a long time and only now  was the compiler working.&amp;nbsp; If anyone has any suggestions as to why, I&#39;d  be grateful to receive them.  &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/8709841959213428978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/failed-to-start-monitoring-changes-to_31.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/8709841959213428978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/8709841959213428978'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/failed-to-start-monitoring-changes-to_31.html' title='Failed to start monitoring changes to Global.asax'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-4263779259075094373</id><published>2010-03-30T02:16:00.000-07:00</published><updated>2010-03-30T02:16:00.097-07:00</updated><title type='text'></title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt;I have been developing a WCF web service recently and in a  previous post, I explain how to specify an EndPoint &amp;amp; binding in  code.&amp;nbsp; That was a few weeks ago and it’s now time to make the web  service run on the customer’s production server, however, to put a  spanner in the works, not only did the customer want the web service to  run over SSL, they created their own certificate, which forced a browser  to show the message, “There is a problem with this website’s security  certificate”.&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Trebuchet MS&#39;,verdana,tahoma,calibri,&#39;courier new&#39;; font-size: 1.1em; line-height: 1.75em;&quot;&gt;I  have two web services in this project, a traditional one (asmx) and the  WCF.&amp;nbsp; So the certificate problem caused the asmx web service to fail  too, until I found the following piece of code via Google, which I have  extended ever so slightly to ensure that the certificate name is as we  expected and whether it’s issue date is within bounds (I would attribute  it to the author, but far too much water has passed under the bridge  and I can’t remember who it was from).&amp;nbsp; The following code goes in the  client (the caller) software:&lt;/div&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;     public &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;TrustAllCertificatePolicy&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; : System.Net.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;ICertificatePolicy&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;    {&lt;br /&gt;
&lt;blockquote&gt;     &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; TrustAllCertificatePolicy()&lt;/span&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{ }&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;          &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;bool&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; CheckValidationResult(&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;ServicePoint&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; sp, &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;X509Certificate&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  cert, &lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;          &lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;WebRequest&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; req, &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; problem)&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;     {&lt;br /&gt;
&lt;/blockquote&gt;&lt;blockquote&gt;           &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;                      &lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;// This is out cert&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;                       &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; issuer = &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&quot;&lt;left fill=&quot;&quot; for=&quot;&quot; in=&quot;&quot; reader=&quot;&quot; the=&quot;&quot; to=&quot;&quot;&gt;&quot;&lt;/left&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;                         &lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;DateTime&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; startDate  = &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;DateTime&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(1753, 01, 01), endDate = &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;DateTime&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(1753, 01, 01);&lt;/span&gt;                         &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;             {&lt;br /&gt;
startDate = &lt;br /&gt;
&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;Convert&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.ToDateTime(cert.GetEffectiveDateString());&lt;/span&gt;              }&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;catch&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;             { }&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;            {&lt;br /&gt;
endDate = &lt;br /&gt;
&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;Convert&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.ToDateTime(cert.GetExpirationDateString());&lt;/span&gt;              }&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;catch&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;             { }&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;// Check that the issue and cert  start &amp;amp; end date are valid&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;                        &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; (issuer ==  cert.Subject &amp;amp;&amp;amp; startDate &amp;lt;= &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;DateTime&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.Now &amp;amp;&amp;amp;&lt;/span&gt;             endDate &amp;gt; &lt;br /&gt;
&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;DateTime&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.Now)&lt;/span&gt;                        &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;true&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;                         &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;else&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;                       &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;      }&lt;br /&gt;
&lt;/blockquote&gt;}&lt;br /&gt;
&lt;/span&gt;   &lt;div style=&quot;font-family: &#39;Trebuchet MS&#39;,verdana,tahoma,calibri,&#39;courier new&#39;; font-size: 1.1em; line-height: 1.75em;&quot;&gt;You can then issue  the following piece of code which will call the CheckValidationRequest:&lt;/div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;System.ServiceModel.EndpointAddress&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  address = &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; System.ServiceModel.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;EndpointAddress&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(URL);&lt;/span&gt; &lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;WebServiceClient&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  wService = &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; WebService.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;WebServiceClient&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; System.ServiceModel.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;WSHttpBinding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;), address);&lt;/span&gt; &lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;System.Net.ServicePointManager&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.CertificatePolicy = &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;WebServiceHelper&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;TrustAllCertificatePolicy&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;();&lt;/span&gt;&lt;/span&gt;    &lt;div style=&quot;font-family: &#39;Trebuchet MS&#39;,verdana,tahoma,calibri,&#39;courier new&#39;; font-size: 1.1em; line-height: 1.75em;&quot;&gt;Place a breakpoint  in the CheckValidationRequest and you’ll see the request being issue.&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Trebuchet MS&#39;,verdana,tahoma,calibri,&#39;courier new&#39;; font-size: 1.1em; line-height: 1.75em;&quot;&gt;So, this was  perfect for the traditional asmx file, but for the life of me, I  couldn’t get this to work for the WCF.&amp;nbsp; I Googled &amp;amp; Googled and  found all sorts of weird &amp;amp; wonderful things that you could try and  do to your config file to get the certificate to come through, but in  the end, I found the following piece of code &amp;amp; config changes were  required to get a self cert to work on a WCF web service:&lt;/div&gt;&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt;The following line has been  altered from above, to tell the TCP layer what type of transport is  required:&lt;/div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;   WebService.&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;WebServiceClient&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; wService = &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; WebService.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;WebServiceClient&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; System.ServiceModel.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;WSHttpBinding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(System.ServiceModel.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;SecurityMode&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.Transport),  address);&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;  &lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt;Notice how we need to tell the WSHttpBinding class, the transport  mechanism.&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Trebuchet MS&#39;,verdana,tahoma,calibri,&#39;courier new&#39;; font-size: 1.1em; line-height: 1.75em;&quot;&gt;Finally,  in the web.config file of your WCF web service, you’ll need the  following:&lt;/div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--&lt;/p--&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;behaviors&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&amp;nbsp;  &lt;!--—Place after the &lt;/bahviours--&gt; section --&amp;gt;&lt;/span&gt;         &amp;lt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;bindings&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;         &amp;lt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;wsHttpBinding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;          &amp;lt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;binding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;TransportSecurity&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;          &amp;lt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;security&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;mode&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;Transport&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;          &amp;lt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;transport&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;clientCredentialType&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;None&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;!--&lt;/p--&gt; &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;security&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;!--&lt;/p--&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;binding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;!--&lt;/p--&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;wsHttpBinding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;!--&lt;/p--&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;bindings&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;!--&lt;/p--&gt; &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;system.serviceModel&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Trebuchet MS&#39;,verdana,tahoma,calibri,&#39;courier new&#39;; font-size: 1.1em; line-height: 1.75em;&quot;&gt;That’s it!&amp;nbsp; As I  say, it took me hours to get find these tiny number of lines, but I was  elated when I had! The errors that I was getting when running my code  were: Could not find a base address that matches scheme http for this  endpoint with binding WSHttpBinding ,or The requested service could not  be activated &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/4263779259075094373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/i-have-been-developing-wcf-web-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/4263779259075094373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/4263779259075094373'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/i-have-been-developing-wcf-web-service.html' title=''/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-7466977201621535647</id><published>2010-03-29T02:16:00.000-07:00</published><updated>2010-03-29T02:16:00.322-07:00</updated><title type='text'>Error CS0433: type class exists in both dll location and dll location 2</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; I’ve just had the most annoying few days trying to identify why my Ajax  web site worked on my dev &amp;amp; test machines, but it wouldn’t work on  the live machine.&amp;nbsp; I have spent literally hours on this problem and I  thought I’d share my solution even though there are other solutions  which may help.  &lt;/div&gt;&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; First off, I was receiving the following error on the live site when I  tried to open any aspx page, even though the Ajax was only in one page:  &lt;/div&gt;&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; “Error CS0433: type &#39;&lt;class&gt;&#39; exists in both &#39;&lt;dll location=&quot;&quot;&gt;&#39; and &#39;&lt;dll 2=&quot;&quot; location=&quot;&quot;&gt;&#39;” and I was also getting  System.web.extensions.dll problems too.&amp;nbsp; Google was offering up a lot of  results for both problems but they either talked about putting the  System.web.extensions.dll in my Bin folder, which I did and made no  difference but didn’t sit right with me anyway, or it said that you  shouldn’t use an App_Code folder, which I do.  &lt;/dll&gt;&lt;/dll&gt;&lt;/class&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; In the end, I opted for creating a new Ajax enabled project and then  compare the web.config files, which was successful for me.&amp;nbsp; Below I’ve  listed the two areas in my old web.config file which were wrong and then  I’ve listed the new entries which replaced them.  &lt;/div&gt;&lt;div style=&quot;font-size: 1.1em; font-weight: bold;&quot;&gt; 1.&amp;nbsp; Old section  &lt;/div&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;configSections&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;sectionGroup&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;microsoft.web&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.MicrosoftWebSectionGroup,  System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,  PublicKeyToken=31bf3856ad364e35&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;sectionGroup&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;scripting&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingSectionGroup,  System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,  PublicKeyToken=31bf3856ad364e35&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;sectionGroup&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;webServices&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingWebServicesSectionGroup,  System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,  PublicKeyToken=31bf3856ad364e35&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;jsonSerialization&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingJsonSerializationSection,  System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,  PublicKeyToken=31bf3856ad364e35&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;requirePermission&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;profileService&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingProfileServiceSection,  System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,  PublicKeyToken=31bf3856ad364e35&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;requirePermission&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;authenticationService&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingAuthenticationServiceSection,  System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,  PublicKeyToken=31bf3856ad364e35&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;requirePermission&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;&lt;span style=&quot;color: blue;&quot;&gt;sectionGroup&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;sectionGroup&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;sectionGroup&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;configSections&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;div style=&quot;color: blue; font-family: &#39;Consolas&#39;,verdana,tahoma,calibri,&#39;courier new&#39;; font-size: 1.1em; line-height: 1.75em;&quot;&gt; &amp;nbsp; &lt;/div&gt;&lt;div style=&quot;font-size: 1.1em; font-weight: bold;&quot;&gt; New section  &lt;/div&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;configSections&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;sectionGroup&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;system.web.extensions&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.SystemWebExtensionsSectionGroup,  System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;sectionGroup&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;scripting&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingSectionGroup,  System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;scriptResourceHandler&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingScriptResourceHandlerSection,  System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;requirePermission&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;allowDefinition&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;MachineToApplication&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;sectionGroup&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;webServices&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingWebServicesSectionGroup,  System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;jsonSerialization&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingJsonSerializationSection,  System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;requirePermission&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;allowDefinition&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Everywhere&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;profileService&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingProfileServiceSection,  System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;requirePermission&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;allowDefinition&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;MachineToApplication&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;  /&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;authenticationService&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingAuthenticationServiceSection,  System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;requirePermission&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;allowDefinition&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;MachineToApplication&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;  /&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;roleService&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Configuration.ScriptingRoleServiceSection,  System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;requirePermission&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;allowDefinition&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;MachineToApplication&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;  /&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;&lt;span style=&quot;color: blue;&quot;&gt;sectionGroup&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;sectionGroup&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;sectionGroup&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;configSections&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;div style=&quot;font-size: 1.1em; font-weight: bold;&quot;&gt; 2.&amp;nbsp; Old section  &lt;/div&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;assemblies&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Core, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=B77A5C561934E089&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Windows.Forms, Version=2.0.0.0, Culture=neutral,  PublicKeyToken=B77A5C561934E089&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Data.Services.Client, Version=3.5.0.0,  Culture=neutral, PublicKeyToken=B77A5C561934E089&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Data.Services.Design, Version=3.5.0.0,  Culture=neutral, PublicKeyToken=B77A5C561934E089&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Data.Entity, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=B77A5C561934E089&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Design, Version=2.0.0.0, Culture=neutral,  PublicKeyToken=B03F5F7F11D50A3A&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Extensions.Design, Version=3.5.0.0,  Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;&lt;span style=&quot;color: blue;&quot;&gt;assemblies&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;div style=&quot;font-size: 1.1em; font-weight: bold;&quot;&gt; New section  &lt;/div&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;assemblies&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Core, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=B77A5C561934E089&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;System.Data.DataSetExtensions, Version=3.5.0.0,  Culture=neutral, PublicKeyToken=B77A5C561934E089&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;!--&lt;font color=&quot;#a31515&quot;--&gt;&lt;span style=&quot;color: blue;&quot;&gt;assemblies&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; That’s it!&amp;nbsp; And my code then started to work.&amp;nbsp; If any of the above helps  just one person, I’ll be pleased, because this took an age to figure  out.  &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/7466977201621535647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/error-cs0433-type-class-exists-in-both.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/7466977201621535647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/7466977201621535647'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/error-cs0433-type-class-exists-in-both.html' title='Error CS0433: type class exists in both dll location and dll location 2'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-598424796755732835</id><published>2010-03-28T02:15:00.000-07:00</published><updated>2010-03-28T02:15:00.127-07:00</updated><title type='text'>Content-Type-text-xml-charset-utf-8-was-not-supported-by-service-The-client-and-service-bindings-may-be-mismatched</title><content type='html'>&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; I&#39;m currently building a WCF web service and as we all know, the URL for  the web service is stored in the web.config file, and I knew that when I  came to deploy it to the live server, the binding would fail. Yes, I  know I could publish the web service to the live server and then Add a  reference in VStudio, but I like to put the test and live server URLs in  the config file.  &lt;/div&gt;&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; Anyway, I attempted to do the following in code, but I kept getting the  error message: &lt;strong&gt;Content Type text/xml; charset=utf-8 was not  supported by service The client and service bindings may be mismatched&lt;/strong&gt;.  And the code that caused the error was as follows:  &lt;/div&gt;System.ServiceModel.&lt;span style=&quot;color: #2b91af;&quot;&gt;EndpointAddress&lt;/span&gt; address  = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; System.ServiceModel.&lt;span style=&quot;color: #2b91af;&quot;&gt;EndpointAddress&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;my name=&quot;&quot; service=&quot;&quot; web=&quot;&quot;&gt;&quot;&lt;/my&gt;&lt;/span&gt;);  &lt;br /&gt;
InternalWebService.&lt;span style=&quot;color: #2b91af;&quot;&gt;InternalWebServiceClient&lt;/span&gt;  wService = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; InternalWebService.&lt;span style=&quot;color: #2b91af;&quot;&gt;InternalWebServiceClient&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;  System.ServiceModel.&lt;span style=&quot;color: #2b91af;&quot;&gt;HttpBinding&lt;/span&gt;(),  address);  &lt;br /&gt;
&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; Not exactly the most verbose error message in the world, so I tried a  few things but they didn&#39;t work, so I started to look at the bindings,  as this was perhaps the most likely culprit.&amp;nbsp; I looked in the web.config  file and saw the following section:  &lt;/div&gt;&lt;span style=&quot;color: blue;&quot;&gt;  &amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;client&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;   &lt;br /&gt;
&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;endpoint&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;address&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&lt;my name=&quot;&quot; service=&quot;&quot; web=&quot;&quot;&gt;&lt;/my&gt;&lt;/span&gt;&quot;  &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;binding&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;wsHttpBinding&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;bindingConfiguration&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;WSHttpBinding_IMMDInternalWebService&lt;/span&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;   &amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;contract&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;MMDInternalWebService.IInternalWebService&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;WSHttpBinding_IInternalWebService&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;  &lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; So I scratch my head for a bit and started to think, hang on, &lt;span style=&quot;color: blue;&quot;&gt;wsHttpBinding&lt;/span&gt;, I’ve never seen that before.&amp;nbsp; So I  used intellisense and found that if you type &lt;span style=&quot;color: blue;&quot;&gt;System.ServiceMode.wshttpbinding&lt;/span&gt;,  a new class appears.&amp;nbsp; After a bit of googling, I found that  HttpBinding, is used in Soap 1.1, but Soap 1.2 uses &lt;span style=&quot;color: blue;&quot;&gt;wshttpbinding()&lt;/span&gt;.&amp;nbsp; Anyway, I wacked in the code  and hey presto, the code started to call my web service.  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/598424796755732835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/content-type-text-xml-charset-utf-8-was.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/598424796755732835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/598424796755732835'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/content-type-text-xml-charset-utf-8-was.html' title='Content-Type-text-xml-charset-utf-8-was-not-supported-by-service-The-client-and-service-bindings-may-be-mismatched'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-5371584766219326852</id><published>2010-03-27T02:14:00.000-07:00</published><updated>2010-03-27T02:14:00.339-07:00</updated><title type='text'>WinForms &amp; the DataGridView</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; I was asked to do some WinForm programming the other day, which I  haven&#39;t done for a couple of years now, because, as most of you are  aware, I&#39;m more a ASP.NET man with the occasional Win Mob thrown in.&amp;nbsp;  And boy, was it good to be back!&amp;nbsp; I forgot how easy it was to do  EVERYTHING!&amp;nbsp; You don&#39;t have to worry about CSS, state management,  session vars... &lt;/div&gt;&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; Anyway, let me cut to the chase.&amp;nbsp; I wanted to use the DataGridView,  populate it with data, and based on the data coming out of the DB,  highlight certain cells, not rows, with the colour red and make the cell  editable.&amp;nbsp; Well, as you know, the DataGridView is editable by default,  so I was on a mission.&amp;nbsp; And the last requirement was to show only  certain columns out of the entire data set, so I needed a way of  creating the columns.&amp;nbsp; So, let me get to the point.&amp;nbsp; Below is how to  create the columns: &lt;/div&gt;dataGridView1.Columns.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Reason code(s)&quot;&lt;/span&gt;,  &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Reason code(s)&quot;&lt;/span&gt;); &lt;br /&gt;
dataGridView1.Columns.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Value0&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Value0&quot;&lt;/span&gt;); &lt;br /&gt;
dataGridView1.Columns.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Size 1&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Value1&quot;&lt;/span&gt;); &lt;br /&gt;
&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; The first field is the column name, which I believe you can reference  with something like: dataGridView1[&quot;ColumnName&quot;], but don&#39;t quote me,  and the second field is the header text for the column.&amp;nbsp; The final  requirement for the columns, was to have a hidden column which would  hold the unique key back in the DB.&amp;nbsp; Here you have to create a new  DataGridView column and text box cell and set it properties, like so: &lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;color: #2b91af;&quot;&gt;DataGridViewColumn&lt;/span&gt; newColl = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DataGridViewColumn&lt;/span&gt;();    &amp;nbsp; &lt;br /&gt;
newColl.HeaderText = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;; &lt;br /&gt;
newColl.Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;NoteID&quot;&lt;/span&gt;; &lt;br /&gt;
newColl.DataPropertyName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;NoteID&quot;&lt;/span&gt;; &lt;br /&gt;
&lt;span style=&quot;color: #2b91af;&quot;&gt;DataGridViewCell&lt;/span&gt; oCell = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DataGridViewTextBoxCell&lt;/span&gt;(); &lt;br /&gt;
newColl.CellTemplate = oCell; &lt;br /&gt;
newColl.Width = 90; &lt;br /&gt;
dataGridView1.Columns.Add(newColl); &lt;br /&gt;
GetMobaOutuput(); &lt;br /&gt;
&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; Finally, I needed to highlight certain cells in red and make the  editable and anything outside of the if, not editable.&amp;nbsp; Here goes: &lt;/div&gt;dataGridView1.CurrentCell = dataGridView1.Rows[count].Cells[0]; &lt;br /&gt;
dataGridView1.BeginEdit(&lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;); &lt;br /&gt;
dataGridView1.Rows[count].Cells[0].ReadOnly = &lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;; &lt;br /&gt;
dataGridView1.Rows[count].Cells[0].Style.Font = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;  &lt;span style=&quot;color: #2b91af;&quot;&gt;Font&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Verdana&quot;&lt;/span&gt;,  10, &lt;span style=&quot;color: #2b91af;&quot;&gt;FontStyle&lt;/span&gt;.Bold); &lt;br /&gt;
dataGridView1.Rows[count].Cells[0].Style.BackColor = &lt;span style=&quot;color: #2b91af;&quot;&gt;Color&lt;/span&gt;.Red; &lt;br /&gt;
&lt;div style=&quot;font-size: 1.1em; line-height: 1.75em;&quot;&gt; You seem to need to call the BeginEdit method before you can alter the  properties.&amp;nbsp; It was the ReadOnly property that took me a long time to  find.&amp;nbsp; Setting it to false means that it&#39;s editable and vice versa.  &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/5371584766219326852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/winforms-datagridview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/5371584766219326852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/5371584766219326852'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/winforms-datagridview.html' title='WinForms &amp; the DataGridView'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-1324933085820297347</id><published>2010-03-26T01:59:00.000-07:00</published><updated>2010-03-27T10:11:03.773-07:00</updated><title type='text'>New line in JScript alert box</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: Verdana,sans-serif; line-height: 1.75em;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;I had a jscript alert box being shown in one of my web projects,  but I wanted to format the text so that some text appeared on a new  line.&amp;nbsp; I knew the \n would insert a new line character for me, but the  code was failing, not even showing the alert box. &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif; line-height: 1.75em;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;I then remembered that you  need to escape the escape sequence!&amp;nbsp; In other words, you have to put in a  double slash (\\).&amp;nbsp; Here&#39;s the code:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre&gt;System.Text.StringBuilder msg = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt;  System.Text.StringBuilder();&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;msg.Append(&lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;script&amp;gt;&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;msg.Append(&lt;span class=&quot;str&quot;&gt;&quot;alert(\&quot;You chose date: &quot;&lt;/span&gt; +&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Calendar1.SelectedDate.ToString(&lt;span class=&quot;str&quot;&gt;&quot;d&quot;&lt;/span&gt;) + &lt;span class=&quot;str&quot;&gt;&quot;.\\n&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;msg.Append(&lt;span class=&quot;str&quot;&gt;&quot;The earliest collection date is tomorrow&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;str&quot;&gt;(&quot;&lt;/span&gt; + Calendar1.SelectedDate.AddDays(1).ToString(&lt;span class=&quot;str&quot;&gt;&quot;d&quot;&lt;/span&gt;) + &lt;span class=&quot;str&quot;&gt;&quot;).\\n&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;msg.Append(&lt;span class=&quot;str&quot;&gt;&quot;Please choose another date\&quot;)&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;msg.Append(&lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;/script&amp;gt;&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Response.Write(msg.ToString());&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/1324933085820297347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/new-line-in-jscript-alert-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/1324933085820297347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/1324933085820297347'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/new-line-in-jscript-alert-box.html' title='New line in JScript alert box'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-2638399943083283658</id><published>2010-03-25T08:36:00.000-07:00</published><updated>2010-03-25T08:36:57.233-07:00</updated><title type='text'>Disable typing in a combobox</title><content type='html'>Just a quickie: I wanted to be able to prevent a user from typing in a Windows Forms ComboBox and struggled to find the answer. Anyway, to stop someone from typing in your combobox, just go to the Properties window, in design mode, and under DropDownStyle, choose the DropDownList. Alternatively, in code, type:&lt;br /&gt;
cmbTotalRows.DropDownStyle = ComboBoxStyle.DropDownList;&lt;br /&gt;
That&#39;s it!&lt;br /&gt;
&lt;br /&gt;
Thanks for your time.</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/2638399943083283658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/disable-typing-in-combobox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/2638399943083283658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/2638399943083283658'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/disable-typing-in-combobox.html' title='Disable typing in a combobox'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-1644709888384074579</id><published>2010-03-25T01:54:00.000-07:00</published><updated>2010-03-25T01:54:00.386-07:00</updated><title type='text'>Sys is undefined</title><content type='html'>&lt;div class=&quot;postcontent&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;div style=&quot;line-height: 1.75em;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Woo!&amp;nbsp; Just spent a few hours trying to get the Ajax toolkit and  the Ajax AutoCompleteExtender working on our companies ISA server.&amp;nbsp; I  placed the AjaxControlToolkit.dll into the Bin folder, but I was  constantly getting &quot;Done, with errors&quot; in the IE browser.&amp;nbsp; Using the  Safari browser and the Show Error Console, I found that the  WebResource.axd file was not being pulled down, all because the path was  not correct.&amp;nbsp; After many hours, I found that one of the ISA rules was  not set correctly.&amp;nbsp; However, in my many hours of investigations, I found  the following two web sites to be particularly helpful:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.75em;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Lorin Thwaits&#39;s blog: &lt;a href=&quot;http://geekswithblogs.net/lorint/archive/2007/03/28/110161.aspx&quot;&gt;http://geekswithblogs.net/lorint/archive/2007/03/28/110161.aspx&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.75em;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;and&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.75em;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Chris Riccio&#39;s blog: &lt;a href=&quot;http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx&quot; target=&quot;_blank&quot;&gt;http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/1644709888384074579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/sys-is-undefined.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/1644709888384074579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/1644709888384074579'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/sys-is-undefined.html' title='Sys is undefined'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-7253313520335541030</id><published>2010-03-24T01:52:00.000-07:00</published><updated>2010-03-24T01:52:00.350-07:00</updated><title type='text'>Failed to start monitoring changes to Global.asax</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt;I was happily coding away the other day, when I came across the  following error message when compiling my code in VS 2008: Failed to  start monitoring changes to global.asax.&amp;nbsp; After a scratch of the head  and another attempt at compiling, I still got the same message.&amp;nbsp; After a  bit of digging around, I found the problem was in my web.config file  and the offending line was:  &lt;/div&gt;&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt;&lt;identity impersonate=&quot;true&quot; password=&quot;your_password&quot; username=&quot;your_domain_name\your_username&quot;&gt;  &lt;/identity&gt;&lt;/div&gt;&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt;After I removed this line, it compiled successfully.&amp;nbsp; Strange thing was,  I have had this line in my web.config file for a long time and only now  was the compiler working.&amp;nbsp; If anyone has any suggestions as to why, I&#39;d  be grateful to receive them.  &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/7253313520335541030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/failed-to-start-monitoring-changes-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/7253313520335541030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/7253313520335541030'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/failed-to-start-monitoring-changes-to.html' title='Failed to start monitoring changes to Global.asax'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-6753581639030517213</id><published>2010-03-23T02:28:00.001-07:00</published><updated>2010-03-23T02:28:16.628-07:00</updated><title type='text'>CSS min-height &amp; viewport</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1.1em; line-height: 1.75em;&quot;&gt; I was working on a website the other day which had the usual CSS left,  middle and right column, with the middle column being the viewport, or  area where the most content was placed.&amp;nbsp; Anyway, the viewport had too  much information on it, causing the content to spill over into the body  (yes, I know the viewport is in the body, but I think you get the  drift).&amp;nbsp;  &lt;/div&gt;&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1.1em; line-height: 1.75em;&quot;&gt; Anyway, I remember setting the viewport before and found the following  code in another project of mine, with comments to assist:  &lt;/div&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;  #container {  &lt;br /&gt;
&lt;/span&gt;  &lt;span style=&quot;color: red;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;1400px&lt;/span&gt;; &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;margin&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;20px&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;auto&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;0px&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;auto&lt;/span&gt;; &lt;span style=&quot;color: green;&quot;&gt;/* Just your normal  margin */&lt;/span&gt;  &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;text-align&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;left&lt;/span&gt;;  &lt;span style=&quot;color: green;&quot;&gt;/* Obvious */&lt;/span&gt;  &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;background&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;white&lt;/span&gt;;  &lt;span style=&quot;color: green;&quot;&gt;/* Obvious */&lt;/span&gt;  &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;border&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;solid&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;1px&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;black&lt;/span&gt;; &lt;span style=&quot;color: green;&quot;&gt;/* Obvious */&lt;/span&gt;  &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;min-height&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;100%&lt;/span&gt;;  &lt;span style=&quot;color: green;&quot;&gt;/* Causes the page to be as large as required. */&lt;/span&gt;   &lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;/* If little content, will be as large as the area  INSIDE the browser window */&lt;/span&gt;  &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;margin-bottom&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;-100px&lt;/span&gt;;  &lt;span style=&quot;color: green;&quot;&gt;/* Allows an area at the bottom of the screen to  */&lt;/span&gt;  &lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;/* be used for a footer, if required*/&lt;/span&gt;  &lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;position&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;relative&lt;/span&gt;;  &lt;span style=&quot;color: green;&quot;&gt;/* Obvious */&lt;/span&gt;  &lt;br /&gt;
}  &lt;br /&gt;
&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1.1em; line-height: 1.75em;&quot;&gt; Just to ram home the comment above, that x will allow you to place a  footer CSS class in your code, showing such things as copyright info,  company info or email info, at the bottom of your website, safe in the  knowledge that no matter how much data you have in the viewport, the  copyright information will always be at the bottom of the page, just  after the content&amp;nbsp;and floating somewhere else.  &lt;/div&gt;&lt;div style=&quot;font-family: trebuchet ms,verdana,tahoma,calibri,courier new; font-size: 1.1em; line-height: 1.75em;&quot;&gt; What are your thoughts on how to set the viewport so that it doesn&#39;t  look too big?  &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/6753581639030517213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/css-min-height-viewport.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/6753581639030517213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/6753581639030517213'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/css-min-height-viewport.html' title='CSS min-height &amp; viewport'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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-4826608231128891172.post-9164187544332438495</id><published>2010-03-23T01:52:00.000-07:00</published><updated>2010-03-23T01:52:24.407-07:00</updated><title type='text'>Error: Cannot write configuration file due to insufficient permissions</title><content type='html'>&lt;div class=&quot;postcontent&quot;&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; I was trying to create a new web site on IIS7 today, for one of our  customers, and I wanted to create a new MIME type of .aspx. Every time I  clicked the Ok button it kept giving me the following error: &lt;strong&gt;Error:  Cannot write configuration file due to insufficient permissions&lt;/strong&gt;. &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; I first thought that I hadn&#39;t given IUSR and IIS_USER access to the  folder, but I still received the message. In the end I realised that the  file, web.config, was still checked into Team Foundation Server, which  meant the read flag was still set on the file. &lt;/div&gt;&lt;div style=&quot;font-family: verdana,tahoma,calibri,courier new; font-size: 1em; line-height: 1.5em;&quot;&gt; Once I removed the read flag, I could save the new MIME type! &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robert-silver.blogspot.com/feeds/9164187544332438495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robert-silver.blogspot.com/2010/03/error-cannot-write-configuration-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/9164187544332438495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4826608231128891172/posts/default/9164187544332438495'/><link rel='alternate' type='text/html' href='http://robert-silver.blogspot.com/2010/03/error-cannot-write-configuration-file.html' title='Error: Cannot write configuration file due to insufficient permissions'/><author><name>Robert Silver</name><uri>http://www.blogger.com/profile/02049038762682730964</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>