The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,115 other followers

Archive for November, 2012

Interesting: site “Your Online Choices | IAB” seems to help in disabling tracking cookies for advertisers

Posted by jpluimers on 2012/11/16

Is there anyone that has experience with the Your Online Choices | IAB site?

They seem to be able to turn off cookie tracking for selected advertisers.

I’m anxious to hear if this scam or not.

–jeroen

Posted in LifeHacker, Opinions | Leave a Comment »

Some notes on finding the cause of a .NET app generating a “application has generated an exception that could not be handled”

Posted by jpluimers on 2012/11/15

A while ago, one of the users at a client got an error in a .NET 1.1 app of which the sources were not readily available:

“application has generated an exception that could not be handled”

I think it is a e0434f4d  exception.

This particular site has very strict rules about what you can and cannot do as a developer. Which means that on a production system, you basically cannot do anything.

A few links that should help me finding the solution, and escalate far enough upstream to get someone with local admin rights to assist me:

If WinDbg is allows to be ran, these should help me:

–jeroen

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »

Interesting: Visual Studio Project Renamer | ComVisible

Posted by jpluimers on 2012/11/14

Over the course of development time, each suite of projects is bound to get some renames.

Doing that from the Visual Studio IDE is a pain, so I was glad to find Visual Studio Project Renamer by ComVisible.

Though it only supports C# and VB.NET projects (so no solution rename or rename of F#, Database or Reporting Service projects, nor stuff outside of the Microsoft realm like Prism).

These Just geeks: Renaming a Visual Studio Project link led me to the project.

Renaming solutions still is largely a manual operation as it involves renaming directories. You have to re-add some (sometimes all) projects later where this tool can come in handy: CoolCommands by SharpToolbox.

–jeroen

via:

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, F#, Prism, Software Development, VB.NET, Visual Studio and tools | Leave a Comment »

.NET/C#: Cleaning up path names with invalid characters (via: validation – C# Sanitize File Name – Stack Overflow)

Posted by jpluimers on 2012/11/13

Thanks Andre for this cleanup code:

To clean up a file name you could do this

private static string MakeValidFileName(string name)
{
string invalidChars = Regex.Escape( new string( Path.GetInvalidFileNameChars() ) );
string invalidReStr = string.Format( @"[{0}]+", invalidChars );
return Regex.Replace( name, invalidReStr, "_" );
}

Next to GetInvalidFileNameChars, you have GetInvalidPathChars.

–jeroen

via: validation – C# Sanitize File Name – Stack Overflow.

Posted in .NET, C#, Development, Software Development | 2 Comments »

IIS on Windows 7: installing and opening the firewall

Posted by jpluimers on 2012/11/12

Usually, I run IIS only on server systems, but for the occasional time when I need it on a (development) workstation (as Cassinni only listens to localhost), these links come in handy:

  1. Installing IIS 7 on Windows Vista and Windows 7 : Installing IIS 7 : Installing and Configuring IIS : The Official Microsoft IIS Site.
    This helps you setup IIS 7, and make sure ASP.NET works on it
  2. Allowing Remote Connection in IIS on Windows 7 – Super User.
    This helps you open up the firewall to access IIS over http port 80.
  3. Make sure if you add virtual directories or applications, that they are based on Physical Paths. When not (for instance with a subst path), you will get an error like this:
    <<
    —————————
    Add Virtual Directory
    —————————
    The specified directory does not exist on the server.
    —————————
    OK
    —————————
    >>
  4. For ASP.NET applications, when creating a virtual directory or application (especially outside the C:\inetpub\wwwroot realm), make sure the rights are set correctly.
    The IIS configuration will warn you when testing a new virtual directory:
    <<
    The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that <domain>\<computer_name>$ has Read access to the physical path. Then test these settings again.
    >>
    When in doubt, check out the rights set to C:\inetpub\wwwroot and use that as a point to get started.
    Usually the user is IIS_USRS, and the minimum rights looks like read+execute, but in fact is excute+read-data+read-attributes+read-extended-attributes.

–jeroen

Posted in Development, IIS, Software Development, Web Development | 2 Comments »

 
%d bloggers like this: