Hosting IIS8 ASP.Net site - asp.net

I have an ASP.Net website running on Server 2012, IIS 8. I am getting a generic, not server provided 404 message. I have the ports forwarding through the router, I have my site and IP setup in the Hosts file, and have the site bindings configured to the proper address and port. The site works fine on the local machine browsing the url (not just localmachine), but nothing outside the server, even other machines on the network can get to the site.
Any suggestions as to what I should do next?

Related

How to access an ASP.NET web api that runs on localhost (IIS)

I built an ASP.NET Web API. I run it locally from Visual Studio on IIS Express. I need to access this api from other device from another network, so I understand that it has to be hosted on the development machine on IIS, right? What I read is that:
I need to enable IIS Manager in the Control Panel (source) - DONE
Assign the IP of the dev machine to the localhost (source; source 2) - I don't see my site in the IIS Manager under Sites, only see Default Web Site. Why is that?
I assume the site needs to be hosted somehow on the dev machine, because I need to stop Visual Studio, therefore the IIS Express will be stopped and the site would not be accessible, even from localhost right?
My dev machine has a public static IP and I can access this Default Web Site successfully from outside.
You should consider your API in IIS just as any IIS App. i.e. a website.
It needs to have an IP (or a hostheader value)
Lets say api1.example.com binded in IIS with your IIS Application.
Your DNS must resolve this to the IIS machine IP.
then you can access it in that URL.
You can also just hit the machine IP running the IIS web server (on the port you added for the api - if its not :80)
See "Bindings" in IIS
See this Video : https://www.youtube.com/watch?v=I32AnqJzD58

How can I enforce IIS 8.5 Web Deploy to use SSL (HTTPS) Only

I've just set-up a website on Windows 2012 (IIS 8.5).
I'm using Visual Studio 2013, and I'm wanting to configure Web Deploy so that our developers can only deploy over SSL (HTTPS).
In the website settings I've configured the SSL for the site;
For the website binding, I only have HTTPS present;
However it seems that I can still publish using WebDeploy over HTTP and I can browse to the site using HTTP, even though the file in this case wasn't found.
My main requirement is to stop developers being able to publish over HTTP. How can I achieve this ?
I think you should try to redirect all HTTP Requests towards HTTPS
URL rewriting in IIS 7+:
http://blogs.msdn.com/b/kaushal/archive/2013/05/23/http-to-https-redirects-on-iis-7-x-and-higher.aspx
Make sure that you don't have another IIS web site (usually the Default Web Site) that binds to port 80 with All unsigned IP address and no host header. That kind of site is a "catch-all" site that gives you the 404.

how to configure iis so that I can connect to my iis hosted localhost from a remote windows pc

there must be a load of questions on this but I cant get it working. I have a asp.net app running locally hosted within iis (windows 8/ version 6.2) which I can browse locally. Example below, and it works without a problem.
http://localhost:1234
I'm trying to browse this site from a windows virtual machine using remote desktop and then launching the browser on the client machine. Unfortunately this display "Internet Explorer cannot display the webpage"
any ideas why I cant get through on a remote desktop? The client has internet access obviously and I can ping the other machine (both ways). Is there an IIS or firewall setting I can configure. The firewall on the dev box (i.e. the web server in this situation) has a firewall switched on. When I turn it off I still get the same error message.
My iis authenication settings are shown below (for my website, not for the 'Default Web Site'):
On the client machine, I'm using the following:
http://12.34.56.78:1234
Thanks,
James
Try using https: instead of http: and also to access the website from other PC, you need to enable your Anonymous Authentication. And you also need to Enable the Directory Browsing from IIS settings of website.
Can you ping the ip? Disable the firewall on both machines and try.
Let me know

Publishing and Configuring ASP.NET site in internet

there!
I'm now publishing asp.net site on test server. I have added it in IIS ( v6.0). I have created for it alias like test.inventory.site.com. On it exists MS Windows Server 2003.
Also I have access to production server. For both servers I connect through Remote Desktop. And to prod. server I connect with address like inventory.site.com, to test server connection address is inventory.site.com:port. I need access through internet to my test site by it's name test.inventory.site.com. On production server exist several sites, therefore it doesn't work when I create alias for production server ip in my local hosts file.
How I can configure it?
You can edit your local dns server or on the development box edit the hosts file located in c:\windodws\system32\drivers\etc
You can change the IP address for the host names so that you can point them to your development or live.
The hosts file will just change the address for the site on your local computer.

How can I showoff my ASP.NET application to my friends?

So, I made a cool demo which I want to show to my friends. But when I give them my IP-address (with the Development server's port and aspx page), it doesn't connect. How can I make it work?
They can't see the development server port.
It only serves pages to browser requests on the local computer.
You have to publish it to your IIS or to another machine that has IIS.
Deploy your site to your Local IIS server
The development server will only server connections from localhost. You need to deploy it to a real IIS server instance. Since you don't likely have Windows Server lying around, you can install IIS on any Professional edition of windows. Then your site will run on port 80, just like any other web site. You still may also need to forward that port on your home router.
Cassini (developers web server) has limitations and doesn't serve http requests from intranet/internet
You should deploy your site to IIS on your workstation (if your friends observe workstation via IP) or use Internet Asp.net Hosting
The development server can only be accessed by clients on the local box. You'll need to host your site on IIS to let them access it (assuming they're on your local network.) If you need to expose this on the internet, you'll have to get a hosting company to do that.
You are probably using the built-in webserver called cassini. By default, that webserver does only accept request from the localhost.
Set up a local IIS, and forward all necessary ports through the firewall
You should find a reliable and already configured webhost and host your site there. The first hit on google for "free asp.net host" was here.

Resources