ASP.NET Core IIS is missing data

46 views Asked by At

I've got an ASP.NET Core MVC web app that I'm running through IIS. The problem is that when I run it my partial pages/images and css files aren't being loaded correctly to the page.

Example of controller for partial page:

// GET the view list page
[Authorize]
public IActionResult ViewList()
{
     return View(); 
}

// GET the list (partial page)
[Authorize]
public IActionResult ListPartial(string type = "all")
{
    var items= GetItems(type);
    
    var model = new ListModel{ items= items};
    return PartialView("_ItemsList", model);
}

Full list page

<div>
    <br />

    <h1 class="display-4">View Items</h1>
    <div id="partialView">
    </div>
</div>

<br />
@section Scripts{
    <script>
        $('#partialView').load("/Controller/ListPartial")
    </script>
}

What's really got me confused is that the CSS files I have are uploading correctly with design elements but the bootstrap items I have that provide a lot of the design with classes like btn btn-primary isn't showing up. On top of that non of the layout design is working, the background color isn't being displayed and the menu bar has no stylization (just the links). And when the page is shrunk to mobile view the menu is supposed to become a button that releases a drop down menu but that button doesnt work. I'm really at a loss to why some CSS is working and others aren't. BTW none of the images are showing up even though their all available in the images folder

In IIS I have my app running as a nested application

UPDATE: I got the pages to display formatting correctly (I was using internet explorer but its too old to recognize asp.net) When I switched to Microsoft edge it worked well but the images and partial pages still wont show up.

Any thoughts or ideas are much appreciated!

0

There are 0 answers