0

I have a ASP.NET Web API running properly on my computer (Computer 1). I have deployed it on IIS using Visual Studio's publish method. It also has SQL Server connection which is configured to allow remote connections. When there is a remote connection to Web API on my computer it can answer the remote requests too.

What I need is running this Web API on a different computer (Computer 2) which has hardware connections. Since the other computer (Computer 2) is not strong enough to run Visual Studio on it I can't use Visual Studio's publish method to deploy my Web API on IIS. I've created a website on the other computer (Computer 2) using IIS. Then I tried to manually copying the published files on my computer (Computer 1) to the other computer (Computer 2) but IIS always gives HTTP Error 403.14 - Forbidden.

Is there any way to install or publish the Web API on (Computer 1) to (Computer 2)? If you have any other suggestion to run my Web API on different computer I would be appreciated.

vontarro
  • 339
  • 1
  • 3
  • 14
  • Can you show you website configuration? Does IIS have access to folders with your application? – kamil-mrzyglod Jun 08 '15 at 11:08
  • @Kamo I think so. When I enabled Directory Browsing I can see the files in website folder. Also when I click the .html or .css files I can see the content of those files. Problem is my Web API is not working. – vontarro Jun 08 '15 at 11:10
  • please share full details of error(sent request, full response, screens with both working and not working application). – kamil-mrzyglod Jun 08 '15 at 11:12
  • @Kamo My problem is moving a working Web API on IIS to different computer. When I moved the files of this working Web API to the other computer and add them on IIS, IIS gives HTTP Error 403.14 - Forbidden. – vontarro Jun 08 '15 at 11:20
  • Check this link , this might probably help you . http://stackoverflow.com/questions/11425574/mvc4-http-error-403-14-forbidden – jereesh thomas Jun 08 '15 at 11:24
  • @vontarro - are both servers configured the same(in terms of IIS, ASP.NET e.g.)? – kamil-mrzyglod Jun 08 '15 at 11:44
  • @Kamo Computer 1 is 64 bit and Computer 2 is 32 bit. That's the only difference. I tried to build my Web API choosing platform target as x64. @ jereesh I've already tried it but it doesn't work. – vontarro Jun 08 '15 at 11:48
  • @vontarro - please share full configuration and requests data. – kamil-mrzyglod Jun 08 '15 at 11:51
  • What's the framework version? May look into Owin and Self-Hosting the application within a windows console app or, better yet, a windows service. This keeps it pretty light-weight as well. Oh, and for what it's worth, VS doesn't have to be on the target machine. VS can publish a number of ways, including direct folder access, FTP, web deploy and others. – Brad Christie Jun 08 '15 at 12:34
  • @BradChristie Framework version is 4.5. Now I'm trying self-host. Also I will try other publish methods. Thanks! – vontarro Jun 08 '15 at 13:00
  • I simply use Publish with `File System`, then all of the API files will be output to the Target Location, and I copy these files to any IIS Website physical folder on local or on other Server, the API can work after restart that IIS Website. https://i.imgur.com/XTy2kOD.png – yu yang Jian Oct 31 '17 at 04:37

0 Answers0