Calender
<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
Posted by: Jason | Created on: 12/05/2009, 19:16

While doing something very rudimentary: adding dynamic tags to some ASP.NET pages for SEO purposes (title, description, keywords, etc ... you know ... the usual suspects), the dynamically created controls were malformed in the following ways

 

  • the <meta> tags had no trailing "/".  
    • <meta name="description" content="some content"> should be <meta name="description" content="some content" />
  • A coworker tried to set the content attribute inline like this:  <meta name="description" content="<%=contentvar%>" /> and the generated code looked like this
    • <meta name="description" content="&gt;%=contentvar%>">
      • notice the <% token get interpreted as HTML and replaced with the encoding for greater than.
      • also notice the trailing "/" still gets removed even though it's clearly written into the aspx file
It was by pure chance that I noticed the following line of code in my web.config.
  • <xhtmlConformance mode="Legacy"/> 
It turns out Visual Studio puts this line of code in your web.config for you when migrating from VS 2003 to VS 2005.  This was quite a while ago as we've been on Vs 2008 for quite some time now.

Removing that line fixed the problem, now I simply have to regression test the entire site to see if removing that line breaks something else.  Greeeaat.

Here is a link to Scott Gu's blog post that is related and helpful, but does not address my exact issues:  


 

Posted by: Jason | Created on: 30/04/2009, 01:26

LifeHacker rocks.  I love that site.  You should subscribe to the RSS if you haven't already.  But this tip is so good I wanted to put it here where I can find it quickly in the future.  Create a shortcut and put this in the execution field.

  • taskkill.exe /f /fi "status eq not responding"

Any time you get a window that's completely hung up and opening task manager and killing the task won't make it go away (anytime soon)  Just click this icon.  You can make it even handier by following lifehackers other advice.

Link to where I found this: 

Posted by: Jason | Created on: 18/04/2009, 23:31

 

A good friend of mine that works for Symantec hooked me up with a few Norton Internet Security 2009 licenses, claiming that it was good.  Dubious, but trusting my friends judgment, (he knows and understands my angst toward such things) I installed it on my laptop and have been toying with it for about a half-hour.  My experience with internet security applications (both personally and in the corporate environment) have driven me to avoid them altogether to prevent me from losing my salvation in a fit of unbridled rage.

Now that you understand where I'm coming from you can see how it is not easy for me to say this:   I'm impressed.  Not only has it not driven my laptop to its knees, but it seems to actually be letting me get to my remote file shares and wireless internet seamlessly.  Presumably it's concurrently protecting me from malware and viruses.

If you receive the following error while trying to build your web setup project:

  • Unable to build project output group 'Content Files from [MyWebSetupProject] (Active)'

It means that there is some piece of content (codefile, image, etc) that is still included in the project but no longer exists on disk.  The only way I've found to find the culprit is to manually browse through my Solution Explorer tree and look for files with the little yellow warning triangle on them.  In all my cases, these were files I really did mean to delete but forgot to remove from the project.  The error was horribly vague, but correct.

Link to where I found this solution and more information on the problem:

http://www.hanselman.com/blog/VisualStudioMSIProblemsUnableToBuildProjectOutputGroupContentFilesFromSOMEWEBActive.aspx

 

*UPDATE*   -- 12/21/2009

I just had an "episode" where I was getting this error but there were no missing files to be found anywhere in the solution.  

 

Here are the steps I took to fix the problem:

1.  A did a "rebuild all" and everything built with no errors.  

2.  I built the setup project and got the "Unable to build project output group" error.

3.  I did a "clean solution" and then "rebuild all" which succeeded but then gave me the same "Unable to build... " error when I built the setup project.

4.  I deleted every "obj" and "bin" folder in every project and then did a "rebuild all"

5.  This gave me several missing references (which I have no explanation for seeing as I did not adjust or toy with any references before starting this process.)

6.  I fixed the references, and did another "rebuild all"

7.  aaaaaaaand.... fail with the same "unable ... " error.  <sigh>

8.  I checked file permissions on the entirety of the code folders.  No issues.  Same error.

9.  I set build output to "diagnostic" and leafed through the 200 pages of text looking for errors.  None found.

10.  I checked to make sure the build settings were all the same on each project (All set to "release") no issues found.  Same build error.

11.  I wrote a quick application that parses the xml in the .vbproj files and validated the existance (on disk) of every file in its correct location.  I did this for all "content", "compile" and "embeddedresource" files.  No missing files found.

12.  I restarted VS several times making sure I "run as administrator".  No change.

13.  I googled the error during this whole process ad nausium. I truly felt like I was trapped in a googlplex.

14.  I blew away my setup project and added and built each project individually in the setup project with NO ERRORS.  <ARGH!>

15.  I then reconstructed my entire setup project again and it failed again with the same error.

16.  I cursed Microsoft with fists raised toward the heavens.

17.  For reasons of insanity and total desperation I rebooted the build machine.

18.  Web Setup project = "Build Successful."  <CRY>

Posted by: Jason | Created on: 15/04/2009, 23:52

I deployed a working WCF service to IIS7 on Server2008 and got a 404 File not Found error.  

Turned out I had to re-register the WCF components and suddenly it all started working.

Oddness.

Here's the command:

C:\Windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe -r

Posted by: Jason | Created on: 15/04/2009, 23:51

Handy function for properly formatting the whitespace of an XML stream as a string … took me a while to figure this out as most examples show how to format it to a file.

private static string FormatXML(string xml)
{
    var doc = new XmlDocument();
    doc.LoadXml(xml);

    var textWriter = new StringWriter();
    var xmlTextWriter = new XmlTextWriter(textWriter) { Formatting = Formatting.Indented };

    doc.Save(xmlTextWriter);

    return textWriter.ToString();
}

Posted by: Jason | Created on: 15/04/2009, 22:08

If you ever see this error trying to build your web setup project:

  • Error 1 Build failed due to validation errors in C:\…\DB.dbml. Open the file and resolve the issues in the Error List, then try rebuilding the project. C:\…\DB.dbml

Do the following to fix visual studio.

  1. Close the Visual Studio project.
  2. Open a new command prompt
  3. Navigate to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
  4. Run Visual Sudio with the /resetskippkgs argument: devenv /resetskippkgs
  5. Open your solutions
  6. Build your web Setup project.

Where I found this solution:

http://blog.mjjames.co.uk/2008/07/build-failed-due-to-validation-errors.html

Posted by: Heidi | Created on: 15/04/2009, 19:14

Hey love,

I think the website turned out great!!  Thanks for the login for the pics it makes me feel safe that only people we know can view the pics!!

 

love you lots,

Heidi

Posted by: Admin | Created on: 15/04/2009, 05:59

Ok, I've been playing around with BlogEngine.NET for several days now (with the sourcecode on my local machine that is).

In roughly 6 hours  I've managed to figure out how to:

  • Implement a Theme and customize it.
  • Impelment LightBox functionality
  • Pull my webalbums from Picasa (into lightbox :)
  • Edit the source to only show a single image for a lightbox webalbum in a post
  • Implement a 3rd party extension to give me security around only certains posts that I decide I want people to have to login to view.
All that said and done, I'm absolutely blown away how easy this package is to crank up and "tweek."  It's probably the best experience I've had yet with an open source project. 

Jason