mha.dk

Random thoughts of wisdom - the personal blog of Michael Holm Andersen

Properties menu “freeze up” fix

Jacob send me a PDF yesterday about a VS 2008 'Performance Fix' - It seems that when working in Design View in either Visual Studio or Visual Web Developer, the properties menu have a tendency to “freeze up” for a few seconds when browsing through different controls. It's actually not something that I have encountered myself (probably due to the fact that I don't use Design View very often), but anyhow - If Jacob have encountered this, the chances are that many others have too.

This PDF shows how to configure VS 2008 to avoid this issue (maybe Jacob will post a comment about where he actually found this PDF ?!).

UPDATE: Jacob actually wrote the PDF himself, sorry for the misunderstanding .. and nice work, dude :)

Full Trust, path, Description and Web.Config

I discovered something *REALLY* weird (well, stupid actually!) today.

Due to SEO optimization I've made a couple of changes to my IIS setup the other day, setting up a 301 Permanent Redirect for the non-www version of my domain. During the process I changed the "Description" in IIS to indicate which IIS website/node is the actual site, changing it from 'aspnethotel.dk' to 'www.aspnethotel. dk (SITE)'

The site is running on a shared server, so the default Trust Level is 'Medium' (well, actually a variant of 'Medium', but nevermind :), but I've changed this to 'Full' using the below section in the global Web.Config:

<location allowOverride="true" path="aspnethotel.dk">
   <system.web>
     <trust level="Full" originUrl=""/>
  </system.web>
</location>

However, today I discovered that my site was suddenly running under 'Medium' Trust (as I got a Security Exception) - But why?!

It turns out, that the path attribute *MUST* match exactly the 'Description' field in IIS (I actually thought it was looking for the Host Header value!) - As below image shows, I had changed the 'Description' in IIS:

..so in order to maintain 'Full' Trust, the global Web.Config file must reflect this change:

<location allowOverride="true" path="www.aspnethotel.dk (SITE)">
   <system.web>
     <trust level="Full" originUrl=""/>
  </system.web>
</location>

Vista and SMTP server. Where did it go?

I'm in the process of updating the aspnethotel.dk website to version 2.5 - It's been a while since I did some major coding on it, so I moved this topic to the top of my TODO list :)

Amongst other things, the mail sending process is getting a major overhaul, so I needed to send mail from my developer machine (of course!), but when I clicked "Send" an error was returned!! DOW .. I forgot to install the SMTP Service, so I went to Control Panel .. only to find that the SMTP server has been removed from Vista !!?

So .. I had to find an alternative, and found these three great alternatives to the (missing) SMTP server in Vista:

Free SMTP Server (runs as an application, which makes it simple to configure for testing scenarios).
http://softstack.com/freesmtp.html

Smartermail (Free for one domain)
http://www.smartertools.com/SmarterMail/Free-Windows-Mail-Server.aspx

MailEnable Standard (Unlimited domains/users)
http://www.mailenable.com/download.asp

Apply MasterPage to (many) pages

Today I found out that it's possible to apply a MasterPage both on Application Level and on Folder Level.

Application Level

<configuration>
    <system.web>
               <pages masterPageFile="~/mhaMP.master" />
   </system.web>
</configuration>

All .aspx pages will now the  use the MasterPage called "mhaMP.master" (if the .aspx file does not contain a 'Content' control, the MasterPage will not be applied to it).


Folder Level

<configuration>
    <location path="admin">
    <system.web>
               <pages masterPageFile="~/mhaMP.master" />
   </system.web>
   </location>
</configuration>

Using a web.config file in the "admin" folder, which contains the above, all .aspx pages in the "admin" folder will now the  use the MasterPage called "mhaMP.master" (again, if the .aspx file does not contain a 'Content' control, the MasterPage will not be applied to it).

Cool Photoshop Tutorials

NOUPE have made a awesome link collection of top-notch Photoshop tutorials, brushes, patterns, textures, actions and .PSD downloadable files that others have freely contributed to the design community for making your next photoshop effect.

If you're a web designer/developer, there is lots of useful stuff - go get'me..