views:

106

answers:

1

I have a mixed MVC and Web Forms environment that works just fine in VS2008 when I debug. However when I deploy the code to my staging environment I have issues.

Basically I'm using an old school URL Rewrite module for the old Web Forms app, so I have to run the App Pool in Classic Mode for the old URL Rewriter to work. However, when I do that I get 404 errors on my MVC stuff. But if I switch them to Integrated Mode my URL Rewriter doesn't work.

The real rub is that, like I said, both the old URL Rewrite module and the MVC stuff work just fine on the test web server you get when you debug in VS2008.

Is there a way to export to or mock those settings in IIS 7?

Another thing I guess I wouldn't mind would be to set up my Web Application on my local IIS so I can at least develop against the same settings and figure out what's breaking that way. But I'm not sure where I would begin there.

+1  A: 

Steve Sandersons blog has a good description regarding setting IIS for mvc. Your problem might potentially have to do with handler mapping. Basically you need to map ".*" requests to "aspnet_isapi.dll" but see the blog for an in depth description.

EDIT: wrt the blog, I was referring to his option 1. He also has a few other suggestions.

David Archer
I have actually already tried something like that. Wildcard mappings to the Isapi Module. Unfortunately that blog is IIS6 related. I'll try it again with the App Pool set to both Classic and Integrated mode though to see if it makes a difference. I think I only tried Classic mode before.
blesh
Also, this answer, even if it does solve my problem, really doesn't answer the overall question. ... if there even is an answer.
blesh
Sadly, it didn't work anyhow.
blesh
dang. sorry then, and good luck
David Archer
in an attempt at answering your question, I'd say no there isn't a way. I know for example that the binaries used for building using visual studio and command line msbuild are different for machines depending on whether VS is installed or not. A web server "in the wild" should not have VS installed. So, i guess, its quite possible that the local VS server uses specific binaries and you shouldn't therefore try to replicate those settings in iis7? just a thought
David Archer
I'm afraid you're right.
blesh
In the end I ended up just developing locally against IIS which is probably better as it's closer to the server in "the wild".
blesh