PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, July 16, 2022

[FIXED] How to deploy ASP.NET MVC app via sftp

 July 16, 2022     asp.net-mvc, c#, sftp, visual-studio, web-deployment     No comments   

Issue

My university allows me to deploy my web app only via sftp. Visual Studio deployment tool does not support sftp. What's the best way to solve that problem?


Solution

You don't need the VS publish tool.

For a ASP.NET MVC site, you need to upload contents of the project folder, except for anything that will have been compiled... Open Visual Studio, compile your project, then upload via FTP.

Upload the bin folder with the compiled dll's, along with any views, scripts (anything that will be served to the client), and config files in the folder structure inside the project directory.

Basically, upload anything that doesn't have a .cs file extension. The exact files will vary based on your project. (You don't need .pdb files, or your .csproj file either)

If a folder contains only .cs files, you don't need it since it'll be compiled in the dll's (like the Controllers folder). If a folder contains anything else (.cshtml, .js, .css, etc) then upload it.

This can all be done via an FTP client like CuteFTP, FileZilla, Cyberduck etc. Just connect to your server and upload to the directory that is set up for your application in IIS.



Answered By - Erresen
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,259,483

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing