Sharing a local server with 'Code with me' in WebStorm - webstorm

In the JetBrains` page for Code With Me, I can see a paragraph mentioning:
You can use Code With Me for real time collaboration, editing code, sharing a server, and running a debugging session.
However, I cannot see how a server can be shared. For example, if I start API server locally, I cannot find a way to share it through Code With Me.
I am just and only looking for a way of sharing that local server through Code With Me, not any third-party website or so.
I would appreciate any help

If I understand you correctly, you want to share access to your server running locally with a guest.
For this scenario, there is a Code With Me tool-window in the right bottom corner which allows you to forward a port. The tool-window appears when the Code With Me session is active.
Does it fit your needs?

Related

WAMP 3.1.7 x64 my webpage accessible from anywhere in the world

Before I give out my question, I'd like to tell you my reasons of why I need this to work. I am currently making a game and in the future I'll need people to test the game to help me look for bugs. The purpose of this website I am making is to be used as a guide/wiki and for people to report the bugs and later on when the game is near to be open to public, to be the official page with a proper server/domain. With this said, I would like to temporarily have my PC as my webpage server and to be able to allow only the IPs of the game testers to connect my PC.
Can someone help me on this, please? Thank you in advance.
Exposing your ports publicly on the internet is always very tricky because it poses a huge security threat - especially since you just notified the world that you want to do that!
Instead, you should use Ngrok, a secure tool used extensively in the industry build specifically for this. It basically serves, in one line of code, a server running locally in a public url looking like https://<some-code>.ngrok.io. The only think you'll have to worry about would be hostname mismatch, but believe me, that's still a thousand times easier than to securely expose your personal machine to the internet ;)

How exactly does the WiX 'Service Install' work internally?

I have a problem with a web service that is installed and started with a .msi that is created with the WiX toolset.
The service can be installed and started on all the machines I tested so far (shown as running in the Services Manager) but on some machines it is not reachable (for example via a browser) and not shown in the list of listening ports on that machine (displayed with 'netstat -a').
I am trying to figure out what's going wrong but I am not really familiar with web service development and configuration. It's a third party service, thus I don't know how it works internally.
A good starting point for me would be to find out, what exactly happens when a service is installed and started during the execution of the .msi-file.
Maybe I could try to tackle the problem on a lower level then.
Below is my code in the ServiceInstall-Element:
<ServiceInstall
Id="ServiceID"
Type="ownProcess"
Vital="yes"
Name="ServiceName"
DisplayName="ServiceDisplayName"
Description="Lorem Ipsum"
Start="auto"
Account="LocalSystem"
ErrorControl="normal"
Interactive="no"
Arguments="action=run">
</ServiceInstall>
The argument is important - without it, the service won't start or run.
Maybe someone else encounterd the same or a similar problem and can help me out.
Thanks already in advance - each hint is appreciated.
EDIT I (15.04.18):
As it might be a problem with the specific service, I will add some further information here:
It's a third party software called CryptoLicensing:
http://www.ssware.com/cryptolicensing/cryptolicensing_net.htm
Part of this software is that specific program, that serves as a License Server and does the license registration, for example in a customer's network.
The service can be run as a Windows application or installed and run as a Windows service. In both cases it should be listening on a (pre-)specified port on the installed machine.
Whenever I start the .exe as an application, everything works as intended. The service is reachable (for example with the browser) and can be accessed from other machines in the network.
When the .exe is installed and started as a service, it does not work as intended on every machine. For example if I install and start the service on my laptop, it is shown as running in the Services Manager, but is not reachable on its assigned URL (not even on the localhost) nor is the specific port displayed in the active listening ports, for example with 'netstat -a'.
The service itself starts without any error messages and does not log any errors or exceptions as it seems to be running without any problems.
I contacted the vendor, but sometimes he doesn't reply quickly and he is not very specific in his replies.
Before asking the question I assumed that it was a problem with the Windows user rights and the WiX installer but during the discussion here I had the feeling that it might a problem with the service itself.
I hope this 'new' piece of information helps in isolating and location the problem.
Thanks to everyone who helped so far!
Hopefully not stating the obvious here, but WiX doesn't do much except populate the ServiceInstall table in the MSI file, so this is about why Windows Installer won't start the service. ServiceInstall table:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa371637(v=vs.85).aspx
Also, this isn't really about ServiceInstall - it's probably about the ServiceControl element in your WiX source, but it's not clear whether that's how you're starting it or if you're starting it manually later on. That does make a difference. What is the error message and where are you getting it, and is it a 1920 or 1921 error (in the context of ServiceControl).
The main reason a service will start on one system but not another is missing dependencies. If your service is C++ based (the post doesn't say) then there are probably dependencies on C runtimes, UCRT runtimes, MFC or ATL runtimes and so on.
First: are you sure this service is intended to run as LocalSystem? (MSDN, SO).
Second: did you check the event logs in detail for anything obvious? If the service is good you should find a hint at least. Something to start with. I find that I sometimes miss the actual logs in the event viewer because it is so "crowded". My take on it: empty the log and stop and restart the service.
Something locking / blocking: If the service installs and runs OK I would suspect other factors such as firewalls (hardware & software), security software in general (anti-virus, malware scanners), network configuration issues (proxies, WINS, DNS and all the complexities involved in networking). Is the service trying to reach an UNC path?
Diverse Machines: What are the target machines? Are they virtual, are they physical, are they test machines, are they operative SOE machines in corporate networks? Are they the same OS version and edition?
Further Ideas: It is not quite related, but maybe skim this list of suggestions for debugging from another answer (I am not sure why it was down-voted, I think it is an OK list to inspire debugging ideas): Windows Application Startup Error Exception code: 0xe0434352 (maybe just skim the bolded words for ideas - Recommended).
sc.exe: And finally, perhaps check the sc.exe tool (Service Control) and see if it can provide you with some useful information for debugging.
sc.exe in the context of killing hung services (sample use).
sc.exe from MSDN
Some further links:
Windows Services Frequently Asked Questions (FAQ). Content seems to be up to date - at face value at least. These guys claim to be experts on services. I have no idea who they are.
Essential Tools for Windows Services: SC.EXE
Run Service Control (sc.exe) command on secure port
After almost 20 months we finally (and accidentally) found a solution to the problem! For the few machines, on which the service did not run properly, setting the NoInteractiveServices value in the registry to 0 did the trick. A value of 1 (which is default) means that no service is allowed to run interactively, regardless of whether it has the SERVICE_INTERACTIVE_PROCESS property. More information on Interactive Services.
I am not completely satisfied with the solution, because on all the other machines NoInteractiveServices is set to 1 AND the service runs properly anyway. However, on the machines where the service did not run interactively this solution worked for us. Thus I will accept this as an answer.
If anyone has more information on this issue and can explain why this works, feel free to
add them - I would be very interested!

Suddenly scheduled tasks are not running in coldfusion 8

I am using Coldfusion MX8 server and one of the scheduled task was running from 2 years but now suddenly from 01/12/2014 scheduled tasks are not running. When i browsed the file in browser then the file is running successfully without error.
I am not sure is there any updatation or license expiration problem. I am aware that mid of this year Adobe closed the support for coldfusion 8.
The first most common problem of this problem is external to the server. When you say you browsed to the file and it worked in a browser, it is very important to know if that test was performed on the server desktop. Knowing that you can browse to the file from your desktop or laptop is of small value.
The most common source of issues like this is a change in the DNS or network stack that is interfereing with resolution. For example, if the internal DNS serving your DMZ suddenly starts serving the "external" address - suddenly your server can't browse to your domain. Or if the IP served by the server for the domain in question goes from being 127.0.0.1 to some other IP that the server can't acces correctly due to reverse proxy or LB or some other rule. Finally, sometimes the Apache or IIS is altered so that an IP that previously was serviced (127.0.0.1 being the most common example) now does not respond.
If it is something intrinsic to the scheduler service then Frank's advice is pretty good - especially look for "proxy schduler" entries in the log - they can give you good clues. I would also log results of a scheduled task to a file. Then check the file. If it exists then your scheduled tasks ARE running - they are just not succeeding. Good luck!
I've seen the cf scheduling service crash in CF8. The rest of CF is unaffected.
Have you tried restarting the server?
Here are your concerns:
Your File (works since you tested it manually).
Your Scheduled Task (failed).
Your Coldfusion Application (Service) (any changes here)?
Your Server (what about here).
To test your problem create a duplicate task and schedule it. Leave the other one in place (maybe set your new one to run earlier). Use the same file too. See if it completes.
If it doesn't then you have a larger problem. Since the Coldfusion Server sits atop of the JVM there could be something happening there. Things just don't stop working unless something got corrupted or you got compromised. If you hardened your server by rearranging/renaming the file structure to make it more secure...It would break your task.
So going back: if your test schedule works then determine what is different between the two. Note you have logging capabilities. Logging abilities for CF8
If you are not directly incharge of maintaining this server, then I would recommend asking around and see if there was recent maintenance, if so, what was done to the server?

Can't reproduce situation with a tool (jmeter) that I can reproduce manually with two browser windows

I'm working on an online reservation system (the details aren't really relevant to my issue). It's mostly developped in C# with framework 4.0. I have a DB which contains, among other things, the products and the availability of these products. The DB is accessed by a web service, the latter being queried by a web application, which in turn sends the information to be displayed to the browser. Nothing too fancy in term of architecture, but I don't have much experience with that kind of system. This projet is quite old; it's been in development for a few years and I just hopped in six months ago, having no web programming experience before.
I'm currently experiencing concurrency problems. If I open two browsers window (any browser), enter the same query in both windows and post on both pages as fast as humanly possible, I get unhandled exception in my web service. One of the client gets the data, the other receives an error. EDIT : Also, I tested using two different computers simultaneously, and I still could get the unhandled exception.
I was able to trace the problem back to a cache system that was implemented almost a year ago. There's is no locking mecanism, and the cache uses a Dictionary (which is not thread-safe). A few Stack Overflow questions helped me in pinpointing the problem and how I should correct it (this one and that one for example).
That being said, I'm trying to reproduce the problem without having to manually click in two browser windows and hoping to get the right timing to access the same cache simultaneously. The reason I'm trying to do that is that I don't like implementing a solution that should work when I can't reliably prove it actually worked. Also, there's a lot of places where the cache has been (badly) implemented, and I'm not sure I can test all those places by "guessing" the right timing manually.
So, I downloaded Apache JMeter, and using Fiddler2 hooked up to my two browsers, I could find all the HTTP requests I needed to create a Test Plan that sends exactly the same requests.
But to my dismay, JMeter couldn't reproduce the problem, even if I set my Thread Group to create 40 concurrent users! Each one of them receives the data correctly, and none triggers the unhandled exception I am getting by doing it manually. I know it's not a cookie issue, nor a difference in user-agent, as I tested with multiple browsers and with disabled cookies. As the HTTP requests were created directly from Fiddler2, it shouldn't be an issue with hidden fields or URL rewriting, and there's no dynamic field names or content involved. I know Fiddler2 has a "replay" function, but even that couldn't reproduce the problem. This baffles me to no end.
So, my questions are : why can't I reproduce the problem with JMeter? Is there a better tool than JMeter (which is quite complete for a free software) to do that? What are the browsers doing that Jmeter doesn't do (apart from rendering the page, which is really not the issue here)?
Any thought would be much appreciated!
When you say 2 Windows are you sure they use 2 sessions, depending on the browser and the way you open the second window you won't get 2 sessions.
Are you sure you reproduced all the trafic between browser and server ?
If you have more than 1 request then you should Check if it's not 2 parallel Ajax requests from the browser , if so you must know That Without some custom scripting jmeter does not reproduce those 2 parallel request for same session(except for resources download), That might be your issue .
Regards
Philippe M.
http://www.ubik-ingenierie.com

Django web server -- where should I draw the line between production and development?

I know that it's bad to use the Django web server in production. There's been at least one Stackoveflow question on this already.
But I'm wondering about where to draw the line between development and production? If I'm only allowing HTTP access to one (or a few) IP addresses, then I know I'm in development. What if I open it to all IP addresses, but only e-mail a couple friends to see what they think of what I've built?
As far as I can tell, the problems with using the Django server are:
It's single-threaded
Security
I don't think (1) is likely to be an issue if I'm only sharing it with a few people. For (2)--what's the worst-case scenario? Does it make a difference that I'm running on an Amazon EC2 server that I could very easily restart from a backup if something bad happened?
Well, the answer is very simple actually, you've left development when you have something you must protect: real user personal information, real data in your database that you'd be afraid to lose, etc.
Security isn't a concern until these things are present. The rule about not using the dev server in "production" is guidance, not mandatory. You can fire up the dev server in your production environment any time you want. However, you'd be silly to do so and then open up universal access to it, once your site is truly live and in use by the world.
Setting up mod_wsgi (or some other WSGI container) on a development machine takes all of 5 minutes, and can help you sort out deployment issues before you actually reach deployment. So really, why ever use the development server if you don't have to?