Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
This question has been asked multiple times here and still i can't get my head around a few things about this since i'm a bigger beginner then most people here with programming in general. So this is my scenario to make you understand where i'm at, i apologize for the amount of text. I have created a .NET web api and uploaded it to a normal web app in Azure. I can now use this web api successfully over the internet.
Now i read about the cost/gb of the bandwith in Azure and realized that if this web api is scaled and used alot this could end up being extremely expensive(more than i can afford). I read around some more and saw sites like Arvixe and more offering unlimited bandwith in shared hosts, however after digging some more i found out that as soon people start getting high bandwith theese sites ban you for exploiting the service. I read some more and see people saying you can use VPS and dedicated servers as a good choice. I look into this and see that you need some experience setting up theese which i dont have and that the cost of renting a computer with good cpu and ram costs alot aswell, all i'm really looking for is to host the site, no configurations is needed.
Now i've gotten to where i read about self hosting web api. I figured i could use my own computer which has alot better CPU and Ram than thoose i can afford as VPS etc. i see LOTS of examples. But i dont really understand how they can be used practically over the internet just with localhost.
Questions:
Would there be a good choice to host this web api myself and can i do it safely without to much knowledge?
Alot of people refer to iis which i have never used but seen alot of examples using localhost. Since i already own a url can i use this instead from iss to run this from my own computer? and would it be considered safe?
I also see alot of people using Owin self host which does not need iis. Would this be the better alternative? like this for example http://www.asp.net/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api
Conclusion:
What it all comes down to is that i'm looking for a way for a beginner to host a web api over the internet without having to worry about bandwith and cpu usage getting to high for me as a private person to afford.
Any input or help about where i can begin with this very appreciated, Thanks!
So firstly, I think you're confused by the term "self-host", this usually refers to a way of hosting an ASP.NET WebAPI application in a process other than IIS. This does not refer (as I think you understand it to) to where to host the API from an internet access perspective.
Would there be a good choice to host this web api myself and can i do it safely without to much knowledge?
No. Don't do this, at best it will be difficult to configure and perform badly. At worst it can actually expose your computer(s) # home to some significant vulnerabilities.
Alot of people refer to iis which i have never used but seen alot of examples using localhost. Since i already own a url can i use this instead from iss to run this from my own computer? and would it be considered safe?
IIS is Microsoft's web server and generally this is the host software that you would install to run an ASP.NET application (of any kind). You can install this on Windows 7/8/10, but again I strongly recommend against this.
I also see alot of people using Owin self host which does not need iis. Would this be the better alternative? like this for example http://www.asp.net/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api
This goes to my first comment, you misunderstand what this means.
I wish I had some recommendations as to where you could host this at a very low cost, but I don't. One thing I know you can do with Azure is to set up spending limits; you could use Azure to host the API but set a spending limit of say $100 and then when that limit is reached your API just becomes unavailable. You haven't really specified what you want to use the API for, so I don't know if that would work for you or not, but it's a good way to at least test it out so you can get an idea what it's going to cost you more long term.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Suppose I have an API endpoint such as Facebook Graph API, which I design an application running on my PC to periodically connect to the API and retrieve my posts, comments, etc. On each Timer_Tick, the program reconnects to the API and brings the top 10 data items from the API, and persists these data into databases.
Now, suppose that this application is built by 3rd party, and I just downloaded from the internet as binary file not opensource.
How can I know if the application is leaking my Facebook data to third party without my knowledge?
Is there a mechanism to monitor such leaking if found? (from programmatic perspective)
This is a matter of security and for being sure you almost must think about any vulnerability here and try to make sure there is no way to reveal data by the known vulnerabilities but you cannot be sure about unknown ones.
If this is the matter of the trust and you are dealing with sensitive data i strongly recommend you to avoid using 3rd party tools unless they are provided or certified by the API provider. here are some techniques witch will help you understand about what is going on in the backyard but they will definitely not guaranty the safety :
1- First of all make sure the application is really a binary code (i know you mentioned it as a binary), it's because some executable files are just scripts or semi-scripts but look a like a binary files. for instance in the some cases if the source of the executable application is written with C#, Python, Java, there are tools out there that will help you DeComplie the application and find out what's going inside. this solution of course can be considerably tough if for example the code is obfuscated or there is complex models or OO programming models involved.
2- Use network monitoring tools like WireShark or any other tool to capture all traffic of HTTP/HTTPS requests while using the 3rd party application. because the API is just the same as HTTP requests used by applications to exchange data you can use these tools to monitor what's going on in your computer. normally this application must only connect to the Facebook servers and URLs needed to use the web API, if there is any other request sent or received from a server other than the Facebook there is chance of data leak here. if these requests are not encrypted by SSL/TLS you would be able to see the data being exchanged or if they are encrypted through SSL/TLS there are tools that provide man in the middle attack solution to see these traffics but if they are encrypted in the application layer you won't be able to see what data are being transmitted so it might involve suspicion about data even higher chance of data leak. don't forget that this monitoring must be extended for the entire using cycle of the application.
Also limiting the application to talk only to the server in witch you are calling the API with OS Firewall will be step forward to decrease the chance of data leak here.
A friend likes to limit his applications to a use a certain bandwidth-limit. Seen as he doesn't have the widest connection and - for example - not every application that downloads/uploads has the ability to throttle/limit their downloads/uploads (Like Steam or a torrent downloader.). So he was wondering if I could maybe put something together since I fiddle around with WinForms often. I recommended NetLimiter and NetBalancer, but I was curious as to whether I could make this in C# myself.
I have searched the web and found some decent solutions as to throttling in an application itself but as to throttling applications outside of the current application you have the source code of, I haven't been able to find anything that would help me understand how to program this from scratch.
Do any of you know how I'd go about throttling other applications? Would I have to write my own network interface and have Windows reroute traffic through that?
Thank you for your time.
EDIT: Seen as the first comment tells me I'm at the wrong address with C#, I rephrased my question in the hopes of a better way to get an answer.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
A friend has asked me to look into developing a custom system for his taxi cab company. Currently they have no system in place at all to handle their accounts or the jobs/booking etc. Eventually there will be extras like mobile applications to book but for now i need to get a backbone system developed.
He is talking about building it all as a web app, so all the accounts information/invoices etc are all in one location (most likely on a secure dedicated server) so that the ppl in the office or himself on his tablet if hes out and about can easily see what is what etc.
Part of me for some reason is not 100% convinced this is the best idea, but it does keep it all in the same place it does mean that if for example i write something in .net it doesnt need to be installed on all the machines and he can access it all from home or his tablet.
Can anyone think or link to a study paper or something, which might suggest which way is the better way to go with this? if its a web app it will most likely be done in php/html5 (i have been learning Django but dont think my skills are all there yet) if not a web app it will most likely be Java or C# (i am in the process of learning c++ but again skills arent all there.)
tldr: C#/Java system or php/html5 web app for a taxi accounts/booking system.
If this is the wrong place to post this sort of question, deepest apologies and close accordingly
I'm a desktop dev and in this case it's probably better done in the web.
If we use C#:
we have a server and a conbecting program. c# doesnt work everywhere (though java does) but just for something relatively small like this it's past overkill. but you can have offline data (if its needed though)
web:
easy to access (just need a browser) and light
THIRD OPTION:
C# can be used to develop web applications. as sich you can make it in C# and have it be accessible through a browser. (I would choose this, but I'm a desktop dev so I guess it's normal).
I'll leave you with this, mainly post to show you theres another way.
I'm not a desktop application developer, but I will chip in my opinion. The web has come a long way and it's very easy to make web user interfaces now. The biggest benefit you will probably gain from a web application is it is operating system dependent; anyone with a web browser will be able to use it.
My opinion,
I would have set up a server in Java/C# etc with a restservice or something similar, that way you can easily combine both web and desktop applications. Get the best of both worlds :)
I am a fairly experienced (mid-level) developer that has spent quite a bit of time working on the backend of many web-based projects. Rarely getting into the ui/display aspects. However, I am now a lead on a project that is in the process of taking an api to a service architecture using an asp.net mvc rest architecture. I have not problem doing this and have written many of these services already. however, I find myself wondering about the parts "hidden" by IIS/WAS and MVC.
What I am hoping to find is a good tutorial that explains what happens from the point a web page (or webservice) is requested to the point it is received by the web page or application takes over. I want to know how IIS (or any other webserver) knows what to do with a request. (One thought was a tutorial for developing your own webserver.)
I realize this is probably a large subject that I don't necessarily need to know all of to be an "expert" web developer. However, it certainly can't hurt and I also am experienced enough to separate the wheat from the chaff.
Thanks in advance!
I would recommend you to download and install Fiddler. Then run it and look at all the traffic that's being exchanged over the wire. It will allow you to see the actual HTTP requests and responses and their exact contents. This will allow you to gather deeper understanding at what happens at the lower network levels which is extremely useful to know when developing a web application.
I have already made an HTTP web server using Java only, able to run Java application at server side. I used the HTTP 1.1 specification. But you may find easier to start with a tutorial about HTTP before reading the specification.
If you are developing a RESTful web service and want to learn more about HTTP I strongly suggest reading RESTful Web Services Cookbook: Solutions for Improving Scalability and Simplicity.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to create a small helpdesk ticket control system at work, that would allow users to enter a help request ticket; these tickets would then be assigned to a technician to work on, and the technician would mark it as "FINISHED" after the job is done. The requesting user would then be able to confirm and "CLOSE" the ticket, so that a Help Desk supervisor can keep track of response times and other stats based on the ticket details. Nothing too complicated, using .NET and SQL Server.
I am not sure if I should develop this as a Web application or a Windows application. This application would be used in the plant floor, so it would have to be easily available in the LAN. But we currently host a list of Windows applications via Citrix, so deployment would not really be an issue here. I don't really have experience creating winapps from scratch (though I've modified quite a few), but it feels like a web application would not look as "solid".
What advice can readers provide that could guide me into deciding the better architecture for this purpose?
EDIT
Thank you all for your thoughts! Given that this is a very simple application, I could go either way. I decided to go with a Web application, as our local Citrix setup still has some quirks that need to be fixed.
If you develop a web app you can pop it on your local intranet and your users can use either their browser within Citrix, or via the browser on their terminal.
However, if you've got the infrastructure in place, then perhaps a Windows application would be easier to develop and deploy. The only limitation with a windows application would be that if you were to move away from a Citrix environment, or were to expand to wanting to use the system externally to the plant floor, then it's harder to deploy and maintain your installations.
You can use Web Deployment with Windows applications which is quite nice as it updates itself whenever you publish a new version, however it is a bit of a faf for the users and you've no guarantees that the user will allow the update to occur. So if you had a critical update, the users could, in effect, choose to ignore it.
That's where the web application gets its bonus points. One installation and one point of access. If you update it, then all users are instantly on the latest version.
Personally, I'd go with the web application for future proofing and ease of acccess. It's slightly more work than a windows application, but the payoff usually exceeds the extra time required for the web application.
Before writing this system, I would highly recommend searching www.codeplex.com and making sure that adapting another work isn't a better choice. You may find something that is already written and meets your needs while allowing you to dig around, learn and be ready to modify when they want some new feature not already present. (I believe all projects grow if the users believe in the developer.)
If you are going to write your own and can do it in the time you have, I would highly recommend that you either go with MVC if web based, or WPF (using MVVM) if you want a desktop client. There is a definitive learning curve to either MVC or WPF with MVVM. But I believe the payoff will come. I have found changes much easier when there is a clear line between business logic and visual behavior.
Personally, in this situation I would go for a windows application - as it doesn't sound as though you've any compelling reason to invoke the complexity of web-ness (perhaps it's just me that thinks web => additional complexity). I'm sure you could create a neat little windows app. in half the time it would take to create a clunky web version of the same thing!
As a sidenote:
I really like the way Eclipse Mylyn integrates with XML-RPC. Check this architecture out for inspiration:
http://www.eclipse.org/mylyn/
If you went for a similar strategy you might start off with a simple front end (Maybe as a C# with a native GUI and augment with a web-based integration with your intranet at a later point whichever is the fastest for you to do).
In esscente a 3-tier approach where you have:
The database.
The application layer wich implements an XML communication protocol (XML-RPC is quite simple).
A front end where information fields and workflow steps are 'introspected' rather than hardcoded in the client.
Just a though, hope it helps.
Write a winform app, and distribute it over ClickOnce. It's the best way to go, IMO.
Don't rush to make this decision. In the end, the Web vs Win question is about user accessibility. Much of the processing logic for your business need is independent of the interface. Spend your up front time building the right data model and identifying the necessary processing/services that you need. A well designed DB and service layer will work with both Web and Win apps. This will also give you the best flexibility as your "product" inevitably grows. You may very well want a web interface for managers needing reporting functionality and a WinForms application if you need more advanced user processing abilities for your users. And that is when your initial design work will payoff.