0

I'm trying to deploy an ASP.NET application to localhost using IIS, I've been reading a LOT of tutorials and following them step by step but I just can't seem to make it work...

I created an Application Pool(TestPool) with .NET version 4.0 and gave it every permission to the folder where the application is at.

I then added an application to the Default Web Site and tried to run it at

http://localhost/TestApplication/

But I keep getting:

Error Image

Any idea what is wrong and how can I solve this?

Versions:

  • IIS version: 6.2
  • OS: Windows 8.1
  • VS 2013 Ultimate: 12.0
  • VS .NET: 4.6

PS: It's my first attempt at deploying an ASP.NET application so if you need any further information just leave a comment.

EDIT:

It is now running at least thanks to Julian and Marge, but when I run it using VS it has the default view, why isn't it showing when I run it through IIS? When running through IIS it just lists the files:

Files list

1
  • 1
    put a index.html in that directory and see what happens. What is the name of your asp ? -> call localhost/Test/Application/MyGreatProgram.aspx or perhaps enable directory browsing which files are there for you Commented Oct 20, 2015 at 18:13

3 Answers 3

1

This error is because your website, in the IIS Server, does not have the Directory Browsing enabled and the default document (default page of the site ex: Default.aspx) configured.

Go to IIS Server IIS > Default Documents and check if the default page of your site is listed, if no, add the page.

Check the related link: https://support.microsoft.com/en-us/kb/942062

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

Comments

0

Generally speaking, you do not need to access IIS manager at all to run your webpage on localhost. All what you need to do is right click on the project and then choose properties. In the Web tab you will find Servers section. Make sure the Project Url is something like http://localhost/myproj or simply http://localhost/ then hit Create Virtual Directory. Your webpage should be up by then, and you can access it either in debug mode, or simply by navigating your browser to the Project Url you have chosen.

3 Comments

What I want to do is be able to take my project (copy files to a pen) and make it run on a computer with no Visual Studio.
One of the things to make sure of when you get 403 is that your application is somewhere where IIS can access it. Do not place it in the Users folder for instance
For test purposes it's at C:\TestDeploy
0

When you add web application in IIS ex.

enter image description here

That your hostname should be to add in host file which is C:\Windows\System32\drivers\etc"\hosts

ex.

127.0.0.1 test.pln

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.