DefinIT Because if IT were easy, everyone would do it…

30Sep/08Off

Free vector graphics

Posted by Sam McGeown

If, like me, you enjoy a bit of design in your free time then I have a great site for you...

Blog Spoon Graphics is a fantastic site, with loads of free vector graphics downloads that you can use in your designs. It's also got some great tips and stuff on vector art - take a look!

This is probably a little off-topic, but hey - I like this site! And no, I haven't sold out, it's not a sponsored link...I just like it!

Filed under: IT and Policy No Comments
19Sep/08Off

Fixing “Outlook(R) Mobile Access is supported only on Microsoft(R) Exchange Server 2003. Currently your mailbox is stored on an older version of Exchange server.” on Outlook Mobile Access under Server 2003

Posted by Sam McGeown

So I was testing the configuration on my Exchange 2003 server in preparation for the roll out of some Windows Mobile devices when I recieved the following error:

Outlook(R) Mobile Access is supported only on Microsoft(R) Exchange Server 2003. Currently your mailbox is stored on an older version of Exchange server. Please contact your system administrator for additional assistance.

"That's odd", I thought, "I only have Exchange Server 2003 in my organisation, how can I have an older version of Exchange?" It turns out that this has nothing to do with the version of Exchange you are using. I have set up my Exchange OWA to require SSL (see previous article on SSL and Integrated Authentication) and apparently this can cause issues for OMA.

The Microsoft-Server-ActiveSync and Outlook Mobile Access virtual directories
cannot access the contents of the user's mailbox if the Exchange virtual
directory is configured to require SSL. The Microsoft-Server-ActiveSync and
Outlook Mobile Access virtual directories only try to connect with the Exchange
virtual directory over TCP port 80 (HTTP), not over TCP Port 443 (HTTPS).

To resolve this, you need to follow these steps from MSKB 817379

1. Open Exchange Manager.
2. Expand Administrative Groups,
expand the first administrative group, and then expand Servers.
3. Expand the server container for the Exchange Server 2003 server
that you will be configuring, expand Protocols,
and then expand HTTP.
4. Under the HTTP container, right-click the Exchange Virtual Server container, and then click Properties.
5. Click the Settings tab, clear the
Enable Forms Based Authentication check box, and
then click OK.
6. Close Exchange Manager.
7. Click Start, click Run, type IISRESET/NOFORCE,
and then press ENTER to restart Internet Information Services
(IIS).

 Additionally, you must use Internet IIS Manager
to create this virtual directory for Exchange ActiveSync and Outlook Mobile
Access to work. If you are using Windows Server 2003, follow these steps:

1. Start Internet Information Services (IIS) Manager.
2. Locate the Exchange virtual directory. The default location is as
follows:

Web Sites\Default Web Site\Exchange
3. Right-click the Exchange virtual directory, click All Tasks, and then click Save
Configuration to a File
.
4. In the File name box, type a name.
For example, type ExchangeVDir. Click OK.
5. Right-click the root of this Web site. Typically, this is Default
Web Site. Click New, and then click Virtual Directory (from file).
6. In the Import Configuration dialog
box, click Browse, locate the file that you
created in step 4, click Open, and then click
Read File.
7. Under Select a configuration to import
, click Exchange, and then click OK.

A dialog box will appear that states that the
"virtual directory already exists."

8. In the Alias box, type a name for
the new virtual directory that you want Exchange ActiveSync and Outlook Mobile
Access to use. For example, type exchange-oma.
Click OK.
9. Right-click the new virtual directory. In this example, click
exchange-oma. Click Properties.
10. Click the Directory Security
tab.
11. Under Authentication and access
control
, click Edit.
12. Make sure that only the following authentication methods are
enabled, and then click OK:

Integrated Windows
authentication
Basic
authentication
13. On the Directory Security tab,
under IP address and domain name restrictions,
click Edit.
14. Click the option for Denied access,
click Add, click Single
computer
and type the IP address of the server that you are
configuring, and then click OK.
15. Under Secure communications, click
Edit. Make sure that Require
secure channel (SSL)
is not enabled, and then click OK.
16. Click OK, and then close the IIS
Manager.
17. Click Start, click Run, type regedit, and then
click OK.
18. Locate the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MasSync\Parameters
19. Right-click Parameters, click to
New, and then click String
Value
.
20. Type ExchangeVDir, and then press
ENTER. Right-click ExchangeVDir, and then click
Modify.

NoteExchangeVDir is case-sensitive. If you do not type ExchangeVDir exactly as it appears in this article,
ActiveSync does not find the key when it locates the exchange-oma folder.

21. In the Value data box, type the
name of the new virtual directory that you created in step 8. For example, type
/exchange-oma. Click OK.
22. Quit Registry Editor.
23. Restart the IIS Admin service. To do this, follow these steps:

a. Click Start, click Run, type services.msc, and
then click OK.
b. In the list of services, right-click IIS
Admin service
, and then click Restart.
Filed under: Exchange No Comments
18Sep/08Off

Compiling a .Net DLL for a medium trust environment

Posted by Sam McGeown

Recently I wrote a little utility for a client using the excellent Html Agility Pack to read and navigate through a HTML page, selecting the data that was needed and parsing it - basically a screen scrape. I downloaded the source, compiled it, added a reference to the dll in my project and tapped away for a few minutes and et voila, within a few minutes a working screen scrape. A fantastic library.

On uploading the project to my GoDaddy web hosting however, I encountered a problem. You see, my hosting is a shared hosting environment, and like most such webhosting environments is set to a Medium Trust level for .Net applications. As MS dryly puts it:

Applications that receive less than full trust by the runtime code
access security system are not allowed to call shared managed libraries
unless the library writer specifically allows them to through the use
of the AllowPartiallyTrustedCallersAttribute Class.
Therefore, application writers must be aware that some libraries will
not be available to them from a partially trusted context.

The solution, although slightly confusing from the MS documentation, is actually very simple. I opened the HtmlAgilityPack source code, and edited the AssemblyInfo.cs file. Firstly, add a reference to the AllowPartiallyTrustedCallersAttribute:

[assembly: AllowPartiallyTrustedCallersAttribute()]

Since AllowPartiallyTrustedCallersAttribute is part of the System.Security namespace, we must add a reference at the top of the page:

using System.Security;

I then rebuilt the project, rebuilt the web project and it now works like a charm.

Filed under: .NET, Microsoft No Comments
11Sep/08Off

Vista .msu installer fails with error: Installer encountered an error: 0×80070422

Posted by Sam McGeown

I needed to use PowerShell for something today on my Vista laptop, but was unable to install the file. I had the normal UAC permission required when I ran it,  but then it failed with this error

Installer encountered an error: 0x80070422

The service cannot be started, either because it is disabled or because it
has no enabled devices associated with it.

It turns out that you need to enable the Windows Update service in order to use an MSU file. How backwards is that? Well, lets see, I have to run a SERVICE in order to be able to install applications.

Incidently, PowerShell is fantastic, I'm just getting used to using it at the moment, probably more to come on that!

Filed under: PowerShell, Windows 2 Comments
10Sep/08Off

I’ve achieved my MCSE

Posted by Sam McGeown

Well, I've been away with my friends at Firebrand again and guess what...MCSE Windows Server 2003!

  • 70-293 Planning and Maintaining a Microsoft Windows Server 2003 Network Infrastructure
  • 70-294 Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure
  • 70-298 Designing Security for a Microsoft Windows Server 2003 Network