0

my project was working very good and suddenly without changing anything i had this wrong :

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory. Detailed Error Information: Module DirectoryListingModule Notification ExecuteRequestHandler Handler StaticFile Error Code 0x00000000 Requested URL http://localhost:53075/ Physical Path C:\Users\Eyad\Documents\Visual Studio 2015\Projects\WebMuhasebe\WebMuhasebe Logon Method Anonymous Logon User Anonymous Request Tracing Directory C:\Users\Eyad\Documents\IISExpress\TraceLogFiles\WEBMUHASEBE

My model is :

namespace WebMuhasebe.Models
{
    using System;
    using System.Collections.Generic;

    public partial class HesapPlani
    {
    public long id { get; set; }
    public string HesapKodu { get; set; }
    public string HesapAdi { get; set; }
    public Nullable<byte> HesapTipKodu { get; set; }
    public Nullable<decimal> Borc { get; set; }
    public Nullable<decimal> Alacak { get; set; }
    public string HsTipAdi { get; set; }
    }
}

my controller is :

public class HesapPlanisController : Controller
{
    private UNIT_MuhasebeEntities db = new UNIT_MuhasebeEntities();

    // GET: HesapPlanis
    public ActionResult Index()
    {
        return View(db.HesapPlani.ToList());
    }

    // GET: HesapPlanis/Details/5

}

and my view is :

@model IEnumerable<WebMuhasebe.Models.HesapPlani>

@{
    ViewBag.Title = "Hesap Planı Kayıtları";
}

<h2>Hesap Planı Kayıtları</h2>


<table class="table">
    <tr>
        <th>
           @Html.DisplayNameFor(model => model.HesapKodu)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.HesapAdi)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.HesapTipKodu)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.Borc)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.Alacak)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.HsTipAdi)
    </th>
    <th></th>
</tr>

@foreach (var item in Model) {
<tr>
    <td>
        @Html.DisplayFor(modelItem => item.HesapKodu)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.HesapAdi)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.HesapTipKodu)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.Borc)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.Alacak)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.HsTipAdi)
    </td>

</tr>
}

</table>

its very simple and it was working but something happened and it stops, any idea?

DarkCygnus
  • 7,420
  • 4
  • 36
  • 59
  • A forbidden with a message about directory listing not allowed means that IIS/IIS Express is attempting to directly serve up that directory, instead of passing the request on to the ASP.NET machinery. This can often be the result of adding a physical directory with the same name as a route in your application. However, since this is at the site root, it means that ASP.NET is not being invoked at all, which then implies you've something on the machine is goofed. Maybe you don't have the right version .NET installed or .NET isn't installed at all, etc. – Chris Pratt Jul 17 '17 at 14:25
  • This is related to site binding & permissions - ensure that ASP.NET is registered on local IIS. Either use `aspnet_regiis.exe -ir` to register ASP.NET instance or `` in web.config, check this similar issue: https://stackoverflow.com/questions/18981118/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-con. – Tetsuya Yamamoto Jul 18 '17 at 01:16

0 Answers0