Been looking through and trying all guides i found on this topic but no luck. I am running and MVC project with HTTPS and want to access the debug site with some remote mobile devices to test out the website. I followed a guide that almost work and i think I am pretty close to getting it to work. Here are the steps I have done:
-edit it to get this result:
netsh http add urlacl url=http://*:44363/ user=everyone - URL reservation successfully added
-Tried to start Visual studio as admin and non admin. Gets the following error message
"Unable to launch the IIS Express Web Server. Failed to reister URL "https://localhost:44363" for site "x" Application. Error description: Cannot create file when that file already exists"
-I then have to run cmd again and remove the url with the command: netsh http delete urlacl url=http://*:44363/
How do i get this to work with Visual Studio 2017 ? I cant be many steps from getting it to work. I have read many guides but none of them works
Normally when you run an application in IIS Express, it's only accessible on http://localhost:[someport]. In order to access it from another machine, it needs to be bound to your public IP address as well.
Select the ASP.NET Core project in Visual Studio Solution Explorer and click the Properties icon, or press Alt+Enter, or right-click and choose Properties. Select the Debug tab. In the Properties pane, next to Profile, For IIS Express, select IIS Express from the dropdown.
Configure IIS express on visual studio Select the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.
C:\Program Files (x86)\IIS Express and click on the iisexpress application . Open up Visual Studio . Open any Web Project which you would like to host . I have opened a Silverlight project here .
Amazing how such a simple common need can be so painful to fulfill out of the box in 2017!
Anyway https://github.com/icflorescu/iisexpress-proxy worked nicely for me.
Install it with node:
npm install -g iisexpress-proxy
Then its just something like:
iisexpress-proxy 51123 to 3000
Under 2 mins to get running.
Let me share my experience with Visual Studio and IIS Express that should help you. I am not using HTTPS and my project type is Web site with WCF but you should be able to accomplish your goal. Here are prerequisites:
Now let us setup a project in VS. I am using one of predefined templates with C#. Compile it and try to run it from VS. At that moment VS is starting developer instance of IISExpress that helps your site to run. You should be able to see IIS Express icon in Notification area. With right click you will see that your site is running and a port (we will call it VSPORT) that is assigned by VS. This port must be different than reserved port (50001). If you managed to accomplish this without problems then you have almost everything ready for running your site without VS.
Now we need to add this info in "global" IIS Express config.
binding protocol="http" bindingInformation="*:VSPORT:localhost"
to
binding protocol="http" bindingInformation=":50001:"
With this change you may start IISExpress.exe directly and you can continue to use VS to work on you project at the same time.
If you want to access it from other computers do it as http://YOURIP:50001/. Do have in mind that you need to ensure that your javascript code is NOT using address and port number directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With