Deploying on IIS 6http://forums.asp.net/t/1242337.aspx/1?Deploying+on+IIS+6Thu, 03 Apr 2008 14:00:54 -040012423372272791http://forums.asp.net/p/1242337/2272791.aspx/1?Deploying+on+IIS+6Deploying on IIS 6 <p>My co worker and I have a small site that is working fine on the little development server, but we've been unable to get it running on our existing IIS 6 server.</p> <p>The IIS 6 machine has .NET 3.5 on it.&nbsp; We also installed the MVC Preview 2 install on the IIS 6 machine and added a .mvc mapping to IIS.</p> <p>We aren't able to hit any of our routes.&nbsp; The default page comes up fine, so we know that the framework itself is working (ie - it's reading the routes in Global, running the controller code, forwarding to the view), but we can't hit any of our other routes.&nbsp; Are we missing something here?</p> <p>Thanks,</p> <p>Tobin<br> <br> &nbsp;</p> 2008-04-02T21:32:22-04:002273584http://forums.asp.net/p/1242337/2273584.aspx/1?Re+Deploying+on+IIS+6Re: Deploying on IIS 6 <p>What are your routes? (Do they contain an .mvc extension? See the comment in the default global.asax.cs from the project template.)<br> </p> 2008-04-03T07:33:31-04:002273859http://forums.asp.net/p/1242337/2273859.aspx/1?Re+Deploying+on+IIS+6Re: Deploying on IIS 6 <p>In iis6 you have to add an extension that will foward the request to the ASP.net ISAPI dll (.mvc, .aspx) or forward all requests the the ASP.net ISAPI dll using a wildcard application map.</p> <p>You can add a wildcard application map in&nbsp;iis from&nbsp;properties&nbsp;-&nbsp;home directory -&nbsp;configuration&nbsp;</p> 2008-04-03T10:05:44-04:002274114http://forums.asp.net/p/1242337/2274114.aspx/1?Re+Deploying+on+IIS+6Re: Deploying on IIS 6 <p>Here's the thing, my routes don't specify a controller.&nbsp;</p> <p>Here a few of my routes &nbsp;</p> <pre class="prettyprint">routes.Add(new Route(&quot;flight/{flightNumber}&quot;, new MvcRouteHandler()) { Defaults = new RouteValueDictionary(new { controller = &quot;Flights&quot;, action = &quot;GetFlightForToday&quot;, flightNumber = &quot;&quot; }), }); routes.Add(new Route(&quot;flight/{date}/{flightNumber}&quot;, new MvcRouteHandler()) { Defaults = new RouteValueDictionary(new { controller = &quot;Flights&quot;, action = &quot;GetFlight&quot;, date = DateTime.Today.ToString(&quot;MM/dd/yyyy&quot;), flightNumber = &quot;&quot; }), }); routes.Add(new Route(&quot;flights&quot;, new MvcRouteHandler()) { Defaults = new RouteValueDictionary(new { controller = &quot;Flights&quot;, action = &quot;GetAllFlights&quot;}), }); routes.Add(new Route(&quot;flights/active&quot;, new MvcRouteHandler()) { Defaults = new RouteValueDictionary(new { controller = &quot;Flights&quot;, action = &quot;GetActiveFlights&quot; }), });</pre>&nbsp; <p></p> <blockquote><span class="icon-blockquote"></span> <h4>rjcox</h4> <p></p> <p>What are your routes? (Do they contain an .mvc extension? See the comment in the default global.asax.cs from the project template.)<br> </p> </blockquote> &nbsp; 2008-04-03T12:22:00-04:002274166http://forums.asp.net/p/1242337/2274166.aspx/1?Re+Deploying+on+IIS+6Re: Deploying on IIS 6 <p>&nbsp;With IIS6 you need a .mvc extension in each route so IIS6 knows to let ASP.NET process the request.</p> <p>So rather than:</p> <pre>&quot;flight/{flightNumber}&quot;<br>&quot;flight/{date}/{flightNumber}&quot;<br>&quot;flights&quot;<br>&quot;flights/active&quot;</pre> <p>&nbsp;you need:&nbsp;</p> <pre>&quot;flight.<b>mvc</b>/{flightNumber}&quot;<br>&quot;flight.<b>mvc</b>/{date}/{flightNumber}&quot;<br>&quot;flights.<b>mvc</b>&quot;<br>&quot;flights.<b>mvc</b>/active&quot;</pre> <p>Note, you can manage without the .mvc using a wildcvard mapping, but this means handling all non-ASP.NET file types (.css, .html, .js, ...) within ASP.NET (i.e. create handlers) as well.</p> 2008-04-03T12:43:48-04:002274383http://forums.asp.net/p/1242337/2274383.aspx/1?Re+Deploying+on+IIS+6Re: Deploying on IIS 6 <p>That worked Richard, thanks so much.&nbsp;</p> 2008-04-03T14:00:54-04:00