2

I'd like to create a web application in IIS containing a site and then have a subdirectory, either a virtual directory or another web application, containing a .NET MVC application and configure the routing as appropriate.

As my MVC application is fairly straightforward, I only need one controller so I'm hoping that URLS such as:

http://mysite.com/mvcapp/

will map to the Home controller of my application. This seems as though it should be simple enough to implement however actually setting this up seems to result in errors such as:

HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.

If anyone has any experience in these sort of issues, your guidance would be much appreciated!

0

3 Answers 3

1

It sounds like you did not set the folder to ba an application running the correct version of asp.net. How you would do that, depends on the version of IIS, whether you have access to IIS Manager, etc...

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the suggestion. I have full access to the server. The issue is really a routing one. The application pool is running the correct version of .NET.
@rwbutler - it's unlikely to be a routing problem. The fact you get a "unable to list contents of directory" means that .NET isn't even being executed.
0

check some details

  • is running the site with the correct app pool configure to the target framework? (v4.0 guess so)

check out the registration of framework on iis, sometimes the registration is needed (again)

  • Type cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\ Type

  • aspnet_regiis.exe -ir

remember run cmd as Administrator

4 Comments

Everything's set up correctly on these fronts, it's mainly the routing that's the issue I think.
but if routing problem, it should operate any url, suppose you're using the default routing map {controler}/{action} should operate the mysite.com/home/index
check out the user who runs the app pool has permissions
And if the 4.0 app pools are enabled.
0

We had this same problem. The application works fine on the development machine. It works fine as the default application on the development server. Move the application to another site on the IIS server and we get 403 errors. We checked permissions - everything was fine.

We added the following to our _BaseLayout.cshtml:

<script>
        var SitePath = '@Url.Content("~")';
</script>

Each call in js and each anchor href have the SitePath prepended.

This makes the code work.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.