Monday 19 November 2007

Visual Studio shows Dots for spaces

Ctrl-R followed by Ctrl-W will enable/disable the feature in Visual studio which will show dots for spaces, very annoying.

Thanks thekua for the solution http://www.thekua.com/atwork/2007/03/21/visual-studio-2005-annoyances/

Thursday 15 November 2007

Pound Symbol £ does not appear correctly

When typing in the £ symbol in the HTML editor it might not appear as expetced in the browser. For me it appeared as a box. There are 2 options around this..

1. Convert the value into a string with formatter currency
eg. double val = 5.5; val.ToString("c");

2. If hardcoding the html than use this £ for the Pound symbol.

Tuesday 13 November 2007

Request Failed: Unable to connect to remote server" error

When using the System.net.webclient class I recieved the error message "Request Failed: Unable to connect to remote server". The client had a proxy server so I thought maybe that was causing the problem and adding the proxy settings and it worked. And When I had a close look at I found out that If I added the proxy lines below, it still worked even though the proxy address is commented. I found this a bit wierd.

WebClient web = new WebClient();
WebProxy proxy = new WebProxy();
//proxy.Address = new Uri("*************:8080");
web.Proxy = proxy;

Even though I am creating an object of type Proxy I am not assigning the proxy address and it is working. But If comment the line //web.Proxy = proxy then it fails...I am not sure why.

Wednesday 7 November 2007

ErrorInstalling IIS after .Net 2.0

The error message below will be displayed when IIS is installed on a Windows XP machine that has .Net 2.0 already installed.

NullReferenceException: Object reference not set to an instance of an object.] System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) +1126 System.Web.Hosting.ISAPIWorkerRequest.ReadRequestHeaders() +121 System.Web.Hosting.ISAPIWorkerRequest.GetKnownRequestHeader(Int32 index) +126 System.Web.Hosting.ISAPIWorkerRequestInProc.GetKnownRequestHeader(Int32 index) +104 System.Web.HttpRequest.FillInHeadersCollection() +30 System.Web.HttpRequest.get_Headers() +55 System.Web.Security.CookielessHelperClass.GetCookielessValuesFromHeader() +16 System.Web.Security.CookielessHelperClass.Init() +23 System.Web.Security.CookielessHelperClass.RedirectWithDetectionIfRequired(String redirectPath, HttpCookieMode cookieMode) +13 System.Web.Security.FormsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) +226 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

The fix is to run C:\windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i in your command prompt.

Thanks aoporto for this fix..http://support.infogenium.com/forums/26/ShowPost.aspx