0
votes

I create ExtJs 5 test app with Sencha Cmd on my Asp.NET MVC application in Scripts/Ext folder:

enter image description here

I have successfully run it with index.html file in Scripts/Ext folder: enter image description here

My scripts folder place in localhost:63059/Scripts:

localhost:63059/Scripts/Ext/app.js
localhost:63059/Scripts/Ext/bootstrap.js
localhost:63059/Scripts/Ext/bootstrap.json
localhost:63059/Scripts/Ext/app/Application.js
etc...

Start page url: localhost:63059/ or localhost:63059/Home/Index/

I add bootstrap.js in my _Layout.cshtml:

<script id="microloader" type="text/javascript" src="~/Scripts/Ext/bootstrap.js"></script>

But when I try to run it in my HomeController IndexAction, I have error: localhost:63059/bootstrap.json Failed to load resource: the server responded with a status of 404 (Not Found)

How I can change default web path to generated ext app with Sencha Cmd?

1
I suggest that you use ApiController instead of MVC and then let your Extjs app talk with Api. Also, after you build your app it can be in any folder/path on your server. There is no need for Index.html to be retuned by Controller!Davor Zubak

1 Answers

0
votes

Try loading bootstrap as below place your scripts in content folder

   <script src="@Url.Content("~/Content/js/libs/bootstrap.js")" type="text/javascript"></script>