- ResolveUrl with no Page or Control in sight
-
Posted by oVan on Monday, October 29, 2007 | PermaLink | 1 commentsWhile working (sweating) on a client's website, I needed a reliable ResolveUrl method without making use of the Page or Control classes. A few quick Googles resulted in some working functions, although not all of them resulted in the same output as the real ResolveUrl.
Some solutions use the VirtualPathUtility for that, however it throws an HttpException when the url to be resolved contains a query string. The most elegant, and from what I can tell also the most correct function came from a comment by Richard Deeming on Rick Strahl's blog:
public static string ResolveUrl(string originalUrl)
{
if (!string.IsNullOrEmpty(originalUrl) && '~' == originalUrl[0])
{
int index = originalUrl.IndexOf('?');
string queryString = (-1 == index) ? null : originalUrl.Substring(index);
if (-1 != index) originalUrl = originalUrl.Substring(0, index);
originalUrl = VirtualPathUtility.ToAbsolute(originalUrl) + queryString;
}
return originalUrl;
}
To resolve the full URL, he uses the Uri and UriBuilder classes:
public static string ResolveServerUrl(string serverUrl, bool forceHttps)
{
Uri result = HttpContext.Current.Request.Url;
if (!string.IsNullOrEmpty(serverUrl))
{
serverUrl = ResolveUrl(serverUrl);
result = new Uri(result, serverUrl);
}
if (forceHttps && !string.Equals(result, Uri.UriSchemeHttps))
{
UriBuilder builder = new UriBuilder(result);
builder.Scheme = Uri.UriSchemeHttps;
builder.Port = 443;
result = builder.Uri;
}
return result.ToString();
}
This code works beautifully!
Source: read the original article and many interesting comments: ResolveUrl-without-page.
- Windows Vista October Reliability and Performance Updates
-
Posted by oVan on Wednesday, October 03, 2007 | PermaLink | 1 comments
Microsoft has released several updates to improve the reliabiliy and compatibility of Windows Vista in certain scenarios. The issues resolved by these updates are detailed in the following Knowledge Base articles:
- October 2007 Cumulative Update for Media Center for Windows Vista (KB941229)
Microsoft has released the October 2007 Cumulative Update for Media Center for Windows Vista. This update rollup is intended for computers that are running Windows Vista Home Premium or Windows Vista Ultimate.
Issues that are resolved by this update:
In addition to the fixes that are contained in the updates that are listed in the "Hotfix replacement information" section, the October 2007 Cumulative Update for Media Center for Windows Vista resolves the following issues: • Several issues that are related to the Media Center Extensibility Platform- An issue that affects digital cable card components when you use Scientific Atlanta cable cards
- Interaction issues that occur between Media Center PC and Microsoft Xbox 360 when Xbox 360 is used as a Media Center Extender.
- Autolaunch issues that occur with video CD (VCD) media
Hotfix replacement information
This is a cumulative update. This update replaces the following updates:- KB 935652 June 2007 Cumulative Update for Media Center for Windows Vista
- KB 932818 April 2007 Cumulative Update for Media Center for Windows Vista
- Cumulative update rollup for USB core components in Windows Vista (KB941600)
This update resolves some reliability issues in the USB core components on the Windows Vista operating system.
Issues that are fixed in the update rollup- KB 925528 Stop errors occur on a Windows-based computer that has 2GB or more of RAM and is using an NVIDIA nForce USB controller
- KB 929734 You may experience problems after you resume a Windows Vista-based computer from sleep or from hibernation
- KB 930568 Error message when you try to put a Windows Vista-based computer to sleep or into hibernation: "STOP 0x000000FE BUGCODE_USB_DRIVER"
- KB 929478 After you use the Safely Remove Hardware option to remove a built-in optical drive from a portable Windows Vista-based computer, you may be unable to reconnect the drive
- KB 930570 Error message in the Usbhub.sys process when you wake a Windows Vista-based computer from sleep or from hibernation: "STOP 0x00000044"
- KB 928631 A USB device may no longer work correctly after Windows Vista resumes from sleep or from hibernation
- KB 933433 Recording quality is poor when you use a USB microphone on a Windows Vista-based computer that has 4 GB of RAM or more
- KB 933442 A USB composite device does not work after you disable and then enable the device in Device Manager on a computer that is running Windows Vista
- KB 934633 When you connect a USB multifunction printer device to a Windows Vista-based computer, a second instance of the printer object is created, and the first instance no longer works
- KB 934796 Error message on a Windows Vista-based computer that is running a USB composite device: "STOP 0x000000FE"
- KB 933824 The Safely Remove Hardware feature and the Windows Explorer "Eject" command do not work correctly with an Apple iPod that is connected to a Windows Vista-based computer
- KB 935782 A USB device takes a long time to resume from "selective suspend" mode on a Windows Vista-based computer that uses UHCI USB controllers
- KB 935783 When you resume a Windows Vista-based computer from sleep, you may experience unexpected behavior from a USB device
The following issues were not previously documented in a Microsoft Knowledge Base article:- When the computer resumes from a suspend state or from a hibernation state, the computer stops responding. Additionally, you receive a "0x9F" stop message on a blue screen.
- The computer takes a long time to resume from a suspend state or from a hibernation state.
- The computer takes a long time to resume from a suspend state or from a hibernation state when you use a VIA controller.
- The computer stops responding when you use an AuthenTec USB fingerprint reader. Additionally, you receive a "0xFE" Stop error on a blue screen or a "0x9F" Stop error on a blue screen.
- The computer stops responding when you use a USB Bluetooth audio device.
- The computer takes a long time to resume from a suspend state or from a hibernation state when you use an Enhanced Host Controller Interface (EHCI) controller.
- The computer stops responding when you remove a USB device. Additionally, you receive a "0xFE" Stop error on a blue screen.
- When a computer resumes from a suspend state or from a hibernation state multiple times, you receive a "0xFE" Stop error on a blue screen.
- Update for Windows Vista (KB941649)
This update improves the compatibility, reliability, and stability of Windows Vista.
This update improves the compatibility, reliability, and stability of Windows Vista. This update includes the following improvements:- It extends the battery life for mobile devices.
- It improves the stability of portable computers and of desktop computers that use an uninterruptable power supply (UPS).
- It improves the reliability of Windows Vista when you open the menu of a startup application.
- It improves the stability of Internet Explorer when you open a Web page.
- It improves the stability of wireless network services.
- It shortens the startup time of Windows Vista by using a better timing structure.
- It shortens the recovery time after Windows Vista experiences a period of inactivity.
- It shortens the recovery time when you try to exit the Photos screen saver.
- It improves the stability of Windows PowerShell.
This update also resolves the following issues in Windows Vista:- A compatibility issue that affects some third-party antivirus software applications.
- A reliability issue that occurs when a Windows Vista-based computer uses certain network driver configurations.
- Update for Windows Vista (KB941651) [KB article TBA -- Download below]
This is a reliability update. Install this update to improve the reliability of Windows Media Player 11 for Windows Vista in certain scenarios.
Via: Bink.nuLabels: Microsoft, patch, reliability, update, Vista, Windows, Windows Vista
- October 2007 Cumulative Update for Media Center for Windows Vista (KB941229)
- Vista Speech Recognition Tested
-
Posted by oVan on Wednesday, October 03, 2007 | PermaLink | 0 commentsMicrosoft Vista Speech Recognition Tested for Perl Scripting
This is a hilarious little movie on YouTube...enjoy!
