WebStorm debug using localhost after adding deployment config? - webstorm

By default in WebStorm if you hit "Run" or use the browser hover selection, it will launch the html file using http://localhost:????. I have added a test webserver http://test.mydomain.com to the deployment configs.
How can I now debug locally again?

Would you like to have your pages hosted on http://localhost:63342 by default despite having http://test.mydomain.com set up as a deployment server?
When you are using Open in browser action, or preview a file in browser using browsers bar in editor, or create a new Run/Debug configuration from .html file right-click menu, WebStorm uses URL from current Deployment entry (which is marked as Default) to build full URL. If you have no deployment entries defined, then built-in web server (http://localhost:63342) is used.
There is a feature request to optionally use built-in webserver for previewing files in browser regardless of deployment settings, WEB-18958.
For now, I can suggest the following workarounds:
Make your deployment entry non-default (right-click, Stop using as default)
Note that it will break auto-deployment (if you have it set up)
or, use Run configuration with the built-in server URL for running your application. But, as run configurations created from right-click menu always have the default server URL pre-configured, you need to edit created configurations in Run | Edit configurations... dialog, making sure that the built-in sderver URL is specified there instead of your deployment server URL.

Related

How to set WebStorm to run js file with Node.js in right click popup menu

After using Mongo Explorer in WebStorm, the item "Run app.js" on right-click popup menu always run with Mongo.
Is there any way to set it back to use Node.js as executor?
Seems Mongo plugin registers itself as a default runner for .js files. Please follow https://github.com/dboissier/mongo4idea/issues/193 for updates.
For now, I can suggest to either disable this plugin or create Node.js configuration manually via Run/Edit configurations...

404 On existing .svc file

I have an IIS site on a Windows 2012 R2 server. The site has an Application inside it:
The URL for this site is setup on our Active Directive servers as it is only accessible internally from our company. The URL follows the following structure:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local
The service for this site is placed in an internal folder:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/Service.svc
I have placed a number of test files both at the root level and in the internal folder:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/HelloWorld.html
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/HelloWorld.html
I can browse these files without any problems. However, I cannot browse the service at http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/Service.svc
The browser returns
However the file is there, and I have made sure there are no typos in the URL I put in the browser.
I have looked at similar questions but there seems not to be anything like the problem I am experiencing. The only question that looked promising was:
WCF service file not visible
But the answer for that post does not apply to my issue as I already have the configuration mentioned in that post setup as it is suggested.
I have checked the IIS-level config files for any exclusion regarding .svc files or anything similar, but could not find anyhting.
Have you got any suggestions on where to look at to solve this issue?
Solution: Install HTTP Activation feature
After running some more testing on other sites on the same server, I actually realised that the issue was specific to .svc files. I therefore made another search on Google and found that the server was missing the "HTTP Activation" feature (part of the WCF Services).
So, if you are having the same issue on .svc files follow the following steps to make sure you have the right components installed on the server:
Open Server Manager
In Server Manager, click the Manage menu, and then click Add Roles
and Features
In the Add Roles and Features wizard, click Next. Select the
installation type and click Next. Select the destination server and
click Next.
Skip the Server Roles page.
On the Select features page, expand ".Net Framework 4.5 Features",
expand "WCF Services" and select "HTTP Activation". Click Next.
On the Confirm installation selections page, click Install.
On the Results page, click Close.
The same can be achieved by running the following Powershell command:
Install-WindowsFeature -Name NET-WCF-HTTP-Activation45
This did the trick for me. I hope it can be of help to someone.

WebStorm "Run 'index.html'" not working on remote project

I use Run 'index.html' a lot in WebStorm. It allows me to run my application on a mini webserver locally on my computer.
However, I have a project that has a connection to a FTP host (my eventual destination for my web files).
When I have this connection in my project settings and I Run 'index.html' the browser opens at : wwww.example.com/index.html, instead of http://localhost:1234/index.html.
How do I tell WebStorm to run locally? Do I have to delete all my FTP connection settings every time I want to test something locally?
Just as #LazyOne mentioned, when your have a default webserver configured in Deployment preferences, it is used for previewing instead of the built-in server; the best solution is using Run configuration with the built-in server URL for running your application. But, as run configurations created from right-click menu always have the default server URL pre-configured, you need to edit created configurations in Run/Edit configurations dialog.
BTW, there is a feature request to optionally use built-in webserver for previewing files in browser regardless of deployment settings, WEB-18958. Please vote for it to be notified on any progress

Accessing web service from another system using ipaddress

I have a website working. I run it and i see localhost/pagename.aspx up and running. I replace it with my ip address and the port number like this .. ://10.xxx.xxx.xx:12234/pagename.aspx and it does not work. If I use 127.0.0.1,it works.The thing is this web site has an asmx web service. I need access to it. I disabled my firewall.I also added inbound and outbound rule for the port 12234. I allowed on both times. But still cannot see. What am I doing wrong?Is there any other way I can get access? (Some research told me to go to IIS and do some setting changes there. It was not that clear). More questions coming. Thanks.
I want you to follow this tutorial.
I will give you a few steps too.
Go to the iis manager and create a new application pool with the .net framework set to v4.0. Also note that the framework of the application/service that you are going to use is also the same framework.
Publish your web application/ service into a folder in you file system with publishing profile as "File System".
Copy the folder (that you just published) into C:\inetpub\wwwroot (which is the default folder).
Open iis manager and refresh the default site and the new folder that you just copied into the C:\inetpub\wwwroot folder will appear.
Right click that folder and click convert to application.
Right Click again and click -> manage application -> Advanced setting. Find and change the application pool from Default to the new pool that you just created.
Enable directory browsing which is on the middle pane.
On the left pane, click "rowse *:80 (http)"
the browser will open and you can see the application/service running.
http://localhost/something/ will be your default value on the address bar.
changing it to 192.168.1.85/something will also give you the same result. The same can be accessed from any computer in the same network with the ip address your system
192.168.1.85 was my system's ip address. run command prompt and type in ipconfig and you can find your ip address.

RDS falls over after server creation in CFBuilder

I am using CFBuilder 2.0.0 and I can connect to RDS fine so my CF instance is definitely set up correctly. However, as soon as I create a server using the following technique:-
Right click on project name > ColdFusionServer Settings
In servers drop down select 'Add Server...'
In new dialogue choose 'Import configurations from RDS server' selecting me RDS configuration
I leave all the settings the same on the first page apart from selecting Is Local and changing the Host Name as my CFadmin and my website are on different hosts
In local server settings I choose the JRun4 install folder for Server Home and the the root of the project in Eclipse as the Document Root
I do not install the extensions
Click finish
Now when I try and expand the RDS connection I get an alert box saying:-
Could not initialize class com.adobe.rds.core.services.messages
I am totally stuck here and would appreciate any help.
It turns out that you cannot configure CFBuilder to work if your CF Admin and your application do not reside on the same host name. Quite why this is is anyone's guess.
To resolve this I needed to make the server I configured on my project use the same host as my CF Administrator. This is obviously very counter intuitive, and means that if CFbuilder launches the browser for you for debugging it will get the wrong domain name. However, if you start the debugging session and then manually browse to the page in the browser then the debugging does work.