Hosting WCF REST Service as a child application in IIS - rest

I am trying to host a WCF RESTful service in IIS as a child application under and existing Site but it will not work. It works fine when I host it as a Site by itself, but the problem is that both Sites share the same port numbers, port 80 (http) and port 443(https). Can anything help with how to get around this?

You must select the default site, do right click and add application or create a virtual folder to point to default folder where your service is in dev...
If you choose the first you need to create a file system of the service, with publish in Visual Studio.
and
.
So with this approach you can use the same port with different route.

Thank you for for taking your time to answer the question. I was able to get the solution myself. It was because I did not configure HTTPS when I hosted the service in IIS. After I configured the HTTPS, everything works great.

Related

Left over application in GKE - how to remove and make webpreview work as before

I deployed an application (let's say app1) in GKE with a service, deployment and certificate setup in an existing cluster with Jenkins and another app (let's say app2).
The other app is deployed in the same way as the new one, with a certificate (and a static IP and DNS entry).
Jenkins is not exposed to an external IP, so I used to use the port forward option in the cloud console and then web preview - this creates an appspot URL which alloww me to login to the web admin.
Something strange happened after I deployed app2.
I tested it with the webpreview button and could reach it.
All was fine and it was accessible at the new URL with HTTPS and all.
But after that, the web preview to Jenkins was not working anymore.
Instead, I would be redirected to app2, always.
I could not figure out why, so I removed everything from app2 and now I have some very strange situation:
in the (Chrome) browser where I did most of the actions, I can still access the (broken) app on both the FQDN in DNS and on the appspot link ( https://8080-dot-1234567-dot-devshell.appspot.com/ even after I reboot, clear cache and logout the google account (and removed the statis IP even) - the port forward actions works and gives the above link (with other numbers)
in another (Chromium) browser on the same laptop running Ubuntu, the portford action works, but when clicking the link in the browser it does not generate another appsot url and fails with a 500 error screen
After reading up a bit, I understand there is some proxy that is used to do the forward, I expect the proxy to be 'hanging' some how and on top of that it seems there are application left overs in the cluster that should really not be there
I have basic support currently, so not eligable for technical support.
I cannot find a manual way to access the appspot proxy and I found no load balancer or any other thing I know of that may cause this.
If I run the portfoward in the cloud shell in the second browser, I can curl to the localhost on the exposed port and get Jenkins, so that part seems to work, but the web preview then does not.
How can I go about troubleshooting this (meaning getting back to the web preview working for Jenkins and getting rid of the application left overs)?
I actually found the cause of this issue with the help of a colleague.
The second application I deployed was Yopass.
It turned out that it uses a serviceworker, that cached (almost) everything in the browser, including most of the application, I suppose to run offline.
Although I tried clearing cache in the network tab in developer options, I still had this behaviour which made me think it was not a cache issue.
After removing all cache in the applications tab for both the FQDN url and the appspot domain, behavior went back to normal.
I was not able to fix it in the other browser yet, but I suppose that is cache too. Thanks for the help, I consider this solved.

REST API with Single Page Application over HTTPS on Firefox only

I am developing a web service using REST API. This REST API is running on port 6443 for HTTPS. Client is going to be a Single page application running on port 443 for HTTPS on same machine. The problem I am facing is:
While I hit the url say: https://mymachine.com/new_ui I get certificate exception for an invalid certificate because I use a self signed one, so mymachine.com:443 gets added to server exception. But still requests doen't go to REST API as they are running on https://mymachine.com:6443/restservice. If I manually add mymachine.com:6443 to server exception on firefox it works but it will not be the case in production for customers.
Some options that I thought are:
1. Give another pop up and ask to add REST server on port 6443 exception too.But this doesn't look proper as why an end user should accept the cerf for same domain twice. Also REST api server port can change.
Can we programmatically add exception for domain and both the ports in one shot? Ofcourse with the consent of the user. 3. Use a reverse proxy. But then its going to have memory footprint on our system. Also it will be time consuming.
Please suggest some options. How do I deal with it. Thank you

Hosting two different servers with one domain

I'm trying to host web pages using Win Server 2016. Currently, I have Jira and my personal web (IIS) servers. Using AWS, I currently have "myec2.com:port1" and "myec2.com/port2" running fine. And I'm planning to buy a domain "myname.com" to be connected to "myec2.long.name.com"
What I hope to do is "myname.com/jira" and "myname.com/mypage" or "jira.myname.com" and "mypage.myname.com" can redirect to Jira server and the IIS server. Is there a way I can achieve this goal?
Thanks in advance.
If you buy a domain like myname.com you will be able to configure any number of sub-domains such as jira.myname.com or mypage.myname.com as you like.
Usually what you would do is point those sub-domains to your server's IP then handle requests to those domains by setting up a web server (like apache or nginx) and configuring a virtual host (apache) or a server block (nginx) for each one of those sub-domains.

Setup Wicket application/JBoss Server to use my domain URL

I just purchased a domain Url from Google Domains and I'd like to have my localhost project (Wicket app. deployed on Jboss server) to use my new domain (example.com). I have looked online for a process on doing this, but seeing as this is a very specific instance, I cannot find the proper documentation. I have made my ip addr. static, added my external IP addr. to the Google Domain website (I think this registers my domain to my ip?), and I've edited the Window's Host file to point 127.0.0.1 to example.com. What am I missing here? Is there a configuration in my wicket project's web.xml or maybe a configuration in my JBoss server? I'm using Wicket 7.0.0 (latest) and JBoss 7.0. Any help would be greatly appreciated! Thanks in advance!
I am not an network expert, but you could check if you are receiving any traffic on your JBOSS server port without application deployed, just to make sure that your firewall or any sort of Antivirus is blocking incoming traffic or not.

Deploy a Meteor project to my own domain?

I want to deploy my Meteor project to my own domain. In the docs it says:
"You can also deploy to your own domain. Just set up the hostname you want to use as a CNAME to origin.meteor.com, then deploy to that name.
$ meteor deploy www.myapp.com
We provide this as a free service so you can try Meteor. It is also helpful for quickly putting up internal betas, demos, and so on."
Is this what I need to do? What does this even mean? I don't know what a CNAME is or how to set up my hostname.
Over a year late but perhaps relevant for anyone else with this question, since the comments and answer given seem to miss the point - which is not about deploying to your own server but rather configuring meteor.com hosting to use a custom domain.
Meteor.com offer a free service that is intended for demos and internal betas - the very early days in the life of a site.
You can use meteor deloy without configuration if you are deploying to a subdomain on meteor.com -
meteor deploy myGreatHope.meteor.com
However you can also host your app on meteor.com using your own domain but to do that you need to be able to set up an alias which is done through CNAME A records
These are setup on a server that would otherwise host your site - So you will need a host - it could be really cheap one, and it could provide email hosting for you, ask them to create the A records (or look up your control panel help files) so that they resolve to origin.meteor.com and then you have your site, deployed to meteor.com accessible through your domain name.
If you want to deploy Meteor on your own domain, I wrote a tutorial on the subject. If you are running Nginx, it should help you. Otherwise, if you are running Apache, check the second one.
Deploy a Meteor Application on Ubuntu with Nginx.
Deploy a Meteor Application on Ubuntu with Apache.
And of course, you need to understand and configure your DNS. This two tutorials helped me a few months ago.
An Introduction to DNS Terminology, Components, and Concepts
How To Set Up a Host Name with DigitalOcean