0

I was wondering how to host a Visual Studio project's webpage on another server.

Is there a way to export projects? I'm used to Unix, where you can create .so or other types of object files that can be moved/imported easily, but I don't know how this works on Windows.

I'm trying to move the project from my laptop to my friend's IIS server. In a trivial test case, I hosted a HTML file simply by creating a folder that contained it in my wwwroot, yet this doesn't work for the Visual Studio project (because I'm forgetting to do something). How do I set this up?

touch my body
  • 1,634
  • 22
  • 36
  • 3
    Rightclick the project -> Publish -> Publish to file system. – Jeff Aug 04 '15 at 20:05
  • Well, there's a little more to it than that because IIS has to be configured so that the subdirectory where the project is published is an application, otherwise nothing will happen. Not only that, but there are other options, such as publishing as a package or via FTP. – Duston Aug 04 '15 at 20:10
  • I think your question is too broad. What steps have you performed? What files did you copy? Is the site set up in IIS? Did you configure the site as an application? Did you install the .NET framework? Is it a web *site* or a web *application project*? Etc. You need to add more details on what exactly has been done so that the question is answerable without having to cover a myriad number of scenarios. – mason Aug 04 '15 at 20:24
  • 1
    [ASP.Net 5](http://www.asp.net/vnext), which is due out in November 2015, majorly overhauls this process and will also allow you to host your application in other machines, even non-Windows machines, like Linux or Mac. This is all thanks to [DNX](http://docs.asp.net/en/latest/dnx/overview.html). I'm so excited for ASP.Net 5! – Icemanind Aug 04 '15 at 20:33
  • Look at last sentence in my answare. You don't have configurated ISS correctly. You need install more services, that have correlation with ISS. – zchpit Aug 04 '15 at 20:40
  • Icemanind -> you can install and host asp.net web sites on linux by owin. There are even acp.mvc concurency, like nancyfx or servicestack that make this process easy, but... it still more complicated than host sites on ISS. – zchpit Aug 04 '15 at 20:41
  • Upon actually trying to use kestrel and VS Code and the like, I'm definitely less enthused about the whole thing than I was upon hearing the original announcement – LSU.Net Aug 04 '15 at 20:44

1 Answers1

2

First, you need to have installed and configurated "IIS Server", a service, that is part of "Windows server". Normally, on Windows Home or even Premium you don't have IIS.

When you install Visual Studio, it install "IIS Server Express Edition" on your computer for write pages, but it will not host you pages for all day (you can't use windows "home" as "server". To host you pages, you need to buy "Windows Server xyz, where xyz is year, ex: windows server 2012").

When you have installed IIS on server, then:

  • copy files (from bin, or by publish to file system) to catalog on server
  • go to IIS server, and create "app pool"
  • in IIS server, create web site, set "app pool" and directory
  • make sure, your catalog on server (first bulleted) have priviles to "IIS_user" or just make your catalog in C:\inetpub\yourWebsite\ ( Should I put my ASP.NET websites in the wwwroot folder? )
  • in ISS you can set "bindings" or something else ex: log user for you website depending on Active Directory logon (when they log to their account in active directory, they will by automated log to your web site).

" In a trivial test case, I hosted a HTML file simply by creating a folder that contained it in my wwwroot, yet this doesn't work for the Visual Studio project (because I'm forgetting to do something). How do I set this up?"

I have this once. You need install more services that have correlation with ISS (you don't have good configured ISS).

Community
  • 1
  • 1
zchpit
  • 3,071
  • 4
  • 28
  • 43