I setup live edit in PhpStorm and it works great. While implementing routing in my application, I configured PhpStorm to use a routing script using the Built-in Web Server run configuration. At this point, live edit stopped working because it seems to work only with the built-in webserver and not the PHP built-in web server. (Technically, it didn't stop working, rather there were two run configurations: live edit where the links returned a 404 and a routing configuration that doesn't have live edit.)
Is it possible to use both live edit and a routing script?
Does anyone have any workarounds to using live edit or similar functionality when working on an app that uses routing? I currently have a keymap (Alt-R) setup for Reload in Browser.
I'm using PhpStorm 10.0.2 (PhpStorm-143.790) on CentOS 7.
Note: I found two issues relating to live edit and routing but neither was helpful.
https://youtrack.jetbrains.com/issue/WEB-15762
https://youtrack.jetbrains.com/issue/WI-20824
Thanks
A hint in the 2nd URL above provided a suitable workaround. The key lies in the fact the link between the browser and PhpStorm is not tied to the URL; only the tab. To make this work, you need two run configurations:
A JavaScript Debug configuration for live edit. Make sure live edit is working.
A PHP Built-in Web Server configuration with the router script enabled.
Run the JavaScript Debug configuration and it will open a tab in Chrome linked to PhpStorm. Then start the PHP Built-in Web Server configuration and change the "live edit" tab to the URL for the built-in web server. Any changes will automatically refresh the tab using the PHP Built-in Web Server configuration which contains the router functionality.
This concept can also be applied to any functionality not supported by the built-in web server, like SSL. You just need a 2nd web server (built-in or external) and change the live edit tab to the 2nd URL.
Related
I've tried by changing the IP address and also changed the default browser, but still not working.
Check if you have written a nasty code which blocks some of the function of live server. Just go on element tab in dev tools and scroll down to check the script written after <-- Code Injected by Live Server -->.
See whether you have used the same name for any function in your any js file. If so just change their names. If this does not work then try to reinstall live server extension.
I have a web application hosted on azure apps that I publish using visual studio. It is a flask app. One of the templates is called searchresult.html. I am making changes to this file that are made when I run locally. When I run it on the server though the changes are absent.
Using the azure console I can see that the changes are present in the file that is stored on the server, but the application continues to deliver the old html.
How can I force azure to see my updated file?
Things I have tried:
Deleting the file directly on the server and re-publishing it
Committing changes to git, even though I knew that would do nothing
Testing it locally (it works)
Restarting the application
Since you said you already check the file has been changed on the Kudu, so it supposed not an issue of deployment. You could disable caching in your browser.
such as in chrome browser, navigate to F11 window and select the Disable cache blanket.
or please try to access your website via incognito model.
In addition, I crashed into similar issue with you in other web app. My previous solution is that enable always on option on the portal and restart my app, it worked.
Just for your reference.Hope it helps you.
I have an application that displays my razor views of servicestack endpoints as expected on localhost. However when deployed to azure websites a particular page displays the metadata page for some reason. I don't know how to work out what has gone wrong as it all works on my machine :).
For reference, the view name matches the return DTO. I've tried the site in release mode on my machine. All other pages display as expected on azure and locally. I've cleared the cache and re-started the site from the control panel. I'm running out of things to try.
Any ideas appreciated.
Some general troubleshooting approaches that might help you:
Use Postman, cURL or Fiddler to watch the HTTP traffic between your computer and the website, looking for clues in HTTP headers, requests and responses.
Using FileZilla, connect to your website via FTP. Download the content of /site/wwwroot to a new directory on your local machine. Add this as a virtual website in IIS and run it locally. You'll be running exactly the same code that is deployed.
Instrument your application with tracing in a similar fashion to ASP.NET Tracing and look for exceptions or any other odd behavior.
Refer to Troubleshooting a Web Site for additional resources.
i have an asp.net-mvc website and I am trying to use the asp.net website administration tool but when i click in visual studio 2010 to launch it, it brings up a browser that says:
An error was encountered. Please return to the previous page and try again.
i can't click back but when i click on "How do i use this tool", i get this error:
Tool Has Timed Out
As a security measure, the Web Site Administration Tool times out after a period of inactivity. Changes to machine.config or web.config may also result in the tool needing to be restarted. To continue configuring your web site, restart the tool.
when i run my website, i am able to connect to the database fine and i am also able to insert new users through the default Account/LogOn interface.
Any suggestions on how to debug why i can't launch the admin tool ?
The project's path shouldn't contain #% or spaces
Could you please try the following:
Close your browser completely. Whether you are using IE or Firefox to test your website, you should make sure all browser windows are closed.
Kill the asp.net development server. It is located in your taskbar
Or, if you are hosting your site in IIS, force an iisreset.
Now try to run the Web Site Administration Tool again.
If it still does not work yet, could you please provide which browser you are using, and which OS and host?
The project's path shouldn't contain #% or spaces
My Project path was D:\Programming\C#\Tests\MVCApplication\
and that is what caused the problem.
I was getting the exact same error message with VS2010 .NET 4.0 framework. I created my solution in a subfolder titled "C#". Renaming the subfolder to CSharp fixed my problem.
I hope this helps.
I am trying to enable server side includes in some plain html files. I need help enabling ssi via IIS on the localhost. I am running XP Pro, and using both ie8 and firefox to test the files.
Thanks for your help.
Here is how to do it:
Open IIS admin on your local machine
Expand the local computer tree in the left pane (where it says COMPUTERNAME (local computer)
Under Web Service Extensions node, click Server Side Includes in the right window pane.
Right-click and select Allow.
There you go.
EDIT:
If you want to map a non-default (.shtml/.shtm) extension to SSI, you'll have to add it to your default site. You can do this by:
Right click your website in IIS, select Properties
Click the Home tab
Click the Configuration... button
Under the Mappings tab, click the Add button
The fields should be:
Executable: - C:\WINDOWS\system32\inetsrv\ssinc.dll
Extension: .whatever
Verbs: Limit to GET,POST
Script engine: checked
Verify the file exists: checked
You'll have to try it out with .html files.. I'm not sure the consequences of mapping standard HTML files to work with SSI. I would think you're going to negatively impact performance as now IIS will treat all .html files as dynamic even when you aren't including them? Worth trying though I guess. An alternate solution would be to use the traditional .shtml/.shtm extensions..