0

I have installed Microsoft.AspNet.FriendlyUrls and it has installed successfully. I have also added Global.asax and added following two methods in this file:

protected void Application_Start(object sender, EventArgs e)
{
    RouteConfig.RegisterRoutes(RouteTable.Routes);
}

public static void RegisterRoutes(RouteCollection routes)
{
    routes.EnableFriendlyUrls();
}

I have Default page in my project which has User Control which is inside folder. Like:

==>UserControlsSite
 ===>ctrl_Login

I have made the URL like Default/site/010001 and getting segments like this at control's page load:

string strLevel = "";
foreach (var segment in Request.GetFriendlyUrlSegments())
{     
     strLevel = segment.ToString();                      
}

This URL is working fine Default/site/010001

But When I try to load Default.aspx it gives HTTP Error 403.14 and URL becomes Default/

I have tried this in web.Config but of no use :

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>

I have also cross check this:

In "Turn Windows Features on or off", under Internet Information Services -> World Wide Web Services -> Application Development Features, .NET Extensibility 3.5, .NET Extesibility 4.5, ASP.NET 3.5, ASP.NET 4.5, ISAPI Extensions, and ISAPI Filters are SELECTED.

I have also tried this with no use:

cd \
cd Windows\Microsoft .NET\Framework\v4.xxx.xxx
aspnet_regiis -i
Afnan Ahmad
  • 2,492
  • 4
  • 24
  • 44
  • have you tried these http://stackoverflow.com/questions/14025455/mvc-4-website-with-net-4-5-on-iis-8-in-windows-8-gives-403-14-forbidden-error and http://stackoverflow.com/questions/4566128/403-14-error-with-iis7-and-mvc-2-already-tried-everything-else-suggested-to-fix – Fuzzybear Dec 06 '16 at 09:27
  • If you open IIS manager, go to IIS Authentication of the website, then Anonymous Authentication and edit. Set it to Application Pool identity - that sometime is the cause of 403s. – Steve Dec 06 '16 at 10:13

0 Answers0