Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to deploy ASP.Net MVC 4 application on IIS with bin folder

I have tried these steps but could not make it. When I browse my app it shows dll file.

  1. Log onto the machine that is or will be hosting your application.
  2. Use IIS Manager to create a new website for your application.
  3. Create a new application in that site. I believe this also will automatically create an application pool with the same name for you and use it by default.
  4. Specify the virtual directory for your application. This is going to tell IIS where to look for your mvc application. For this case lets assume it is C:\myApp
  5. On your own machine Build the application however you build it with the correct solution configuration (i.e. Release mode). Lets say the result of your build is located at C:\MyProject\bin.
  6. Copy C:\MyProject\bin from your machine onto your hosting machine at C:\myApp

I am a novice to this technology.

like image 683
Shahbaz Ahmad Avatar asked Jan 02 '14 07:01

Shahbaz Ahmad


1 Answers

you shouldn't just drag the bin folder. it is everything else too like the images, css, jscript files as well as the cshtml files too (your views) to the c:\myapp folder.

or perhaps just do a publish within visual studio. maybe even take a look at this to see if this helps:

How to publish my MVC 3 web application onto IIS7

but generally speaking, I build the solution. I then create the vdir in my IIS. I copy the bin and view folder along with images/css/jscript/shared folders etc... to C:\my deployed site. I then convert to application for that vdir I just created in IIS.

like image 86
Ahmed ilyas Avatar answered Sep 18 '22 02:09

Ahmed ilyas