Archive for May, 2011
Posted by jpluimers on 2011/05/31
An interesting question on Stackoverflow.com: .net – Different WSDL ASMX,WCF web-services – Stack Overflow.
The answer is simple when you know it: flatten the WSDL that comes from WCF.
Note that Delphi Win32 is not the only client having these issues, as Elton Stoneman shows on his blog and the WCFExtras toolkit for WCF that allows for single WSDL export.
–jeroen
Posted in .NET, Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2011/05/30
When using wget for downloading from the command-line, sometimes you need cookies in netscape file format.
There is a Chrome cookie.txt export extension that makes exporting your cookies in that format easy.
It opens a window that contains the cookies relevant to the domain of the currently opened web-page. You copy/paste your cookies in format like this:
# Cookies for domains related to wordpress.com.
# This content may be pasted into a cookies.txt file and used by wget
# Example: wget -x --load-cookies cookies.txt http://wiert.wordpress.com/wp-admin/post.php?post=5767&action=edit
#
en.forums.wordpress.com FALSE / FALSE 1304919940 TESTCOOKIE home
en.support.wordpress.com FALSE / FALSE 1304920249 TESTCOOKIE home
wiert.wordpress.com FALSE / FALSE 1304920561 TESTCOOKIE home
en.wordpress.com FALSE / FALSE 1304920572 TESTCOOKIE home
It even includes the wget command-line example for loading the cookies using the –load-cookies option
–jeroen
via: cookie.txt export – Google Chrome extension gallery.
Posted in Chrome, Power User, Web Browsers | Leave a Comment »
Posted by jpluimers on 2011/05/27
Sometimes you want to know the Windows Version and Service Pack number.
A GUI version is very simple: run winver.exe, it will give you dialogs like these ad the Microsoft Knowledge Base article 310104 explains.
A console version can be done in several different ways:
–jeroen
via: windows command line: can I tell Service pack number? – Super User.
Posted in Power User, Windows, Windows 7, Windows Vista, Windows XP | Leave a Comment »
Posted by jpluimers on 2011/05/26
When you are using Team Foundation System (TFS) for version control, the project manager sometimes shows a file as being checked out by someone else, but it doesn’t show who that someone else is.
The reason is that the Project Manager only has generic knowledge about version control systems. However, the Source Control Explorer has specific knowledge about TFS.
So when you look in the Properties Window for the path of the file you are interested in, then you can use the Source Control Explorer to locate the file, and find out who has checked out that file.
There are other tools that can even give your more information than the Source Control Explorer:
- the TF command-line application (on your PATH when you start the Visual Studio Command Prompt shortcut) to obtain extra information.
- the Team Foundation Sidekicks (free; version 3.0 is for Team Foundation Server 2010; 2.4 is for Team Foundation Server 2008/2005) even produce most of that info from a GUI.
These two Stack Overflow questions were relevant in answering the above:
Posted in .NET, Development, Software Development, Source Code Management, TFS (Team Foundation System), Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2011/05/25
I love the Entity Framework, but as with every layer of abstraction, sometimes you need to get underneath in order to solve problems.
For EF questions, I usually browse the presentations, blog, articles or Entity Framework book from Julie Lerman.
I met her first at an SDC conference years ago: she has a great way of explaining new concepts in an easy to grasp way, not being afraid to do a deep dive into technology when needed.
Her article MSDN Magazine: Data Points – Profiling Database Activity in the Entity Framework is a great way to start digging for the actual SQL being executed by EF on your behalf.
It has a balanced list of ways to get that SQL, and describes the pros and cons for each means.
The comments point you to some more ways.
Recommended reading!
–jeroen
Posted in .NET, Development, EF Entity Framework, Software Development | Leave a Comment »
Posted by jpluimers on 2011/05/24
MijnAlbum.nl is a popular site for storing and printing photos.
The UX of the site is far below what I’d like so I searched around for some scripts and wrote a bit of code for my own to make it easier.
First a few URL tricks for mijnalbum.nl (with the free demo album with Album ID TYEGMIMD):
- Album URLs follow this pattern:
http://www.mijnalbum.nl/Album=TYEGMIMD
where the letters after Album= contain the Album ID.
- When you click on a photo a new window opens with a URL like
http://www.mijnalbum.nl/GroteFoto-3ANGJPWW.jpg
where the letters after GroteFoto- contain the Photo ID and the .jpg extension.
You don’t need to be logged in to download these photos.
- The album page includes a frame with thumbnails that has a URL like
http://www.mijnalbum.nl/index.php?m=albumview&a=2&key=TYEGMIMD&selectedfoto=3ANGJPWW
but a bit of experimentation reveals it can be condensed into
http://www.mijnalbum.nl/?m=albumview&a=2&key=TYEGMIMD
where the letters after key= contain the Album ID.
- The thumbnail frame contains photo’s that link to URLs like
http://www.mijnalbum.nl/index.php?m=albumview&a=1&key=3ANGJPWW&album=TYEGMIMD
that can be condensed into
http://www.mijnalbum.nl/?m=albumview&a=1&key=3ANGJPWW&album=TYEGMIMD
where you both need the Photo ID as key value, and Album ID as album value.
The thumbnails are tiny, so not very convenient to browse.
- Download URLs look like this
http://www.mijnalbum.nl/index.php?m=download&a=10&key=TYEGMIMD
which can be condensed into
http://www.mijnalbum.nl/?m=download&a=10&key=TYEGMIMD
but you need to be logged in to download other albums than the demo album.
The thumbnails frame contains two lists of the photos in the album. Given the demo album, it first contains a this section inside a bunch of JavaScript code:
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-3ANGJPWW.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-6OKRE67M.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-4OSAXTJM.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-7MFJVO4F.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-YQ4BZ4AD.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-3LKQD6AG.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-O8RUL378.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-7TTFUUCG.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-L6SLLZHO.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-YLSWWFJI.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-CFWOY8KK.jpg"));
and further in the page source a HTML table with HTML fragements like these:
<a onclick="resetScrollNextImg();" onfocus="this.blur();" href="index.php?m=albumview&a=1&key=3ANGJPWW&album=TYEGMIMD" target="fotoframe">
<img id="thumb-3ANGJPWW" style="margin-bottom: -3px;" title="Eendjes in de wei" src="http://www.mijnalbum.nl/MiniFoto-3ANGJPWW.jpg" alt="Eendjes in de wei" width="90" height="90" border="0" />
</a>
The HTML fragment has more context (Picture ID in both the a and img tags, Picture description in the alt attribute of the img tag).
You need to parse either of the two tables, depending on what information you are interested in.
I was interested in the thumbnail URL, and the Photo IDs and GroteFoto download URLs because it is way easier to select photos that are bigger. Something like this list:
Thumbnail URL for Album TYEGMIMD
http://www.mijnalbum.nl/index.php?m=albumview&a=2&key=TYEGMIMD
Photo URLs for Album TYEGMIMD
http://www.mijnalbum.nl/GroteFoto-3ANGJPWW.jpg
http://www.mijnalbum.nl/GroteFoto-6OKRE67M.jpg
http://www.mijnalbum.nl/GroteFoto-4OSAXTJM.jpg
http://www.mijnalbum.nl/GroteFoto-7MFJVO4F.jpg
http://www.mijnalbum.nl/GroteFoto-YQ4BZ4AD.jpg
http://www.mijnalbum.nl/GroteFoto-3LKQD6AG.jpg
http://www.mijnalbum.nl/GroteFoto-O8RUL378.jpg
http://www.mijnalbum.nl/GroteFoto-7TTFUUCG.jpg
http://www.mijnalbum.nl/GroteFoto-L6SLLZHO.jpg
http://www.mijnalbum.nl/GroteFoto-YLSWWFJI.jpg
http://www.mijnalbum.nl/GroteFoto-CFWOY8KK.jpg
Since the thumbnail URL page is not xhtml, you have two options:
- Force the page to become XHTML by some library
- Use Regular Expressions
Though I am not a fan of using Regular Expressions for parsing general HTML, the thumbnail frame is generated in a very consistent way, so in this case I don’t mind using RegEx.
A complete console app is part of the bo.codeplex.com library.
This is the C# code I wrote as a base:
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace MijnAlbum.NL.Download.ConsoleApplication
{
public class MijnAlbumNl
{
protected const string ThumbnailPrefix = "http://www.mijnalbum.nl/index.php?m=albumview&a=2&key=";
protected const string BigJpegUrlMask = "http://www.mijnalbum.nl/GroteFoto-{0}.jpg";
private static string DownloadString(string url)
{
var html = string.Empty;
using (var webClient = new System.Net.WebClient())
{
html = webClient.DownloadString(url);
}
return html;
}
protected static string DownloadThumbnailsHtml(string AlbumID)
{
string url = GetThumbnailsUrl(AlbumID);
string html = DownloadString(url);
return html;
}
protected static string GetThumbnailsUrl(string AlbumID)
{
string url = ThumbnailPrefix + AlbumID;
return url;
}
protected static List getPhotoIds(bool dumpGroups, string html)
{
List photoIds = new List();
/* find strings like these:
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-3ANGJPWW.jpg"));
thumbs.push(new Array("http://www.mijnalbum.nl/MiniFoto-6OKRE67M.jpg"));
* RegEx string:
thumbs\.push\(new\ Array\("http://www.mijnalbum.nl/MiniFoto-(?.*?)\.jpg"\)\);
*/
// With @, you only have to escape the double quotes with another double quote: http://weblogs.asp.net/lorenh/archive/2004/09/30/236134.aspx
const string RegExPattern = @"thumbs\.push\(new\ Array\(""http://www.mijnalbum.nl/MiniFoto-(?.*?)\.jpg\""\)\);";
const string PhotoIdRegExCaptureGroupName = "PhotoId";
//const string RegExReplacement = @"${PhotoId}";
MatchCollection matchCollection = Regex.Matches(html, RegExPattern);
// Matches uses lazy evaluation, so each match will be evaluated when it is accessed in the loop
foreach (Match match in matchCollection)
{
Group positionIdGroup = match.Groups[PhotoIdRegExCaptureGroupName];
if (dumpGroups)
Console.WriteLine(positionIdGroup.Value);
photoIds.Add(positionIdGroup.Value);
}
return photoIds;
}
protected static string GetBigJpegUrl(string photoId)
{
string bigJpegUrl = string.Format(BigJpegUrlMask, photoId);
return bigJpegUrl;
}
}
}
Note that others wrote some scripts too, so for instance Kees Hink wrote on Foto’s downloaden van mijnalbum.nl and there is the MijnAlbumDownloader app.
Note 2: The free RegEx Expresso tool is very nice for building and testing Regular Expressions.
–jeroen
Posted in .NET, C#, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2011/05/23
Recently, I had a hard-drive fail: no SMART error, the vendor tools didn’t return an error, but HDtune did.
I couldn’t boot from the drive any more, and the partitions were only half visible, so I had a clear indication it should be replaced.
Since the vendor tools couldn’t indicate a problem, I returned it using a generic code, and hoped for a replacement under warranty (based on the HDtune results), and I was glad to receive a free replacement.
Obvious indicators of course are audible noises like clicking, stiction, repeated seeks, etc.
But those audible noises are harder to listen to as drive heads get smaller and the total noise level less loud.
So I collected a few links that help you determine when you should not use a HDD any more:
–jeroenpo
Posted in Power User | 3 Comments »
Posted by jpluimers on 2011/05/21
Om 19:00 vanavond speel ik als deel van Adest Musica op taptoe Mierlo.
Dus (oud) Bolesianen en andere bekenden uit die buurt: als je tijd zin hebt, komeens kijken naar wat voor mooie show we daar geven.
–jeroen
Posted in About, Adest Musica, Personal | Leave a Comment »
Posted by jpluimers on 2011/05/21
This is post 500 after 2 years and 1 month of blogging here.
When starting this blog, I never estimated the volume would be like this.
So far, the blog has been a great way of meeting new people, something I didn’t anticipate when starting it. Thanks everyone for commenting and teaching me. I’m never too old to learn something new
One thing I did hope for was that the blog would make it easier to find things back. That really works: somehow my blog scores quite well on various search engines. That is only possible when other sites link to me: they apparently do, and I sure hope it is because of the content here. Thanks for linking!
I’m anxious how the blog evolves over the next year: will post # 750 be there? Did the topics change or not?
I’m open to suggestions, so please let me know what you like about this blog, and what direction you would like to evolve it to.
–jeroen
Posted in About, Personal | 1 Comment »
Posted by jpluimers on 2011/05/20
I just found out that the talk that Eric Law gave on Fiddler during MIX2011 : he blogged MIX2011 Fiddler talk is now live, you can find the video here.
During that talk he:
- launched the new version of Fiddler2
- that IE9 allows localhost traffic to be intercepted by Fiddler (so no more ipv4.fiddler hacks)
- indicated that FireFox now can use the INET layer that Fiddler2 intercepts, so no more need for FiddlerHook
–jeroen
Posted in Development, Power User, Software Development, Web Development | 1 Comment »
Posted by jpluimers on 2011/05/19
When you get a C# Warning CS0067, the MSDN documentation tell you to insert a “#pragma warning disable 0067″, but Trevor Robinson has a better solution at C# Warning CS0067: The event ‘event’ is never used – Trevor’s Dev Blog – Site Home – MSDN Blogs:
Since the event is never used, make the event explicit, or even throw an exception in the add clause of the event.
–jeroen
Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2011/05/18
When you (or the one that installed SQL Server 2008) forgot to add an administrator, it is still possible to add one.
The How do you add an administrator user to SQL Server 2008 question on Server Fault pointed me to the right page SQL Server 2008: Forgot to add an Administrator account? by Chris Randall.
Note that you might want to run SQL Server in Single User Mode; the first answer on the above question doesn’t mention that, but the second does (and pointed me to Chris Randall’s page).
–jeroen
via: How do you add an administrator user to SQL Server 2008? – Server Fault.
Posted in Database Development, Development, SQL Server | Leave a Comment »
Posted by jpluimers on 2011/05/17
I’m a fan of ISO 8601, as it is a universal way of expressing dates and times (no more MDY confusion ).
I wrote about using ISO 8601 in batch-files and with Google Calendar before.
Now it is time to give you a simple C# example.
When you realize that XML uses ISO 8601 for their date and time formats, the .NET conversion is very easy:
using System;
using System.Xml;
public class Test
{
public static void Main()
{
string Iso8601DateTime =
XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Local);
Console.WriteLine(Iso8601DateTime);
}
}
I wrote about ideone.com before: it is an excellent place to run sample C# code (and other languages).
When running this on ideone.com, you can see their local server time in ISO 8601 format.
Cute
BTW: There are more ways to run your C# code online.
–jeroen
via: Simple example to show DateTime.Now in ISO 8601 format on Ideone.com | Online C# Compiler & Debugging Tool.
Posted in .NET, C#, Development, Software Development | 1 Comment »
Posted by jpluimers on 2011/05/16
New versions sometimes means the loss of features.
Starting with Google Chrome 10, the “Open frame in new tab” option in the context menu was removed (“Reload frame”, “View frame info” and “View frame source” are still there though).
The removal has been reported as a bug by Michael Schramm on December 10, 2010, but no action from the Chromium nor Chrome teams yet.
But shortly after the removal, two Chrome extensions appeared:
Though they both work very well, I like the second one more because it has slightly more options (it is based on the first one).
Note that when you install these extensions, you have to reload a tab when you want to use the new functionality offered by the extension on that tab.
–jeroen
via: Open Frame – Google Chrome extension gallery.
Posted in Chrome, Power User, Web Browsers | Leave a Comment »
Posted by jpluimers on 2011/05/13
It looks like when you install Windows Media Player in Window 7, it will expose your media library for DLNA access by default for any user that chooses “quick” settings.
This even when you have not turned on media streaming, or not enabled the “Automatically allow devices to play my media” (this link has some screenshots on those settings).
I know few users who go the whole nine yards around those “quick” settings, so pretty much any Windows 7 user has their media library exposed as DLNA in your Home or Work networks (DLNA seems disabled on Public networks by default).
This is both a pollution of your DLNA space (for instance making it more difficult from your digital TV to to select the correct DLNA source), and an exposure. Any malware in your network might so some discovery (and yes, truckloads of PC’s in Work or Home networks have such malware running).
Though searching for “Winodws 7″ “Disable DLNA” returns few good results, the actual trick is easy:
- On the start menu, type “Manage advanced sharing settings”
- Click the arrow next to “Home or work”
- Under “Media Streaming”, click “Choose media streaming options”
- Click on the “Block all” button
- Click the “OK” button
- Close the “Advanced sharing settings” window
–jeroen
via: Media Streaming with Windows 7 – Engineering Windows 7 – Site Home – MSDN Blogs.
Posted in Power User, Windows 7 | 1 Comment »
Posted by jpluimers on 2011/05/12
There are many ASP.NET HttpRequest properties.
Sadly, the MSDN documentation does not have many examples telling you which property maps to which portion of the URL.
So it usually is a big fight extracting the sub portions you need.
Luckily, Steve Lautenschlager has the How Do I Get Paths and URL fragments from the HttpRequest object? article online.
The article has a table with the properties and portions of the URL that end up in those properties.
Really neat, as it saves a lot of time.
–jeroen
Posted in .NET, ASP.NET, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2011/05/09
When you install VMware Server 2.0 on Windows Server 2008, Internet Explorer will give you a warning that it cannot load the local VMware Server console web-site at https://servername:8333.
The reason is that the security certificate is self-signed by the local machine, not by a trusted CA.
Internet Explorer does not allow you to add that CA, but you can from within Windows Explorer.
The Removing the VMWare Server SSL Certificate Trust Warning article explains how.
Note that on x64 Windows Server 2008 systems, the VMware Server certificate by default is in the C:\Program Files (x86)\VMware\VMware Server\SSL directory.
Finally, you will need to add https://servername:8333 to the trusted sites in Internet Explorer.
–jeroen
via: Removing the VMWare Server SSL Certificate Trust Warning – IIS Hacks Server and System Administration
Posted in Power User, VMware | 2 Comments »
Posted by jpluimers on 2011/05/06
With the gaining popularity of Desktop systems with multi-core processors, it becomes interesting to use multi-core CPU guests in VMware workstation.
Right now, Intel Core i3 through i7 processors can provide from 2 to 6 cores, some cores even supporting hyper-threading and providing 12 virtual cores using a single physical processor.
Does it make sense now to run all your VM guests with multiple virtual cores / vCPUs?
On the VMware forums and knowledge base, there are many threads and articles with information on vCPUs.
The consensus is that VMware workstation can take longer to schedule a synchronized set of cores for a VM than VMware ESX(i) has, and the host OS needs CPU cycles too.
The reason is that VMware workstation needs the underlying host Operating System for that, whereas ESX(i) has it’s own kernel.
In the VMware workstation 7 beta, under some circumstances, adding more vCPUs actuall made the guest run slower (this has been fixed).
You need to be careful when vCPUs in the guest compete with pCPUs in the host; it can lead to frequent freezes in the guest.
The rule of the thumb is that you should not use more than 50% of the host pCPU cores as guest vCPUs.
So the best is to start with one (1) vCPU, and only crank it up when needed.
Take into account however that for Windows XP you will need to change the HAL to support multiple CPUs, which can be a pain.
In some cases it can pay off big to increase the number of vCPUs, especially when they are actually used.
Another thing you need to be aware of is that modern CPUs van vary their clock speed, now even depending on the number of cores used. In the past this had influences on timekeeping, but not so any more with modern Core i# processors.
Finally, with the increase of hard-disk space, people use snapshots more often. This can dramatically decrease the performance, as the number of open files per VM increases.
I hope this helps you choosing the number of vCPUs in your guest.
–jeroen
Note: Both VMware ESXi and VMware Workstation 7.1+ can even support vCPU with multiple cores to help cope with guest OS CPU licensing limitations: set the cpuid.coresPerSocket property in your vmx for that.
Posted in Power User, VMware | 1 Comment »
Posted by jpluimers on 2011/05/05
The Entity Framework needs you to have a connection string in your App.Config.
It is good practice having your Entity Framework model in a separate assembly.
When using it in your main app, be aware that the connection string that belongs to your model needs to be in the App.config of your main app.
If not, you get an exception like this:
System.ArgumentException was unhandled
Message=The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
Source=System.Data.Entity
StackTrace:
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
The clue is the contents of the defaultContainerName parameter: you will see that in the App.config of your Entity Framework assembly.
Copy that over to the App.config of your main assembly, then make sure it points to your right database (if you use OTAP), then go
Your App.config then looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="MyEntities" connectionString="metadata=res://*/My_EntityModel.csdl|res://*/My_EntityModel.ssdl|res://*/My_EntityModel.msl;provider=System.Data.SqlClient;provider connection string="data source=my-sql-server;initial catalog=my-database;persist security info=True;user id=my-user;password=my-password;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
–jeroen
Posted in .NET, C#, Database Development, Development, EF Entity Framework, Software Development, SQL Server | Leave a Comment »
Posted by jpluimers on 2011/05/04
The SmackFu: Shoutcast Metadata Protocol page describes how the Icecast and Shoutcast meta-data (like song title) are being sent inside their streams.
Notes:
- The above only explains the song meta data (artist-title); you cannot update the Stream Title without performing a reconnect, as they are in the stream meta data; this post explains why.
- The stream headers are explained here, but they don’t contain the song title!
- Icecast uses the dash “-” as separator between artist and title of the song, so if an Artist contains a dash, you are out of luck, as this thread shows.
–jeroen
Posted in .NET, BASS, Development, Power User, Software Development | Leave a Comment »
Posted by jpluimers on 2011/05/03
It is always fun to see error messages on web-sites; they reveal a lot about the technology they use.
For instance, DealExtreme – a very popular site to order electronics and gadgets from the far east – uses ASP.NET.
They have verbose logging enabled, which even includes a warning to turn it off in production sits, as per this comment in the page source:
This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode=”Off”/>. Consider using <customErrors mode=”On”/> or <customErrors mode=”RemoteOnly”/> in production environments.
This is the full text, indicating they use .NET 2.0 and SQL Server with connection pooling (which is a good thing), and the BLToolkit extensions, Callbacks, a separation of Business Logic and Data Abstraction (BLL, DAL/DAO) probably using Spring.net and Data Binding by calling BindData() in stead of DataBind().
Server Error in ‘/’ Application.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +578
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +88
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6265031
System.Data.SqlClient.SqlConnection.Open() +258
BLToolkit.Data.DbManager.ExecuteOperation(OperationType operationType, Action operation) +64
[DataException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
BLToolkit.Data.DbManager.OnOperationException(OperationType op, DataException ex) +176
BLToolkit.Data.DbManager.ExecuteOperation(OperationType operationType, Action operation) +135
BLToolkit.Data.DbManager.OpenConnection() +91
BLToolkit.Data.DbManager.get_Connection() +42
BLToolkit.Data.DbManager.OnInitCommand(IDbCommand command) +31
BLToolkit.Data.DbManager.get_SelectCommand() +28
BLToolkit.Data.DbManager.GetCommand(CommandAction commandAction, CommandType commandType, String sql) +18
BLToolkit.Data.DbManager.PrepareCommand(CommandAction commandAction, CommandType commandType, String commandText, IDbDataParameter[] commandParameters) +91
BLToolkit.Data.DbManager.SetCommand(CommandAction commandAction, CommandType commandType, String commandText, IDbDataParameter[] commandParameters) +51
BLToolkit.Data.DbManager.SetCommand(String commandText, IDbDataParameter[] commandParameters) +25
DealExtreme.Mall.Common.DAL.DAO.BLToolkitExtension.CategoryAccessor.GetAll() +168
DealExtreme.Mall.Common.BLL.CategoryBL.CategoryLogic.GetAllCategory() +53
DealExtreme.Mall.Common.Caching.ProductCaching.CategoryCache.GetAllCategories() +9
DealExtreme.Mall.Common.Caching.ProductCaching.BLToolkitExtension.CategoryCache.GetAllCategories() +433
DealExtreme.Mall.Search.BLL.SearchLogic.GetSearchedCategory(String request) +255
DealExtreme.Mall.Search.Web.Search.BindData() +416
DealExtreme.Mall.Search.Web.Search.Page_Load(Object sender, EventArgs e) +16
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
[SqlException]: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at BLToolkit.Data.DbManager.ExecuteOperation(OperationType operationType, Action operation)
[DataException]: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at BLToolkit.Data.DbManager.OnOperationException(OperationType op, DataException ex)
at BLToolkit.Data.DbManager.ExecuteOperation(OperationType operationType, Action operation)
at BLToolkit.Data.DbManager.OpenConnection()
at BLToolkit.Data.DbManager.get_Connection()
at BLToolkit.Data.DbManager.OnInitCommand(IDbCommand command)
at BLToolkit.Data.DbManager.get_SelectCommand()
at BLToolkit.Data.DbManager.GetCommand(CommandAction commandAction, CommandType commandType, String sql)
at BLToolkit.Data.DbManager.PrepareCommand(CommandAction commandAction, CommandType commandType, String commandText, IDbDataParameter[] commandParameters)
at BLToolkit.Data.DbManager.SetCommand(CommandAction commandAction, CommandType commandType, String commandText, IDbDataParameter[] commandParameters)
at BLToolkit.Data.DbManager.SetCommand(String commandText, IDbDataParameter[] commandParameters)
at DealExtreme.Mall.Common.DAL.DAO.BLToolkitExtension.CategoryAccessor.GetAll()
at DealExtreme.Mall.Common.BLL.CategoryBL.CategoryLogic.GetAllCategory()
at DealExtreme.Mall.Common.Caching.ProductCaching.CategoryCache.GetAllCategories()
at DealExtreme.Mall.Common.Caching.ProductCaching.BLToolkitExtension.CategoryCache.GetAllCategories()
at DealExtreme.Mall.Search.BLL.SearchLogic.GetSearchedCategory(String request)
at DealExtreme.Mall.Search.Web.Search.BindData()
at DealExtreme.Mall.Search.Web.Search.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.search_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
|
Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955
Posted in .NET, ASP.NET, C#, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2011/05/02
Most external USB HDDs you buy are way bigger than 32 gigabyte, and factory formatted with NTFS.
Nowadays, many devices (TVs, modems, routers, etc) support attaching HDDs, but not all of them support NTFS, but most of them support FAT32.
My brother has such a TV. He has mental retardation (they have euphemisms for that; he basically has an IQ < 50, which in his means he can live on his own but needs daily visits from people that help him with the more complex things in life).
I’m his legal guardian (Dutch: curator), so my wife and me take care of some of those things.
This included getting his TV to recognize a USB HDD so he can watch his favourite TV series I recorded for him (Knight Rider, Top Gear, etc).
Windows NT and beyond cannot format FAT32 in an easy way.
They can from the commandline using the format command: use FOMAT X: /FS:FAT32 for that, it is slow and as soon as you add the /Q parameter to speed things up, it imposes the 32 gigabyte limit.
Microsoft suggests botting Windows 98 or Windows Me, but those have too many limitations (lack of USB support, no 48-bit LBA, imposing 137 gigabyte HDD limit, etc).
Luckily, Ridgecrop Consultants Ltd has a FAT32FORMAT tool and accompanying GUI wrapper. They format any HDD using FAT32. Their tools work at least in Windows XP and up (I haven’t tested Windows 2000 and NT 4).
Problem solved: my brother can happily watch his favourite TV series I recorded for him
–jeroen
Posted in About, Personal, Power User, Windows, Windows 7, Windows Vista, Windows XP | Leave a Comment »