Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't start ANY ASP.NET projects

I've been trying to fix this for quite some time now, but I simply can't make any ASP.NET projects in Visual Studio Express 2012 for Web. I get this error when I start a new project:

Web application projects are currently configured to use IIS Express. To switch back to using the Visual Studio Development Server, change the development server option under the Projects and Solutions/Web Projects Category of the Options menu. Configured IIS Express failed with the following error:

  • Filename: redirect.config
  • Error: Cannot read Configuration file.

So I went on the internet to try and find others with the same error but I can't find a concrete solution to my problem. I find something similar for older versions, but it doesn't fix my problem. I do have the IIS Manager up under my Services (When you want to Manage Windows). I even made a virtual folder, but to no avail. Still doesn't work.

I want to use IIS

How do I fix this?

like image 635
OmniOwl Avatar asked Nov 02 '22 22:11

OmniOwl


2 Answers

  1. In Solution Explorer, right-click the name of the Web application project for which you want to specify a Web server, and then click Properties
  2. In the Properties window, click the Web tab.
  3. To choose the Visual Studio Development Server, under Servers, click Use Visual Studio Development Server.
  4. To use a specific port number with the Visual Studio Development Server, select Specific port and enter the port number. By default, the Auto-assign Port option is selected, and the port number that has been assigned to your application appears
  5. To choose IIS, under Servers, select Local IIS Web server. This option is not available if IIS is not enabled on your computer. A URL that combines localhost with the name of your Web application will automatically be created for you and appear in the Project URL box (for example, l ocalhost/WebApplication1).
  6. To choose IIS, under Servers, select Local IIS Web server. This option is not available if IIS is not enabled on your computer. A URL that combines localhost with the name of your Web application will automatically be created for you and appear in the Project URL box (for example, loca lhost/WebApplication1).
  7. To choose a custom Web server, select Use Custom Web Server. In the Server URL box, type the URL that Visual Studio should start when it runs the current project.
like image 94
gasroot Avatar answered Nov 13 '22 01:11

gasroot


You may for example open you project file in notepad search for the string <useiisexpress>true</useiisexpress> replace it with the string <UseIIS>True</UseIIS> save and reload the project.

Make a copy of the project file first though.

like image 45
mortb Avatar answered Nov 13 '22 01:11

mortb