I thought I would just replace the localhost with my computer and it will work but it does not:
http://10.90.108.66/MyWebApplication/Default.aspx
How can I make it work so I can share the url?
Are you using cassini/the visual studio web development server?
if so, this doesn't accept remote connections, you'll have to host it in an instance of IIS
Related
I need some help here. I have a website in asp.net and a database in my local machine, and I'm setting up a testing enviroment so that I can access the site and the database from outside the local network and make tests. I want to set up a server in my windows 10 using IIS to publish the site, and I already know how to publish a asp.net site through Visual Studio and IIS manager. My only issue now is to make it available outside my network. Is there a easier way of doing this than having to buy a domain and a hosting service?
You could create a free azure app:
https://azure.microsoft.com/en-gb/pricing/calculator/#app-service1
You can run a single website (asp.net) and not need to register a domain it will give you a link publicly available on the web.
Whoops, sorry, the database wouldn't be free however the basic version is not expensive. This is in fact what I run for my own test cases.
In order to host at home, you would need to ensure that you had a static IP address and that port 80 was opened to allow traffic in and out.
https://serverfault.com/questions/1058/how-do-i-set-up-a-web-server-out-of-my-home
Background: I downloaded .NET Core & Visual Studio code to my Mac, created a new MVC template project, and ran it. I can access it from my own computer at localhost:5000. However another computer on my network cannot access it at [my ip address]:5000.
Is there any way at all to host the site on my Mac so other local computers can access?
Yes, you can serve ASP.NET Core web sites from MacOS. I've done so myself.
Your problem is that you're attempting to serve from localhost to another computer. localhost, the special address 127.0.0.1 (on IPv4) is only meant for connections within your computer. You may have seen other software that acts differently, but if you've configured a server to use localhost, it's expected that no other machine will be able to connect to it.
If you want to accept connections from any address, use the special address 0.0.0.0 instead. This tells the software to accept connections on any address/network interface that it can see.
In my case I was trying to do the same with MVC Core App.
In the Properties/launchSettings.json in the Solutions Name Property:
"applicationUrl": "http://your_ip:5000",
I am new to asp.net development. While running asp.net application visual studio first starts asp.net development environment and the application is hosted in localhost. Can we access the application (Web page) from other PC in the same network like we could do for the application hosted in IIS?
Is there any special configuration required in VS(we are using VS 2010) for that?
Thanks & Regards,
Arijit
No, you cannot. The best way is to create a new website in the IIS and to host your application there. In this way it could be accessed from the local network via the PC IP address. Just make sure you enable external connections on port 80 via your firewall/antivirus settings.
My asp.net web app is hosted on this URL on my local machine:
http://localhost:45433/
I want to access the same application from a different computer on the network. I tried replacing the localhost with my IP but it did not work.
any ideas!
UPDATE 1:
Now, I am getting this error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
If your application is hosted using Visual Studio's built in web development server then this server does not allow remote connections. It is for testing purposes only and accepts connections only from localhost. In order to access your application from remote clients you might need to deploy it to IIS.
First, add the application as a virtual in IIS, and as long as you can access the machine on the network, you can do:
http://<machine name>/<virtual>
I do that at work, where I can access my co-worker's web site.
HTH.
That looks a lot like a url used by the development web server in visual studio. That web server only responds to requests from the localhost. It won't work for other requests from other machines on your network.
You need to install IIS on your machine (must be a Pro version of Windows) and deploy to that IIS install to share your app on the network.
I don't think the built-in version of Cassini (VS debug server) allows remote connections.
However, the UltiDev version, built off of the same code base with a few enhancements, does, and is a much lighter-weight install than IIS (especially if you can't find your OS install DVD). It also integrates nicely with Visual Studio for debugging purposes.
Im testing an ASP.NEt site. When I execute it, it starts the ASP.NET Development Server and opens up a page.
Now I want to test it in the intranet I have.
Can I use this server or I need to configure IIS in this machine?
Do I need to configure something for it to work?
I've changed the localhost to the correct IP and I opened up the firewall.
Thanks
Yes you can! And you don't need IIS
Just use a simple Java TCP tunnel. Download this Java app & just tunnel the traffic back.
http://jcbserver.uwaterloo.ca/cs436/software/tgui/tcpTunnelGUI.shtml
In command prompt, you'd then run the java app like this... Let's assume you want external access on port 80 and your standard debug environment runs on port 1088...
java -jar tunnel.jar 80 localhost 1088
(Also answered here: Accessing asp. net development server external to VM)
No, you can't. It's set up so it only works on localhost, and I couldn't find any workarounds to make it work.
But, here's what I've been doing - I created the website on a specific port in IIS and opened that port up so it's visible on the network. I pointed that IIS website to my website's root folder (the one with web.config in it). Then I continued to use the ASP.NET Development server on that local machine while developing - both IIS and the ASP.NET Development Server can access the files at the same time (unless you're doing something wacky).
Let me know if there's a challenge with running IIS on your machine and I'll update my answer.
I realize this isn't a direct answer to your question, but an alternative to debugging using the ASP development server is to attach to the IIS process: How do I attach the debugger to IIS instead of ASP.NET Development Server?
Nope, stupidly (IMHO) there's no way to get the default ASP.net development server to serve pages to IPs other than localhost. What I did was to use UltiDev Cassini which is very quick to set up and is basically a version of the ASP.net development server compiled by UltiDev, and it will serve pages to any IP address.
Just for those who don't want/cant set up IIS for whatever reason...
Use fiddler or similar on your host - set your browser on the client VM to use the proxy then just use localhost:dev_port as usual on the client.
All requests from the client goto the proxy on your dev machine which routes to localhost on the dev machine and the ASP.net dev server thinks the request is from your dev machine!
You can recompile Cassini to get it to work - there's a fairly easy to remove check for localhost in there. Or, I'm pretty sure Ultidev's Cassini doesn't have this restriction. Both of these are easier to setup than IIS.
But, yeah, the builtin WebDev.WebServer doesn't work....Hmm, unless you run something like AnalogX's Proxy on your dev box and point it to the WebDev port. That should work (though I haven't tried it, it should take < 2 mins to setup).
You can use Cassini to expose your web apps externally. You just need to proxy the connection. I wrote a simple program to do this that you can run in another VS instance. Just change the port to match the port Cassini is using.
https://gist.github.com/945649
You can do port redirection using SOAP Toolkit 3.0
Once installed, go to My Programs > Microsoft Soap Toolkit 3 > Trace Utility
Once Trace Utility opened, go to File > New > Formatted Trace
In the dialog insert your ASP .NET Development Server port in Forward To Destination Port field.
It's only a workaround for testing purposes
I believe the built in ASP.NET server only works on localhost. You'll have to use IIS.
Compile all you website in Debug mode, then create the website and publish it in IIS (make sure you can view it from other machine). Then attach the VS2010 Debugger to the process with the AppPool of your website (the process is called w3wp.exe when IIS>v5 and aspnet_wp.exe when IIS<5).
If you make some changes, just replace the package contents on the physical path of the website, and there you go again.