images

I’m developing a web application in asp.net and I wanted to know what the URL I was running on, for example www.domain.com.  I hate hard coding things or making assumptions.  Also when uploading to different servers, it would mean things should just work and we all like it when things actually do just work. :-)

So here’s how you do it : Request.Url.GetLeftPart(UriPartial.Authority)

Always so simply, when you know how.

 

 

taskmgr

You may of noticed on Windows Server 2012, when looking at the performance tab in task manager…. that the local disk’s are missing.   This is due to performance reasons as stated by Microsoft:-

The Disk counter has been removed from the Performance tab in Windows Server 2012.  This is because there is significant performance impact to collect Disk metrics on a Server due to the overhead Task Manager may cause in querying each Disk IO for each process/thread on individual disk.  Disk metrics are very useful while troubleshooting performance related issues on the server.  An easier way to check Disk metrics is to use Resource Monitor.

Full article here.

You can enable by opening a command prompt with elevated rights and typing the following command: diskperf -y

Close Task Manager if you have it open and relaunch  you can do this from the command line by typing taskmgr, you will now notice the disk’s have appeared.   You can disable again, by typing: diskperf -n.  Which we would recommend as it’s the default and only enable for troubleshooting.

I can’t take credit for finding this little gem, it was a colleague of mine.  :-)

 

I had an issue the other day when a user couldn’t open a image attachment within an email, when they tried to open the email, they would receive the following error:

com-surrogate-has-stopped-working

 

After Googling the error and finding solutions regarding Nero and Video Codec’s, which didn’t seem correct to me, so after doing some further digging, the issue was with the Windows Photo Viewer, I then found this article  which resolved the issue.

The resolution is to replace the Windows Photo View Files, with a working set.

1. Copy “C:\Program Files\Windows Photo Viewer” from a working or healthy PC, via USB, Network or you can download from here.

2. Open your “C:\Program Files”.

3. Rename “Windows Photo Viewer” to “Windows Photo Viewer.Broken”

4. Copy healthy “Windows Photo Viewer” folder from step 1  into “C:\Program Files”, so there will be “C:\Program Files\Windows Photo Viewer” folder with usual files.

5. Open your image, check that everything works.

6. Reboot.

7. Delete “Windows Photo Viewer.Broken” folder.

Skype is coming to Outlook.com in the UK today.   More information can be found over on the outlook.com blog. I really like outlook.com since switching from gmail a couple of weeks ago. I think this is great news.

It’s also great to see Microsoft updating it’s products more and more regularly these days and long may it continue.

If you haven’t moved from Windows XP then it’s time to make the move.  April 8th 2014, there will be no support any longer for Windows XP.   Windows XP is currently in Extended Support and it won’t be extended again.

So it’s time to look at those internal applications running and ensure the work with Windows 7 and maybe even Windows 8.