Can we make IIS Localhost URL accessible by others? - iis

I have published my website in IIS. The url is http://localhost/MyDemo. I want to give this url for testing to other people (anyone). How can I do that?
I tried to give sharing permission to "Everyone" in the Edit Permission.
Please help.

There are standard port forwarding tools that allow you to do this.
A helpful link here - https://www.sitepoint.com/accessing-localhost-from-anywhere/
Now ngRok is a tool I have used many a times. Its usage is pretty straightforward.
It can be downloaded from here - https://ngrok.com/download
Once ngRok is downloaded, you have to open the ngrok.exe, and it opens a console window.
Execute the following command
ngrok http 4983 -host-header="localhost:4983"
Here 4983 is a port number, in case you have one.
Once the command is executed the tool opens up a Url, which is accessible from anywhere. The below image is your Url, and it will be valid for a certain duration of time (if you are using the tool for free).

Related

Tunneling an SPFX WebPart to BrowserStack using ngrok

I've tried this to no avail unfortunately, is there a way of tunneling a locally running version of an SPFX webpart in order to debug it through BrowserStack.
I can get it working directly with SP through the debug query string but it doesn't seem to work via an emulated device on BrowserStack.
https://tenant.sharepoint.com/sites/fakeSite?debug=true&noredir=true&debugManifestsFile=https://1a228f088633.ngrok.io/temp/manifests.js
Any help would be great, I am also aware this may not be possible :)
We debug locally hosted SPFx serves but we do not use ngrok. You have to be aware that there are limitations on which ports are usable as well, the default port 4321 will not work with browser stack. Hopefully that helps, an alternative to debug locally that works for us:
Ensure that Resolve all URLs through my network is enabled for your device
Update the serve.json port to 8888
In serve.json add "hostname": "bs-local.com",
Update c:\windows\system32\drivers\etc\hosts to include an entry: 127.0.0.1 bs-local.com
Then to test:
Navigate to https://bs-local.com:8888/ within the simulator and approve the certificate by proceeding to page
Append the updated hostname to the end of the SP url ?loadSPFX=true&debugManifestsFile=https://bs-local.com:8888/temp/manifests.js
Navigate to the BrowserStack website > select iPad Air (or any other device).
Additional Reference:
Why is my URL redirected to http://bs-local.com from http://localhost?

Localhost webserver denying PUT request

I have configured a webserver on localhost with https using Microsoft IIS Administration. I am able to browse directory with files with browsers and Visual Studio using localhost prefixed with https, such as https://localhost/trial etc.
I wish to upload a file to the said directory, ie., trial, using Libcurl to test some features. Unfortunately I'm unable to do so.
Using the same Libcurl example as given on
Libcurl File Upload
-modified for https, the console window tells me that the following has occurred, upon running the code :
IIS 10.0 Detailed Error - 405.0 - Method Not Allowed
HTTP Error 405.0 - Method Not Allowed The page you are
looking for cannot be displayed because an invalid method (HTTP verb)
is being used.
I checked the IIS Administrator and saw that all authorizations are allowed. I suppose the fact that it is flagging a HTTP verb issue rather than HTTPS as I'd enabled and used as URL in code isn't a big thing?
Libcurl uses PUT for uploading files, so should be an allowed verb.
I am quite new to this, so I'm not certain I did something incorrect with the setting up of the webserver, or whether there are security issues or permission issues which are causing a problem here.
As far as I know, there is impossible to use http put or post a file to a IIS web application's folder without writing server-side code. Otherwise, configure an FTP site on your IIS installation. Then you could use ftp command to upload the file.
If you really need using HTTP put or post to upload the file, you could consider using WebDav.
More details about what is webdev and how to use it, you could refer to below article.
https://learn.microsoft.com/en-us/iis/install/installing-publishing-technologies/installing-and-configuring-webdav-on-iis
https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-7/what39s-new-for-webdav-and-iis-7
Try hostname instead of localhost
Add a trailing slash (/) for the directory.

Locally setting up redirect to https://

I have read a few answers to try and find a solution to a ridiculous problem.
I dont have access to a server that I can log on to access phpmyadmin,
What is supposed to happen is that the web url is supposed to be viewed via https, and in most cases this happens.
Except for a particular PC I have at home and it never seems to open in https. Why this is happening on this given machine is completely unknown.
Is there a way I can set up a rule on my local machine that will ALWAYS convert http://pathtomysite.com to https://pathtomysecuresite.com, (possibly via the 'hosts' entry (and yes it is a windows machine running win10).
I could do this on the web server itself, I know how to do this, but the problem is, I don't have, nor am I allowed to have, access to the database server to update the .htaccess or webconfig.xml on the server. (I am 99% sure its Apache, not nginx or IIS).
Any help is allows gratefully received.

Jenkins URL with own domain

I have installed Jenkins Continues Integration system on my windows server successfully and it works without any errors. But I was unable to get Jenkins URL working with my host domain. The default Jenkins address which is http://localhost:8080 works well. My domain/server name is projectdev so I want to give Jenkins the http://projectdev/jenkins URL so that other developers in my network will be able to access Jenkins dashboard easily.
Although I added http://projectdev/jenkins as the Jenkins URL from the Jenkins configuration sections, it doesn’t work. I can’t access it from other computers in my network. But when I use http://localhost:8080 I can access the dashboard directly.
I also tried to add Jenkins as a web application on IIS and give it the address I want. But I don’t know what to provide as the physical path of Jenkins as it was installed using Jenkins.jar file.
It would be really great if someone can help me to get this done as I want.
Thank you.
You have to configure IIS to re-route requests to {domain}/jenkins to {domain}:8080/jenkins
check the info on:
http://www.iis.net/learn/web-hosting/microsoft-web-farm-framework-20-for-iis-7/setting-up-a-server-farm-with-the-web-farm-framework-20-for-iis
Try this address: http://projectdev:8080/jenkins If you type without 8080 port , the port will be 80 by default.

why servername:port does not work why localhost:port in node.js works?

I am node newbie. I have a windows server, where I am running node.js with webserver.js. Start the node with webserver.js. Fireup the IE and when I tried localhost:port/index.html, the page shows properly in the IE. Now if I change the localhost to servername:port/index.html, IE is unable to display the page ('IE cannot display the webpage with you can try diagnose connection problem). Is there anything I need to enable in node so it is available outside localhost? I have jenkins runs on the same server, I did not do anything and it shows up properly with the server name. Just curious.
Thanks
my problem was that, I used the code from the link, in the link it was use IP address, I changed it to server name, now I am able to hit the link using both server and proper url. Hope this might help others. I did not change to use netstat though.

Resources