Aug 12, 2009
Windows7: VS2005 Publish Web Site
Recently upgraded my WinXP 32 bit to Win 7 64 bit. There’s been a few bumps in the road, and here’s one that cost me about an hour:
Sometimes I like to publish a website to the local IIS to be able to use it independent of visual studio.
So I went to Build -> Publish “ProjectName”
Put in http://localhost/projectname like I did on Windows XP.
No such luck, I need to be administrator of IIS metabase or front page extensions need to be installed.
So I did the Run As Administrator. Still nothing. I don’t think there is front page extensions anymore, nor do I really want to install them, so I cross that off.
I had to do the following:
Make sure IIS management studio is installed, then create a web site. Give it a unique ip or port number. I used 8080 as my port number.
THEN, I could publish to http://localhost:8080
So far so good. But when I go to the site, i receive:
Could not load file or assembly ‘System.Data’ or one of its dependencies. An attempt was made to load a program with an incorrect format.
So I checked the .NET version, (Tip: That’s under Application Pools in IIS7, not under the site). It was set to 2.0, so that wasn’t it.
A little googling indicated it’s probably my project was a 32 bit app, and I was using a 64bit web server. Great. I didn’t wanna change the project because it works in production, so I don’t wanna mess with anything.
After some research and some good luck, I figured out how to make both work:
1. In IIS management studio, go to your computer (the top most node)
2. Run the Configuration Editor under Management.
3. Under Section select, System.ApplicationHost/ApplicationPools
4. Expand applicationPoolDefaults
5. Set Enable32bitApponWin64 to True.
!! Just like that it worked. You mileage may vary. I was expecting to atleast have to tell the application pool it was 32 bit, but I was surprised I avoided that step.
Well, that’s another transition to Windows 7 I survived, I’m still waiting for the big one.
I would like to talk to you about the former villelink. Is there a way I can contact you? Thanks in advance.
Kevin