SQL Server Setup failed to obtain system account information for the ASPNET account.

On the topic of Sql Server 2005 installations, A seperate issue that may occur is the following error message:

SQL Server Setup failed to obtain system account information for the ASPNET account. To proceed, reinstall the .NET Framework, and then run SQL Server Setup again.

This is generally caused by installing IIS and not configuring asp .net, particularly if you install IIS after already having installed Visual Studio at an earlier date.

Fix this by registering asp .net with IIS. To do this open a command prompt and go to the following directory:
C:\windows\Microsoft.NET\Framework\v2.0.60727\

This is assuming you’re using .Net 2.0 or higher (3.0, 3.5). Even if you’re using the 3.x series and Visual Studio 2008, you still need to go to the v2.0 directory for this operation – this is because the 3.x series are not a replacement for the 2.x series, but rather extensions. (3.x is a superset of 2.x and there have been no breaking changes to 2.x functionality).

If you want to understand this further, there is an interesting post about it here: http://blogs.msdn.com/vijaysk/archive/2008/03/20/running-asp-net-3-5-on-iis.aspx

For now though, run the following command: aspnet_regiis.exe -i

This will register asp.net with iis and hopefully solve this issue.

Advertisements

Edition Change Check Warning

Found an interesting little issue today when trying to install Sql Server development edition (though I’m led to believe it applies to all versions).

On the configuration check screen I noticed a warning next to “Edition Change Check”, the message of which read:

To change an existing instance of Microsoft SQL Server 2005 to a difference edition of SQL Server 2005, you must run SQL Server 2005 Setup from the command prompt and include the SKUUPGRADE=1 parameter.

I did a bit of investigating and it looks as though the cause here is that I already have sqlexpress installed. It looks like I installed it along with Visual Studio some time ago and forgot it was there, so the Sql installation files are assuming they’re going to be used to upgrade this installation – which it can’t do without specific instructions.

One of the potential issues here is that in order to do this, all service packs and hotfixes need to be uninstalled (something it obviously wont do without the proper permissions). What this means for us is that after we perform the upgrade, we need to reinstall all the service packs and hotfixes to ensure proper security.

The trick then is to open up a command prompt and navigate to the cd/dvd directory that contains the sql files and run this command:

setup ADDLOCAL=SQL_Engine INSTANCENAME=MSSQLSERVER UPGRADE=SQL_ENGINE SKUUPGRADE=1

If you’ve used a different instance name for your installation of the initial version you will need to use it here instead of MSSQLSERVER. MSSQLSERVER is the default name for a standard Sql Server installation, however the named instance for a standard sql express instance is SQLEXPRESS which I suspect is the most common case where the need to do this would catch us by surprise.

Note that the Edition Change Check will show as “Success” when this has been done properly. It took me a while of testing to ensure this as the property names are case sensitive and it’s easy to make a typo. Don’t continue past the configuration check until all the checks are green.

From there it should be a standard installation with no worries.

It might be useful to note that it is in fact possible to install an instance of sql server alongside sql server express if you do not wish to upgrade (or to keep the sqlexpress name). In this case it will just install as expected and you will be able to access either instance by name at leisure.

Hope this was helpful.

IIS, port 80 and port 443.

I remember being quite impressed when first I understood how IIS handles host-names in such a way that a single server can have multiple websites, all on port 80, differentiated only by hostname.  I’m sure other webservers such as Apache can do it as well but this was the first time that it actually hit me how ingenious that idea was.

The only absolute in tcp/ip originally was ip address. It was unique at its particular level which means, on the Internet, unique world wide.  Like a world wide postal address I can be guarenteed that there isn’t another person out there with the external ip 202.139.111.225.

Hostnames are likewise unique.  No-one else out there has the hostname http://www.transend.com.au.  I know this, because its registered to Transend Pty Ltd.  In fact, no-one out there has any address in the something.transend.com.au range.

Hostnames are great for people, because they are words and words are easy to remember. Thats the original purpose behind them, to translate those numbers, which are great for computers, into something we can remember.  It is possible to remember ip addresses, one network technician I knew could recite the ip address of every server he handled (and it was well over 50), but in general its easier for us to remember hostnames.
An obvious step from this is to be able to have multiple hostnames per ip address. The simply all lead to the same place.  Not quite as obvious, to me at least, was to be able to differentiate between websites depending on which hostname was used.  This is the equivilant of having two houses on the same physical location (impossible I know but bear with me) and the one you see is determined by the directions you followed to get there.

Even more accurately, it doesn’t even matter -how- you got there, the house you arrive at is different depending on the address you were given, even if the different addresses point to the same plot of land.

Technically this is accomplished by examining the headers of a request, comparing the hostname requested to a list of websites on the server and using that to determine which site they want to access.

Simple yeah?  Well my question is this. Why can’t they do that for SSL??  SSL port is port 443 and, despite host headers, the server restricts you to only one port 443 site.  It’s easy to say “change the port” but thats not simple in a corporate environment, full of hardware and software firewalls and access control lists. 

Frankly, its a pain, and doesn’t seem to be a necessary one.  Why this illogical choice Microsoft? You’ve shown you -can- give us the option, so you must have chosen not too. Why damn you why!!!!

Ahem.

The answer is probably because you can’t read an encrypted header.  If each website has its own security key, then only a particular website can unlock messages intended for it… except that we dont know who they’re intended for until they’re unlocked.

Ah, tricky.  What a pain in the proverbial.

This is also a primary cause of the “The process cannot access the file because it is being used by another process.” error, in which IIS refuses to start a disabled website.  Generally it means either you havn’t set up host headers, and you’ve got two sites fighting over port 80, or you’ve tried to have multiple sites with SSL certificates and they’re both trying to use port 443. 

The solution? Either change the ssl port so that they don’t conflict, only have one of them use SSL or create a supersite that contains the other two sites as application virtual directories.  That way they can share a single certificate – though you lose the cool host-header that way.

Personally, i’ve set it up the latter way. I keep the host-header by having a non-secure website with that host header that simply redirects (via asp “Response.Redirect “http://woot.com” ) to the virtual directory.  Seems a bit inelegant perhaps, but its working and it has gotten around the firewall port problem.

Oh, and wish me luck tonight. I’ve got an outage. It’s the 6/6/06 and the outage is at 6pm.  Outage of the Beast!

Superstitious server admin’s standing by.

DotNetNuke 4.x – Cryptic install error

A friend and co-worker today decided to experiment with installing the new .Net 2.0 version of DotNetNuke today. Now, our current website was developed on the 3.x dnn structure but i'd yet to have a look at the 4.x series. Turns out there is a particularly cryptic error message that can show up if your web.config isn't properly configured when you run the install.

The error shows as something along the lines of "Cannot find dbname_template.mdf file in xxx directory". After wasting a little time looking for the mdf file (it doesn't exist in any of the distribution files, in case you're wondering.) I got my friend – let's call him Cranky Prick – to send over his web.config file.

It turns out the new config file has two different sections for entering connection strings, and within those sections there are two possible formats. I'll demonstrate below:-

<connectionStrings>
<!– Connection String for SQL Server 2005 Express –>
<add
name="SiteSqlServer"
connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"
providerName="System.Data.SqlClient" />
<!– Connection String for SQL Server 2000/2005
<add name="SiteSqlServer" connectionString="Server=(local);Database=DNN;uid=DNN;pwd=DNN;" providerName="System.Data.SqlClient" />
–>
</connectionStrings>

This is the first connection string setting. AS you can see, there are two potential versions of "SiteSqlServer" there, and as the comments say, the first is for using SQL 2005 Express, the other is for using SQL 2000 or, I assume, 2005 full version. We were using 2000 so using that section was Cranky's first mistake. What we have to do is comment out the top and uncomment the bottom <add clauses.

The bottom clause wants a connection string that is more familiar to us in anycase.

Just below this there is another section, as seen below.

<appSettings>
<!– Connection String for SQL Server 2005 Express – kept for backwards compatability – legacy modules –>
<add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"/>
<!– Connection String for SQL Server 2000/2005 – kept for backwards compatability – legacy modules
<add key="SiteSqlServer" value="Server=(local);Database=DNN;uid=DNN;pwd=DNN;" /> –>

Apparently these lines are for backwards compatibility with modules that wont handle the top lines properly. Again, we need to comment out the top <add statement and uncomment the bottom one, then fill it out with the same details we gave above.

Either using the wrong format (uncommenting/commenting the wrong one) or forgetting to fill in the second connection string is what causes that error. As far as I can tell, you don't actually need the mdf file its looking for (and I have no idea why it thinks it should need it.) It does mention the second connection string in the installation manual, but I can see how it would be easy to miss – Particularly if you dont READ it Cranky.

Looks about as smooth as a 3.x installation once thats sorted. Not that it isn't possible to come up with some nifty problems there 😉 Adios.

The Infinite Phoenix

Turns out i’m not the only blogger at Transend Networks – in fact, not only is there another blogger here but he is from my own parent company and sits in the desk opposite mine. Heres a plug then for the The Minion and his Empress, and their home the Infinite Phoenix.

Infinite Phoenix

Be warned, this is the guy that restarted my anime and manga addictions – just when I thought I had it kicked – thus costing me hundreds of dollars!

Some Quick Links

A quick link to an interesting article, acts as a bit of an introduction to Unit Testing. I do agree with him, whilst some aspects of the Xtreme programming revolution still make me feel vaguely uneasy, Test-Driven Development (TDD) is one area I have wholeheartedly embraced. It works great.

The Power of Tests

Also, for you DotNetNuke admins out there, did you know DNN has a recycle bin for old deleted pages and modules? If, like me, you didn't know, check out this article here. Believe me, when a user called up this morning to report an accidently deleted major module, I was feeling as hysterical as they sounded. All is not lost however.

Recover a Deleted Module