I've created a simple RESTFul WCF service that returns JSON formatted data.
This works swimmingly when I'm hosting it in my dev environment.
I use the following uri format:
http://localhost:8732/Service1/GetMetric?RunNumber=49653&MetricName=Res_Side_Coeff&SampleNumber=2
My problems begin when I want to host it on a server. If I publish it, an svc file is created. This is no use as I have to create a wsdl, which is fine for a VS C# project to bind to, but not for me as the consumer of this is going to be an external, non c# tool. Therefore I just want to keep the access to it exactly the same as when in development.
How do you deploy to an IIS server (8.5) to achieve this and what configuration settings do I need?
I decided to try to create a WCF Service application rather than a library, this works fine, though I still dont know why the library doesn't work.
Related
I build a web based mobile app (using react), which I'm hosting as an Azure Web app. This website is connected to a node server, which I'm hosting using a azure virtual machine (I don't know if this is the best approach, maybe I should host this as a webapp instead of VM ?).
I'm still new to this strategie of developing a web based mobile app and connecting it to a hosted backend in the cloud so I apologize if this is a trivial question.
I'm using websockets to connect my frontend to the node server and then I consume messages. I don't have a database it is a simple application.
The steps I'm doing to run the app are:
I connect to the Azure VM from my laptop with ssh
run my server using node server.js
When the server is runing, I can refresh my website and everything works fine
Now, the problem is that I want the node server to run all the time. However, I noticed that the server stops running when I deconnect (ssh) my laptop from the virtual machine. So I find myself doing these steps (connecting to the VM with ssh and running the server manually) each time I want to use the app.
Is there a way to do this so that the node server runs all the time without stoping? Also since I'm new to this, is this the right way to deploy frontend and backend? I assume I can't deploy both frontend and backend in the same Azure webapp or am I wrong?
(Since part of your question is around "Is there a better way?", I would answer that instead of fixing the issue in your current VM hosting :)).
To take full advantage of cloud for your applications, PaaS is always preferred over IaaS. In this case, unless you have any specific reason, you should deploy your backend Node app in another App Service (aka Web App). Or you can consider Azure Function also if your node app has a small set of APIs, but it will require code update. Both support multiple platforms including node.js. Since you mentioned you are leveraging Web App for your react mobile app, so I hope you are already bit familiar with it. Also since Azure Function would require code change, so Web App is preferred this case.
Note: I omitted other solutions like AKS, Service Fabric etc. for now, since currently we are talking about the problem of deploying only a single app, for which those will be overkill at this moment.
Also, to your point
I assume I can't deploy both frontend and backend in the same Azure webapp or am I wrong?
Yes technically you can, depending on your scenario by "bundling" into a single app if both are in same platform (like Node in this case). Though whether one should do that would be an opinionated answer. But even if you keep those separate, you can still leverage single App Service Plan for cost saving. So keeping separate like you have now is what I would suggest to maintain "separation of concern".
I am making my first mobile app using Xamarin.Forms and FreshMVVM as the architecture and I want this app to get info off my SQL database (which is located in azure) by calling an API Rest. I already know how to develop an Api, and all the SQL and Azure related stuff, as well as how to get info from my API.
But what I don't know is how to access this API when the project in which is created is not executed, in other words, I don't know how to make my API Rest accessible all the time, so the App can access to it whenever is needed.
How do you do this?
Thank you all for your time, hope you have a good day.
You need to publish the API to a web host. Azure App Services. AWS. Digital Ocean VM running a web server. Possibly GoDaddy, though I have never used them. Your own server.
I am using application insights on an on-prem server in our corporation. I have set up the key and everything works when I run it on my machine. However, once I put it on the production server, it does not work.
I have run PerfView to see what the issue might be. Of course, it is not making a successful http call to Azure. So I need to figure out how to set up a proxy for the Application Insights part of my application. Every tutorial that I have found only talk about how to do it for .Net Framework and not .Net Core.
Does anyone have some sample code on how to accomplish this?
https://github.com/Microsoft/ApplicationInsights-aspnetcore/wiki/Custom-Configuration#redirect-traffic-to-the-different-endpoint - You can override endpoint to any custom endpoint you have. Ofcourse, the code running in you endpoint should forward data to the original backend.
I dont think Application Insights allows user to specify proxy settings. You can have a proxy configured for your entire server, but not specific to application insights.
Is it possible use have a web-browser control inside a UWP app that connects to a local web server?
I can have the app connect to a live service, but some users need to be able to get access to web pages while working off-line.
Ideally, I'd like to replicate the feature on a local service, but I can't find anything to support this sort of feature. My guess is, it breaks the sandbox rule for UWP apps, but I thought there may be somebody that has been able to make this happen.
I need to create 3 separate and independent versions of my ASP.NET WEB API and host them all at the same port and in the same IIS.
So, let's assume that my current API runs at:
http://xxx.xxx.xxx.xxx/api
I need to replicate it to
xxx.xxx.xxx.xxx/test/api
xxx.xxx.xxx.xxx/dev/api
but it is very important that each one will have it's own configuration on IIS.
The reason for that is that I want each "version" of the API to have a different connection string.
Of course this will have to be done with out any change in my current code, just via IIS setup.
You can create applications under an IIS site to accomplish this. You can even use WebDeploy to deploy them all. Follow this blog post -
http://dotnetcatch.com/2016/03/03/simple-service-versioning-with-webdeploy/