Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made the solution F5-able. You can now host the hello world sample in…

… IIS
  • Loading branch information...
commit c2ab2f4c4008de66783fae617bf835b54046125e 1 parent 7344b8c
@casualjim casualjim authored
View
2  IronRubyMvc.Tests/Controllers/RubyControllerSpec.cs
@@ -83,7 +83,7 @@ public void should_have_the_correct_controller_name()
[Concern(typeof (RubyController))]
public class when_being_asked_for_the_params : when_a_controller_is_initialized
{
- private IDictionary<object, object> _params;
+ private IDictionary<SymbolId, object> _params;
protected override void EstablishContext()
{
View
45 IronRubyMvc/Controllers/ParamsBinder.cs
@@ -26,56 +26,11 @@ public object BindModel(ControllerContext controllerContext, ModelBindingContext
bindingContext.ModelState.SetModelValue(pair.Key, pair.Value);
_params.Add(pair.Key.ToSymbolId(), pair.Value.AttemptedValue);
});
-// var request = controllerContext.HttpContext.Request;
-// var modelState = controllerContext.Controller.ViewData.ModelState;
-//
-// PopulateParamsWithFormData(request, modelState);
-// PopulateParamsWithQueryStringData(request, modelState);
-// PopulateParamsWithRouteData(controllerContext.RouteData.Values);
return _params;
}
#endregion
-// private void PopulateParamsWithFormData(HttpRequestBase request, IDictionary<string, ModelState> modelState)
-// {
-// foreach (string key in request.Form.Keys)
-// {
-// var symbolKey = SymbolTable.StringToId(key);
-// _params[symbolKey] = request.Form[key];
-// modelState.Add(key, CreateModelState(request.Form[key]));
-// }
-// }
-//
-// private void PopulateParamsWithQueryStringData(HttpRequestBase request, IDictionary<string, ModelState> modelState)
-// {
-// foreach (string key in request.QueryString.Keys)
-// {
-// var symbolKey = SymbolTable.StringToId(key);
-// var value = request.QueryString[key];
-// _params[symbolKey] = value;
-// modelState.Add(key, CreateModelState(value));
-// }
-// }
-//
-// private void PopulateParamsWithRouteData(IEnumerable<KeyValuePair<string, object>> routeValueDictionary)
-// {
-// foreach (var item in routeValueDictionary)
-// {
-// var key = SymbolTable.StringToId(item.Key);
-// _params[key] = item.Value;
-// }
-// }
-//
-// private static ModelState CreateModelState(string value)
-// {
-// return new ModelState {Value = CreateValueProviderResult(value)};
-// }
-//
-// private static ValueProviderResult CreateValueProviderResult(string value)
-// {
-// return new ValueProviderResult(value, value, CultureInfo.CurrentCulture);
-// }
}
}
View
1  IronRubyMvc/Controllers/RubyController.cs
@@ -67,7 +67,6 @@ internal void InternalInitialize(ControllerConfiguration config)
ControllerName = config.RubyClass.Name.Replace("Controller", string.Empty);
RubyType = config.RubyClass;
Binders = RubyModelBinders.Binders;
-// ValueProvider = new RubyValueProviderDictionary(ControllerContext);
}
protected override void Execute(RequestContext requestContext)
View
43 IronRubyMvcWeb/Web.config
@@ -104,25 +104,26 @@
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
- <system.webServer>
- <validation validateIntegratedModeConfiguration="false"/>
- <modules runAllManagedModulesForAllRequests="true">
- <remove name="ScriptModule"/>
- <remove name="UrlRoutingModule"/>
- <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
- <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
- </modules>
- <handlers>
- <remove name="WebServiceHandlerFactory-Integrated"/>
- <remove name="ScriptHandlerFactory"/>
- <remove name="ScriptHandlerFactoryAppServices"/>
- <remove name="ScriptResource"/>
- <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
- <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
- <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
- <add name="MvcScriptMap" preCondition="classicMode,bitness32" verb="*" path="*.mvc" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll"/>
- <add name="MvcScriptMap64" preCondition="classicMode,bitness64" verb="*" path="*.mvc" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll"/>
- <add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.Routing.UrlRoutingHandler, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
- </handlers>
- </system.webServer>
+ <system.webServer>
+ <validation validateIntegratedModeConfiguration="false"/>
+ <modules runAllManagedModulesForAllRequests="true">
+ <remove name="ScriptModule"/>
+ <remove name="UrlRoutingModule"/>
+ <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ </modules>
+ <handlers>
+ <remove name="WebServiceHandlerFactory-Integrated"/>
+ <remove name="ScriptHandlerFactory"/>
+ <remove name="ScriptHandlerFactoryAppServices"/>
+ <remove name="ScriptResource"/>
+ <remove name="MvcHttpHandler"/>
+ <remove name="UrlRoutingHandler"/>
+ <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
+ </handlers>
+ </system.webServer>
</configuration>
Please sign in to comment.
Something went wrong with that request. Please try again.