5

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.

5
  • How does this not work? What is the result? Commented Jan 2, 2014 at 7:27
  • IIS does NOT create a new app pool for the new application you create. it uses the default app pool unless you specify to use a different app pool. so be sure that you are using the correct .NET app pool for your MVC app. This isn't the issue here from what it seems. you need to create a new vdir, drag the contents of not just the bin folder but the entire website to this vdir, convert to application and all should be well. Commented Jan 2, 2014 at 7:41
  • @paddy: it shows all dll files on the browser. Commented Jan 2, 2014 at 11:28
  • @ilyas: is it necessary to put complete app on iis,is their any way to use on dll Commented Jan 2, 2014 at 11:31
  • @user3151184 - no, I don't believe so. it needs the views to stream down to the client Commented Jan 2, 2014 at 13:58

2 Answers 2

9

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.

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

4 Comments

@ilyas: i have done through same steps but stil fail. it shows dll files
you don't explain what you mean by "it shows dlls". most likely you have directory browsing enabled. Did you install MVC on the server? did you copy the web.config? (it is essential you also copy this). I think the best thing initially is to copy everything to C:\Mywebsite. Also be sure that the folder has permissions to read/write/execute (you should be putting it in the inetpub\wwwroot folder really)
is it necessary to install mvc on server?? i have not installed it on server.and yes i copy web.config. it shows only .dll file means when i click on browse website then it display all the .dll files of bin directory.
yes, its necessary to install MVC on the server. stackoverflow.com/questions/12057540/…
1

You have to use publish action for ASP.Net web application(MVC, Forms and etc.)

1 Comment

@manotaurus: any way to do the same other than using publish action?

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.