da4babba6a2b97b09278a67b8b5d004e6ccf2e56
Guides/MVC-Integration.md
| ... | ... | @@ -369,16 +369,44 @@ public static void RegisterRoutes(RouteCollection routes) { |
| 369 | 369 | } |
| 370 | 370 | ``` |
| 371 | 371 | |
| 372 | +Copy RegisterRoutes in MvcApplication class from Global.asax.cs and put it in MvcApplication class of the project’s Global.asax.cs |
|
| 372 | 373 | |
| 374 | +```csharp |
|
| 375 | +public class MvcApplication : System.Web.HttpApplication |
|
| 376 | + { |
|
| 373 | 377 | |
| 378 | + public static void RegisterRoutes(RouteCollection routes) |
|
| 379 | + { |
|
| 380 | + routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); |
|
| 381 | + routes.MapRoute("IzendaResources", "Reporting/Resources/{*resource}", new { controller = "IzendaStaticResources", action = "Index" }); |
|
| 382 | + routes.MapRoute("IzendaJsResources", "{*js}", new { controller = "IzendaStaticResources", action = "Index" }, new { irc = new IzendaResourceConstraint("js") }); |
|
| 383 | + routes.MapRoute("IzendaCssResources", "{*css}", new { controller = "IzendaStaticResources", action = "Index" }, new { irc = new IzendaResourceConstraint("css") }); |
|
| 384 | + routes.MapRoute("IzendaPngResources", "{*png}", new { controller = "IzendaStaticResources", action = "Index" }, new { irc = new IzendaResourceConstraint("png") }); |
|
| 385 | + routes.MapRoute("IzendaGifResources", "{*gif}", new { controller = "IzendaStaticResources", action = "Index" }, new { irc = new IzendaResourceConstraint("gif") }); |
|
| 386 | + routes.MapRoute("IzendaReporting", "{controller}/{action}/{id}", new { controller = "Reporting", id = UrlParameter.Optional }); |
|
| 387 | + routes.MapRoute("StarterKitDefault", "{controller}/{action}/{id}", new { controller = "Reporting", action = "ReportList", id = UrlParameter.Optional }); |
|
| 388 | + routes.MapRoute("HomeDefault", "{*pathInfo}", new { controller = "Home", action = "Index", id = UrlParameter.Optional }); |
|
| 389 | + } |
|
| 374 | 390 | |
| 375 | -Copy RegisterRoutes in MvcApplication class from Global.asax.cs and put it in MvcApplication class of the project’s Global.asax.cs |
|
| 391 | + protected void Application_Start() |
|
| 392 | + { |
|
| 393 | + AreaRegistration.RegisterAllAreas(); |
|
| 376 | 394 | |
| 377 | - |
|
| 395 | + WebApiConfig.Register(GlobalConfiguration.Configuration); |
|
| 396 | + FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); |
|
| 397 | + RouteConfig.RegisterRoutes(RouteTable.Routes); |
|
| 398 | + BundleConfig.RegisterBundles(BundleTable.Bundles); |
|
| 399 | + AuthConfig.RegisterAuth(); |
|
| 400 | + } |
|
| 401 | + } |
|
| 378 | 402 | |
| 379 | -###Step 11. Change the LicenseKey and ConnnectionString in Global.asax of the project |
|
| 403 | +``` |
|
| 380 | 404 | |
| 381 | -Change the LicenseKey and ConnnectionString in Global.asax of the project |
|
| 405 | +###Step 11. Change the LicenseKey and ConnnectionString in Global.asax of project |
|
| 382 | 406 | |
| 383 | - |
|
| 407 | +```csharp |
|
| 384 | 408 | |
| 409 | +AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"; |
|
| 410 | +AdHocSettings.SqlServerConnectionString = @"INSERT_CONNECTION_STRING_HERE"; |
|
| 411 | + |
|
| 412 | +``` |