Wednesday, July 8, 2009

Setting up web-apps on IIS 7.0 (Win2K8)



Well it's official, http://www.heycloud.com/ is launched after a few weeks of planning and researching with different service providers. Fortunately, we had some hook-up deal through Microsoft with some free hosting from DiscountASP.com and the initial stuff was covered with no cost.

But as we moved on we needed security options like SSL and probably bandwidth upgrades later on in the future. But for now it's a new experience working with a cloud platform and figuring out how to work with the new IIS 7.0 that comes with windows 2008 server.

I've been reading around the clock to catch up on the technology i've neglected for some time. The windows server platform is much different than the Apache 2.0 i was familiar with; a lot of trouble is solved with user friendly controls but at the same time a lot must be learned. So far, from what i've seen, IIS seems much more manageable than apache and would be much better to implement off of. I'm sure the performance isn't as great as something like Apache but there seems to be a lot of security options readily available with Microsoft.

Anyway the purpose of this blog was to store some knowledge from my first day's experience with IIS 7.0 on the new windows server 2008. In IIS (all versions) architecture isn't as straight forward as like an Apache where the file system after htdocs is your actual website and subfolders. No, in IIS you need to create a website object and progressively add a new virtual directory or application to the website object. Since i am using asp.net applications i needed to use the latter for deployment which took some time to figure out. So with this structure already present i can tell that Microsoft will enforce a more manageable website over the typical Apache you see. This makes things much easier to enable / disable and also change security roles since every subfolder / application inherits the same settings as the root website unless it is changed manually.

After i got the web app working perfectly on my own system, i was glad i figured it out - but i would later find out that it would be more difficult on the discountasp site because of the lack of settings. The main problem I had was that my web application used an external DLL assembly file msidcrl40.dll. This file is responsible for helping a user login via Microsoft passport - something essential to the entire application. To fix the problem was easy - just impersonate a user (admin) that has access rights to the folder and it should work. But if i uploaded the files to the hosted website, there are no options to impersonate - so the assembly file probably gets a permission denial.

And another thing that was safe was to compile everything based on the .NET framework 2.0 rather than 3.5 - i had some problems running with the newest version.

No comments: