in

ASP.NET Weblogs

uber1024's WebLog

It's not hot wings and beer, but it's still okay

January 2006 - Posts

  • Commerce Server vs. Site Server object performance

    We recently replaced a Site Server 3.0 site with Commerce Server 2002.  Let me step back a minute.  The sites don't really use the the server packages as intended.  They use the pipelining process and the order form object model and that's about it, so we really miss out on a lot of opportunities here to leverage some of the cooler features of CS2002.  However, the process of moving from one platform to another was relatively painless compared to the effort of moving a site that had bought into Site Server completely.  The site is old, as in "from about mid-2000", so the architecture was around long before I started here and certainly long before I was in my present, decision-making role.

    Anyway, that's where we are.  And we're noticing that the Commerce Server 2002 objects are orders of magnitude slower than the Site Server objects.  It would be nice to be able to "unroll" those objects and create pure SQL tables out of them rather than leaving all the data in the marshalled baskets, however no one is willing to pay for that effort as it would be a significant amount of work (yes, the developer in me definitely wants to take the time to do it right.  However, the director of technology in me doesn't really want to tie up my resources on this project for 3 months.  Funny how things change as you move up the ladder.  A few years ago, I would have said that my DOT was a dumkopf for not taking the time to do things the best way possible.  I'd like to take this time to apologize to all the tech leads and project managers that I've fought with over the past few years.)

    Throughout most of the site, this isn't a problem, but there are two places (in administrative pages) on the site where 100 or more of these marshalled baskets get retreived and opened, and these pages are taking minutes longer to load than they were previously.  I don't expect that anyone has ever learned anything about this, I just wanted to have documented it somewhere.
  • File downloads from IIS 6.0

    So we've moved 8 websites from Win2k to Win2k3.  Some things have gone smoothly, some things have made me want to become a Buddhist monk (which actually wouldn't be that tough since I train in kung fu at a Buddhist temple here in Manhattan).  One of the latter was enabling file downloads from the website.  Basically, our client has a desktop app that needs to download updates from the website.  We have a web service that lists the latest updates and their location and the app is responsible for everything else.  Simple yet effective.

    So after the switch, the app stopped working for both Mac and PC users.  It turns out that Mac users need to download a .DMG file (which apparently is a mac-specific file format that is used all the time) and the Windows version needs to download both .EXE and .DLL files (and a few other types of files, but everything else went pretty smoothly).  None of these were working.

    The .DMG files we could get to download by opening up the website in the IIS snap in and looking for the MIME type applet and adding .DMG files with the right MIME type.  I don't recall off the top of my head what that MIME type was, but you can find it on Google (although the Bush administration will eventually have access to that information).  The .DLL and .EXE files were a little tricker.  I had to switch the "Execute Permissions" from "Scripts and Executables" to "Scripts only." 

    For whatever reason, IIS 5 was like Washington Square Park (*) ... you can get anything at any time provided you know where to look.  IIS 6 is much more secure, and you have to take steps to explicitly enable certain activities.  That's fine and it makes sense.  Fortunately there are a number of good bloggers from Microsoft, otherwise this issue would have been much tougher to track down, since the only place I found it talked about was on a blog or two.  This tells me three things:

    1 -- books are nice, but typically come out too late to be much help for most of us
    2 -- keep blogging, everyone!  It's a big help to all of us!
    3 -- does anyone ever go to MSDN.com any more?  It's about as useless as MSN.com.  I feel like I'm being sold things rather than being allowed to look up something that's going to help me with my job.  I always check MSDN when I've got a problem, but it's literally been years since it was actually useful. 

    (*) - For those of you who are not old skool New Yorkers, or who are New Yorkers but don't have as many shady friends as I do, Washington Square Park is a park down in Greenwich Village near NYU.  It's long been The Place To Go when you're looking for less-than-legal pharmaceuticals.  Some days, it reminds me of the old rave scene where it's just a marketplace for drugs of all kinds.  These days, there are more police officers patrolling the area so it's not as scruffy as it used to be, but you'll still see people loitering in the evenings saying "smoke, smoke" under their breath.  I happen to work 2 blocks away from the park, and one of my friends lives 2 blocks in the other direction, so I've walked through the park many times at all hours of the night.
  • AJAX to secure servers: semi-resolution

    I had previously talked about a problem making XMLHTTP requests from IE to our secure (HTTPS) webserver.  Microsoft support was very understanding but in the end it came down to this:

    "We can't help you.  We've known about this but have no resolution.  If you figure something out, let us know."

    We wound up rewriting our engine to do the Posts asynchronously and then setting a timer and trying again if the request took too long.  It was an ugly, ugly hack and there was money left on the nightstand after that one, for sure.  The only thing that would have been uglier (and probably wouldn't have worked) would have been to use IFRAMES.  I hope to never type that word again in my professional career.


  • Email woes when upgrading from Win2K to Win2k3

    The SMTP standard, which no one not featured in the mockumentary "Trekkies" has read, states that bare linefeeds ( "\n" ) are not allowed in the SMTP standard.  Qmail servers interpret this strictly.  There are qmail fanboy articles explaining why this is good.  That's fine and the world continues.

    However, IIS 5 would catch what amounted to mistakes by developers and would silently rewrite "\n" as "\r\n", which conforms to the SMTP standard.  For whatever reason, IIS 6 does not.  I can't fathom why this feature wouldn't be included for backwards-compatibility, but it seems that backwards compatibility is aggressively discouraged.  This is unfortunate.

    I'm having more and more "I hate Microsoft" days since Windows 2003 was adopted.  We have our main website running on Win2k3 and we're moving another (although I wish we weren't).  Our other 17 websites will remain on Windows 2000 until such time as I no longer work here.
  • Update: AJAX to secure servers bug

    So, we tried just about everything that can be done within a day (replaced the web service with a proxy ASP page, ran the .send() method in a loop and checked for a valid result, maybe something else ... I don't know.  I'm working on 2 hours of sleep), and still we get "The download of the specified resource has failed".  I don't believe we've heard back from Microsoft.

    If we don't hear back from Microsoft soon, we'll have to yank out AJAX and spend a week rewriting this particular page on the server, which would suck since the rest of the site is AJAX-based.  A google search turned up the idea to make sure that there is at least one Language selected in IE.  That might enable us to work without having to roll back a 4 month project because of this issue.

    Update:  We heard back from Microsoft.  They've got nothin', as do we.  I guess we've got work to do, but that's why we get paid, right?

    Update 2:  My programmers tell me that Microsoft Support has really pulled out all the stops to help us.  Even if they don't find any kind of resolution to this issue, and I suspect that there isn't one, it certainly was not from lack of trying.
  • Problems with AJAX on secure servers

    At my company, we use a hand-rolled AJAX solution (it's about 2-3 years old, otherwise we probably would have used someone else's solution).  Recently, we've applied it to one of our secure (HTTPS) websites and we've been having intermittant problems with the XMLHTTP object on the browser (always IE 5.5+) sending requests to the server (always Win2k3).  It happens about once every 20-25 requests and just returns an error message that says "The download of the specified resource has failed."  We tried moving our web service to an HTTP server rather than an HTTPS server and the problem went away, so we're fairly certain that it's a problem with the XMLHTTP object communicating with the secure server, and we've tried stripping out all irrelevant code, so we're also fairly certain that it's not something unrelated. 

    We've contact Microsoft support about this and they've confirmed that we're not the first people to encounter this problem but haven't gotten any more info from them yet (although we should hear back soon).

    This is just an FYI for those of you jumping on the AJAX bandwagon from someone who's been doing this sort of thing for a while now.
More Posts