Name: James Taylor
Member since: 2002-04-15 13:29:20
Last Login: 2008-04-16 09:20:57
Homepage: www.imen.org.uk
Notes: Working in Norwich UK for a technology company, working on interesting products for various markets. The work involves some web programming for both Websites and applications requiring data from a centralised server system.
Also a fully licensed Radio Ham, holding the licenses: M0OUZ, 2E0OUZ and M3OUZ (in decreasing order of relevance). Undergoing personal development with the IET.
15 Apr 2008 (updated 15 Apr 2008 at 16:42 UTC) »
Things are becoming a little tricky. Because Windows 2008 has only just been released, the migration to that is going to be relatively slow (I can't realistically suggest that we have our production server as a 2008 box ... yet). So we're stuck with using Windows 2003 and IIS6 for our .Net hosting.
However, we're programming on Vista boxes, which of course, are running IIS7 and all its finery. Now, having a test platform which is a different version to the deployment platform is never a good idea, and right now, its a royal pain in the ass. And why? Well, randomly, the way I add headers:
Good
response.AddHeader("Content-type",
"text/html");
Bad
response.Headers.Add("Content-type",
"text/html");
The first one works, the second one ...
System.PlatformNotSupportedException: This operation
requires IIS integrated pipeline mode.
at System.Web.HttpResponse.get_Headers()
at ...
Go figure.
Ok, if you're an indie developer for the Microsoft platform, then you might have SQL Server (Express) then you might also want to install MS SSMSE (Microsoft Sql - Server Management Studio Express).
The Good
Ok, so you've downloaded the SSMSE install package, and it doesn't install and the MS reference for it is about permissions on the Data Directory. There might be one single file which has the wrong permissions, but I couldn't find one. Installations continue to fail no matter what the install user is.
The Ugly
To install, there is a very simple solution - Turn UAC off - its in the user panel of the control panel. Then installing SSMSE is painless. Just remember to turn UAC back on again after you've done it, oh and pray that you dont need UAC's protection for the few minutes that you had it turned off... (Why do you think this section is entitled "The Ugly"?)
The down-right-Bad
If you decided to go with MS Sql Server 2008 Express because, well, why not... (think of all those new features) then you have a bigger problem. At the moment, SSMSE is only available in the 2005 variant, which does not allow connections to a 2008 Express service.
This weekend for me has been a near disaster. I started work on my SpokePov and USBTinyISP. Then my Solder Iron melted. Not the plastic hand wrap, no, the nib. Thats it for soldering - no more soldering being done without a soldering iron.
I now need to go and buy a nice soldering iron which is temperature controlled - if you use one thats too hot, you end up having problems, if you use one thats too cold or does daft things (like the cold solder one) then you have problems.
So now I have a fully built USB dongle, and a half-built SpokePov, and a not very happy monster.
18 Feb 2008 (updated 18 Feb 2008 at 16:47 UTC) »
Ok, this one had me stumped for a bit, and it took me a long time to find out why. Basically, the problem is that there is no ASP.NET tab in website properties, and this is because .NET isn't installed properly. The first thing to do is download and install .Net framework, which dosn't seem to do anything.
The second thing to then do is to run:
%SYSTEMROOT%\MICROSOFT.NET\Framework64\v2.??\aspnet_iisreg
-i which will then try and re-register. Now if this
"works" but dosnt have any effect, its probably because
you've got a beta of .Net installed. However, if this throws
an error, its probably because IIS is running in 32bit mode.
Why would it be? Well aparantly it has to to be able to deal with PHP. Maybe thats true, maybe it isn't any more - but either way, theres lots of install guides out there telling you how to break it into 32 bit mode. To Fix...
cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs
set w3svc/AppPools/Enable32bitAppOnWin64 0
The 0 is what sets it back to default (64 bit) where having that as a 1 will set it to being 32 bit mode. Of course now all your PHP is probably broken. But then again it was anyways.
Just re-run the first command, and reboot (IIS? Server?)
This post should really be titled "Please write 1000 times,
Vista is Not XP". Yesterday, I had the pleasure of having to
look at how to write .Net wrappers around a Windows dll - to
be precise, the Smart Card interface -
WinSCard.dll. We've previously written code in
C, but really the time is to move on and use C#. The
problem's been addressed before, and it dosn't take a genius
to find Google has references to Smart
Cards in .NET. In particular, this is the second part of
a three part essay. The first part discusses using a COM
object to wrap around the dll functions, but this is the
simpler way of doing it.
Apart from the required usinglines, the code to
do this, is relativly simple:
public class MyClass{
[DllImport("WinScard.dll")]
public static extern int SCardEstablishContext(
uint dwScope,
int nNotUsed1,
int nNotUsed2,
ref int phContext);
}
This is a fully functioning class which provides the interface to one of the functions in the DLL. Now, whats the problem?
Well, in this instance, its a security violation. Some of
the dll functions can be called and run without any problems
at all, but some of them cause
AccessViolationException. The helpful hint that
comes with it suggests that this is because memory is
corrupt (and after lots of uhming and ahhing we decide its
not). No, the problem is because the memory is protected. In
Vista that is. The same code running on XP provides no
problems whatsoever.
Now heres my problem - my Google skills, usually pretty nifty, are failing me - I am struggling to search the great intertubes for a solution I am still scratching my head. The combinations of keywords I'm using still only come back with results are either:
1) Useless 2) People suffering the problem who havn't solved it. 3) Results about something similar in XP which has the same exception which is fixed by a MS .Net hotfix (which is irrelevant). 4) People who have a solution along the lines of "run your code as root".
So I need to spend more time looking at that soon.
Chicago certified others as follows:
Others have certified Chicago as follows:
[ Certification disabled because you're not logged in. ]
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!