Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T. Web Development, JavaScript & CSS including client-side browser technologies
How to change the endpoint url of services that Silverlight clients use.
If your Silverlight app references services, the endpoints to these services are stored within a config file within the xap bundle - which is usually deployed as .xap file within the ClientBin dir of your web app. To change the end point urls:1) Rename the xap file (eg within E:\Demos\MySilverlightApp.W... to .zip. 2) Unzip it 3) Edit the ServiceReferences.ClientConfig file (to update the endpoint url) and save it.4) Recreate the zip file5) Rename the .zip file as .xap That's it ......

Posted On Sunday, January 8, 2012 8:17 PM

Error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk
This error occurred on our TFS2008 build server which we had upgraded to cater for VS2010 projects (by installing VS2010 on the build server - see this article). Error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\Vis... was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. However - although we had installed VS2010 on the build server - we had not installed ......

Posted On Wednesday, December 8, 2010 1:46 PM

Creating mulitple TFS Build services on the same server - one for VS2008 projects and one for VS2010 projects
This is for TFS2008. This is based mainly on this article: http://blogs.msdn.com/b/jpr... But also had input from these: http://www.woodwardweb.com/... http://blogs.msdn.com/b/buc... http://blogs.msdn.com/b/jim... Also the following article discussing upgrading a ......

Posted On Wednesday, December 1, 2010 8:51 PM

Error: Failed to access IIS metabase. Hosting WCF Service in IIS
This error ("Failed to access IIS metabase") can occur when you try to access your WCF when you have added for hosting within IIS. To solve this problem do this: Reregister ASP.NET for IIS: Open an Visual Studio Command Prompt (or a regular command prompt and cd into the .Net dir - usually: C:\WINNT\Microsoft.NET\Fram... then type: aspnet_regiis -i When complete, from the same command prompt run: iisreset Verify your IIS virtual/app dir is setup correctly (uses .Net 2). If you don't ......

Posted On Thursday, May 14, 2009 3:13 PM

How to fade image layers using Gimp gradient/blend tool
This post will explain how to do fading (fade out a layer) in Gimp. Assuming you have an image open... Add a new layer Draw the part you want faded Right click on the layer in the Layers panel/window and select 'Add Layer Mask', then click on Add on the Add Layer Mask dialog (making sure the default value of 'White (full opacity)' is selected). Select the Blend/Gradient tool and set the Gradient to 'FG to GB(RGB)' . On the layer click and drag a line where you want the gradient (fade) to start and ......

Posted On Tuesday, March 10, 2009 9:49 AM

How to move/drag objects in Silverlight (2.0)
The following code shows you how you can make Silverlight controls/objects moveable by dragging them with the mouse. Page.cs: <UserControl x:Class="MovingObjs.Page" xmlns="http://schemas.micro... xmlns:x="http://schemas.mic... Width="400" Height="300"> <Canvas x:Name="LayoutRoot" Background="White"> <Border CornerRadius="10" x:Name="brdMovable" BorderBrush="Black" BorderThickness="2" Background="AntiqueWhite" Canvas.Top="100" ......

Posted On Wednesday, November 5, 2008 12:24 PM

Firefox 3 ignores cache control http headers - security risk for online apps!
If a user, using Firefox 3, signs out of a web site and does not close the browser, anyone else using that browser subsequently can view the content of pages loaded by the previous user (eg in an internet cafe, or any place where workstations are shared eg universities) - exposing private/confidential data. This only affects HTTP post requests (not gets) and only Firefox version 3 - earlier versions (1.5, 2 etc), and IE, are not affected. The main points are: This is definately a bug: a violation ......

Posted On Friday, September 26, 2008 3:17 PM

CSS Absolute positioning in Firefox and IE
A couple of notes regarding absolute positioning in FF and IE... Specifying position values: IE allows you to omit the unit of measurement for Left and Top. It assumes pixels eg: obj.style.Left = 10; However FF requires that you specify the unit of measurement eg: obj.style.Left = "10px"; Using other elements parents to calculate your object's position: The scenario might be you have a div that you want to position over or by another object - but that object has no position values. In this case I ......

Posted On Saturday, September 6, 2008 9:57 AM

VS2008 Javascript debugging error: The breakpoint will not currently be hit. No symbols have been loaded for this document
When trying to debug javascript using Visual Studio 2008 there a couple of things you need to do first - otherwise it (debugging) will not work and you'll get the following error when you hover over breakpoint in your javascript: The breakpoint will not currently be hit. No symbols have been loaded for this document. Note that this is only for debugging using IE (6) - not sure about other browsers/versions. Within IE go into Tools - Internet Options - Advanced tab and make sure the 'Disable Script ......

Posted On Monday, August 18, 2008 10:04 AM

Centering div tags using CSS
As text-align doesn't work I use a simple work around: .mydiv{ width: 100%; left: 50%; } It's not perfect - but very simple and easy to understand - and you can modify it to suit. Seems to work ok in IE 6 & FF 2.0. Here's another method (http://www.andybudd.com/ar... - but I found it not obvious/simple enough (expecially for others who may have to maintain the css down the track - KISS) HTH Tim ......

Posted On Tuesday, May 15, 2007 5:11 PM

Printing nicely from the web: Printing web pages or alternate documents
Many web pages are not designed with any consideration for printing - this is one of those annoying things that one comes across more often than not. Here are a couple of simple ways to make sure your pages are printed in a formatted way: Use a specific print style sheet. This is the most common approach used on the web. The idea being you create another stylesheet that is specifically for formatting your web page(s) for printer output. There are many examples on the web of how to do CSS so I won't ......

Posted On Tuesday, October 31, 2006 12:30 PM

Access is denied - Javascript error when attempting to load xml from an external site.
As yet I don't have the answer to this problem - so any suggestions would be very much appreciated! I have a JS library with an object that loads xml from a specified URL and populates specified HTML elements with the data. This works fine. However recently I refactored the code that calls this library, to be more OO (to allow it to be more easily extended). Now the xml "load()" method raises the error "Access is denied" when loading from external urls. I've proved that the load library still works ......

Posted On Wednesday, May 17, 2006 8:13 AM

DOM Inspector not working in FF (FireFox)
When you install Firefox on windows, by default it does not install the DOM Inspector. To make sure it installs it, select Custom Install then select Web Developer Tools. If you already have FF installed you can install the DOM Inspector without having to reinstall FF: Run the FF installer - just so it unpacks the install without installing anything. Use file explorer to locate the C:\Documents and Settings\<username>\L... Settings\Temp dir. FF will have created a temp directory to unpacked ......

Posted On Thursday, May 11, 2006 7:40 PM

text-align: center; not working in Firefox
I have the following scenario: .container{ text-align: center; border: solid 1px blue;}<div class=container><tabl... In IE (6) this displays as you would expect (with the table centered). However with Firefox (1.5) the table is left aligned. Apparently this is due to a bug with the way FF handles CSS. The workaround is to use this: text-align: -moz-center;instead of text-align: center; Don't ask me why "-moz-center" ......

Posted On Wednesday, April 19, 2006 7:28 PM

CSS nowrap alternative
To achieve the same results as a TD nowrap (<td nowrap="true">) using cascading style sheets, use the following: white-space: nowrap; This style attribute only applies at the TD element level ie needs to be applied to each TD, ie not the the TR or TBODY. If you're desparate to not apply it to each TD, then you can get away with only applying it to the TD's of the first row - but this is only effective if applied to the cells containing thelongest data (so IMHO is a half-baked approach - ie ......

Posted On Sunday, April 16, 2006 4:48 PM

IE bug: HTTP POST with zero content-length (content-length = 0) (even though there is data in the post request)
This little gem comes to us courtesy of MS's IE, whereby it resets the connection and sets content-length to 0 (zero), even though there is data in the post request, when the keep-alive timeout expires. Fortunately this only occurs when using HTTPS, and apparently it's limited to a particular version of IE (although I'm not 100% convinced about this). This bug is documented very well here and by ibm here, and an typically difficult to understand MS solution here. Another solution I think may work ......

Posted On Thursday, January 26, 2006 2:35 PM

IE and Firefox compatible javascript to enable or disable an anchor tag
IE supports provides a half-baked implementation of the non-standard attribute 'disabled' on anchor tags (ie it changes it's color -even though it does not actually disable the anchor (if it has an href value). Firefox does not provide any support for it. To add full 'disable' functionality to both browsers there are a couple of work arounds (hacks): Override the onclick event of the anchor (to do nothing) and override the visual settings. or, more simply Add or remove the href attribute (both browsers ......

Posted On Thursday, January 19, 2006 12:54 PM

IE and Firefox compatible javascript to reference innerText/text attribute
function getObjInnerText(obj){ if (document.all) { // IE; return obj.innerText; } else{ if (obj.text) { return obj.text; } else alert("Error: This application does not support your browser. Try again using IE or Firefox."); }} ......

Posted On Thursday, January 19, 2006 11:12 AM

IE and Firefox compatible javascript to reference a single object or a collection of child objects in the DOM
To obtain an object or a 'all' collection of child objects somewhere in the DOM you can use something like this: var all, myObj; if (document.all) { // IE; all = document.all["myParentObj"]... myObj=document.all["myFormE... } else{ if(document.getElementById(... && document.getElementById("my... all = document.getElementById("my... myObj=document.getElementBy... } else alert("Error: This application does not ......

Posted On Wednesday, January 18, 2006 11:43 AM

Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net