IIS6, WCF, BizTalk, Sql and Permissions

by topher 13. October 2008 22:52
the project i'm working on at the moment will be drawing to a close in a few weeks, in fact the go-live date is mid november sometime, so that means i need to get things off of my local pc and into some test environment. this is where all the fun starts.

as the post title eludes to i'm using biztalk to integrate a data feed from a third party into one of our sql db's (which is abstracted away with a wcf service hosted in iis6), and then on to a final resting place of yet another third party down stream somewhere.

i've never been a web man, i've always been a winforms man, rich client through and through me, so the only permissions i've ever had to deal with is the occasional readonly file.

i've been developing on a local instance of biztalk for some time, talking to a wcf i've also had running locally hosted in iis, and i've been using unity for dependency injection and wrote a rather noddy file based implementation of the repository so that i could get things up and running, with out the need to get my hands dirty with the whole database bit just yet.

everything was working hunky dorey until this weekend when i started on writing the sql implementation of the repository. things are not all fine and dandy any more.

as i've managed to steer clear of any kind of iis development, when i ran into problems with user impersonation this morning i also immediately, and rather annoyingly ran smack into a brick wall.

the db requires integrated security, and as the wcf service is iis hosted it's running as the aspnet account, and the db keeps giving me the bird. panic started to set in as i realised that there isn't anyone at work who can help me out with this, and i've only got a few hours of the day left to get things working before tomorrow. so, google is your friend right? well not when there are pages and pages of asp and wcf security guidelines/tutorials/blogs/posts to read though, and the clock is ticking.

i ended up hacking it to get it working (by using a local sql logon, shhh, dont tell anyone, it will be gone soon and no one will know i was even there) so at least when tomorrow comes and a rather bright man comes into work i can get him to help me out and teach me a thing or two about iis hosting of wcf services and impersonation.

i actually think that the problem i'm getting will go away as soon as i promote my code to the development servers, as on the win 2003 server as opposed to my xp pro sp2 machine (and dont quote me on this as i'm not a web dude) i can run the virtual directory under an app pool that runs under a user which has the credentials to access the database. it will be interesting to see if this is the case tomorrow.

its times like these that i wished that i had a given a little more time to looking at web development. i'm not interested in developing web sites at all, but i feel that i'm going to need to familiarise myself with iis a little more as i think i'm going to be hosting quite a few wcf services in it in the future.

Tags: , , ,

IIS | WCF | Sql | BizTalk

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About

My name is Chris Browne and I'm currently living it up in London.

I feel very passionatly about software development, I just never seem to get the chance to practice it that much.