0

I have searched a lot and I have tried but couldn't published asp.net mvc 3 application on localhost. I have never tried before. I have currently adminpanel application running on development server of the visual studio. In my machine, following are installed:

  • IIS 7
  • windows 7
  • SQL server 2008
  • MVC 3
  • asp.net 4

In visual studio, I publish application using File System publish method and target path to C:\inetpub\wwwroot\adminpanel. And Following Directory and files were copied.

Directory

  • App_Data
  • bin
  • Content
  • Scripts
  • Views
  • Visual Studio 2010

Files

  • Global.asa
  • Packages.xml
  • Web.xml

I don't know but I think Some directory's are missing like the controllers, Helpers, Models, Sources which I have seen in Visual Studio Solution Explorer. When I browse to http://localhost/adminpanel, it shows all directory and files list in browser.

How to publish the application to IIS and use SQL server of local machine so that I can browse to particular controller like http://localhost/User/UserManager which I can do in the dedicated server of the visual studio.

2 Answers 2

3

I don't know but I think Some directory are missing like controllers, Helpers, Models, Source which I have seen in Visual Studio Solution Explorer.

That's perfectly normal. ASP.NET MVC 3 uses an ASP.NET application type (in contrast to ASP.NET WebSite) meaning that it is precompiled and all the source code is removed when deploying. Only the Views, Static resources such as CSS, Images and Scripts as well as the bin folder containing the compiled assemblies is deployed.

1
  • It's not browsing to localhost/user/usermanger/ shows error resources not found
    – CodeManiac
    Jun 22, 2012 at 10:05
1

Basically, I think your Site has not been defined as a application in the IIS. You can do it from IIS manager.

But, instead, when you publish the the application, select File System but instead of browsing to the mentioned Folder, in Target Location field click the button next to the text box and select Local IIS on the left side. Now you can create a Application Folder and directly publish into it.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.