Thursday, April 19, 2007

ASP.NET 2.0 app under IIS 5.1 on my Development Machine

I made my initial attempt to host an ASP.NET 2.0 application under IIS 5.1 on my development machine. The Application was the SubSonic 2.0 Beta 3 SubSonicCentral demonstration site. Normally I use the ASP.NET Development Server for this sort of thing, but I got tired of loading up the SubSonic solution in VS 2005 just to view this site - VS 2005 is a resource hog like no other. Anyhow, I ran into issues, and found solutions. Posting them here so I can reference them later if need be.

Issue the First: App-Domain could not be created. Error: 0x80131902

This error shows up in the Application Event Log under Administrative Tools -- Event Log. The actual message given to you in your browser tells you the "Site is Unavailable" and tells the administrator to look at the Event log. Solved this by following these instructions (Jonathon's Blog) - note: I got some error messages during the "aspnet_regiss.exe" steps, but they didn't seem to affect the outcome.

Issue the Second: Could not access database "Northwind" with user login ADAM-IMS\ASPNET

In VS 2005 ASP.NET Development Server, the .NET process tries to access the SQL Server Express instance using my login account (ADAM-IMS\Owner). IIS uses the ASPNET account. One simply needs to add a Login in the SQL Server Management Studio, and then give the user permissions on the Database.

Technorati Tags: , ,

Thursday, April 12, 2007

RAS (Dial-Up) Tip/Trick for Auto dial

So, you want a dial-up connection to dial whenever a program "asks" for a remote resource (i.e. uses the internet)? Pretty standard - you goto the Internet Settings in the Control Panel, and look at the Connections tab. You should see any dial-up connection you have in the listbox, and below that the options you seek -- either "Always dial this connection" or "Dial this connection whenever a Network Connection is unavailable." I usually stick with the second option, since it seems more stable and reliable on the embedded systems I maintain.

This is all well and good, but I soon ran into a problem. After going through this setup, the first time you open an internet-savvy application and it attempts to use the remote resource, you'll be presented with a small dialog that lists the connection, has three buttons (Connect, Settings, and Work Offline) and also has a checkbox that is empty marked "Connect automatically." The problem is, the devices I'm engineering don't have a keyboard or mouse hooked up to them, and one of them is about 3 hours drive from here. So, the first time it drops the internet connection (which is dialed at startup fortunately) and these settings cause it to automatically connect again, it will throw this little dialog up on the screen and sit there - unaccessible to me since it is offline.

I used process monitor and my own development computer to (miraculously) narrow this down to one registry key. Interesting factoid: on my development laptop, Windows XP Pro hits the Registry (Mostly Reads fortunately) around 50 thousand times in the few second interval I captured using procman.exe! Here is the key:

[HKEY_CURRENT_USER\RemoteAccess\Profile\sprint] "AutoConnect"=dword:00000001

Oh, and make sure you change "sprint" to the name of your dial-up connection! [Thanks to KM from the XPE newsgroup for that reminder!] If the key exists, and is set to '1', it is equivalent to having checked "Automatically connect" in that annoying, useless dialog the first time.

Technorati Tags: , ,

Couple of neat Firefox Extensions

I downloaded a neat looking Firefox extension called "ScribeFire."





It's a tool that lets you post to your blog in the bottom half of Firefox while looking at pages in the top half. I don't always need to look at something on the web to be blogging - I seldom do actually - but it is still neat to use, and lets me skip the whole "log into Blogger, click new post" step.

Another really slick looking extension I just picked up is FireFTP. Its function is pretty self-explanatory. I like the interface (which is a hard thing to find in a free FTP client) and it has the few advanced features I usually look for in an FTP client (folder diff, session manager, etc.)




Powered by ScribeFire.

Update: I've since stopped using ScribeFire. It makes my blog posts ugly with "&nbsp" everywhere and such.



Technorati Tags: ,

Tuesday, April 10, 2007

I was having issues with images flickering in our Delphi client program - it is going into the bit bucket anyhow, but the flicker was really noticeable on the new XP Embedded image I'm trying to make.

The solution, from my newsgroup post:

Eureka!

I don't know why I didn't think of this earlier. I just turned on Double Buffering in the application itself for the form that displays the images, and it looks sexier than ever! Even on the full-blown images and my development computer.

Off topic, but if anyone is wondering this site has great info on removing flicker from images:

http://delphi.about.com/library/bluc/text/uc052102g.htm

Good Luck!

Adam
ims3k.com

Wednesday, April 04, 2007

Linux disk imaging made easy

You have a small "drive" (I'm actually using a 1GB Compact Flash card) with 3 partitions on it - you want to preserve the information on each of these partitions, and the boot information at the front of the "drive."

# to make the image:
dd if=/dev/hda | gzip > hda.img.gz

# to restore the image, or clone to another disk:
gunzip -c hda.img.gz | dd of=/dev/hda

Be sure to change 'hda' to the appropriate drive.

Disqus for A Nofsinger's Blog