Error deploying REST API via IIS  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Error deploying REST API via IIS

Postby DannyC » Fri Sep 27, 2019 5:53 pm

I am trying to deploy the REST API via the instructions for IIS according to
https://docs.jiwa.com.au/display/J7UG/REST+API

The reason for using IIS is we want to deploy a signed certificate to use HTTPS.

I am at the step where I run
Code: Select all
JiwaAPI.deploy.cmd /T
from the folder C:\Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaAPI.
But it is returning an error
Code: Select all
\Jiwa was unexpected at this time


I have no idea what that means or how to fix it.
Or if there is an easier way to use the REST API with a signed certificate over HTTPS, let me know!

cheers
Danny
User avatar
DannyC
Senpai
Senpai
 
Posts: 635
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 29

Re: Error deploying REST API via IIS

Postby DannyC » Tue Oct 01, 2019 7:23 pm

Client was hoping for a quick answer. Any tips?
User avatar
DannyC
Senpai
Senpai
 
Posts: 635
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 29

Re: Error deploying REST API via IIS

Postby Scott.Pearce » Wed Oct 02, 2019 9:51 am

Copy the JiwaAPI folder from c:\Program Files (x86)\Jiwa Financials\Jiwa 7\ to somewhere where there are no spaces in the path (i.e. c:\). Then run the JiwaAPI.deploy.cmd from there instead.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Error deploying REST API via IIS  Topic is solved

Postby SBarnes » Fri Oct 11, 2019 3:20 pm

In the end we did it manually by taking the files from the zip file and copying them to a directory.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Error deploying REST API via IIS

Postby Mike.Sheen » Fri Oct 11, 2019 3:39 pm

DannyC wrote:I
The reason for using IIS is we want to deploy a signed certificate to use HTTPS.


If that's the only reason for using IIS over self-hosted then you're doing it wrong!

You just need to install the certificate into the store on the machine running the self-hosted service and then change the config to use the urlbase of https://*:443/ - that's exactly what I did when I setup https://api.jiwa.com.au - it's using the self hosted service and an SSL certificate from Comodo.

Where you would want to use IIS is if you want to have multiple virtual sites - so you want port 443 to be forwarded from the WAN to the machine and you can then have multiple sites using the default SSL port 443 - IIS will look at the request header and route the requests to the correct virtual site.

If you despise IIS and still want multiple sites, you can put an NginX, Apache or whatever proxy you fancy in and have that forward requests to other ports or machines as well.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Error deploying REST API via IIS

Postby SBarnes » Fri Oct 11, 2019 3:47 pm

My friend don't even go there :roll: they are using 443 for their vpn this was the easiest outcome
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Error deploying REST API via IIS

Postby DannyC » Fri Oct 11, 2019 4:47 pm

As Stuart says, the client had already used 443.
So we used a random port, happened to be 3999.

IIS seemed to be simplest at the time. Anyway we got it working, but good to know the solution for use over port 443.
User avatar
DannyC
Senpai
Senpai
 
Posts: 635
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 29

Re: Error deploying REST API via IIS

Postby Mike.Sheen » Fri Oct 11, 2019 5:00 pm

DannyC wrote:As Stuart says, the client had already used 443.
So we used a random port, happened to be 3999.

IIS seemed to be simplest at the time. Anyway we got it working, but good to know the solution for use over port 443.


Ok, so you should be able to still run it as self hosted on 3999, and create a virtual site in IIS which is a reverse proxy to the service running on port 3999.

Googling IIS Reverse Proxy has some good guides and resources - eg: https://blogs.msdn.microsoft.com/friis/ ... orld-apps/
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Error deploying REST API via IIS

Postby Mike.Sheen » Tue Feb 25, 2020 12:46 pm

I've just worked this out and documented it - see this article - Running the Jiwa Self Hosted REST API on same port as existing IIS webserver using a Reverse Proxy.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron