Setting up an IIS server - asp.net

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

Related

How to access the ASP.net website deployed in Windows Azure VM (IIS Server)

I have installd IIS server in windows azure virtual machine using ARM template also deployed one application. But when I am accessing the DNS name/Public IP of my VM the default IIS server is coming. I am unable to access my website.
Please give some idea how to access the deployed website using DNS name or public IP.
I am following the below github template for application deployment:
https://github.com/Azure/azure-quickstart-templates/tree/master/201-web-app-vm-dsc
In case you are using Visual Studio 2012 or higher, you can create PublishProfile and use the Publish feature in order to deploy your Web App to Azure service. Refer to the Build->Publish menu item.
I don't know if your website is reachable on port 80 but you have to setup a VM endpoint if you want your site to be published on another port than the default one.
Hope it helps !
If you're using the sample quickstart "as is" the problem is likely that you're missing the virtual application in the path (it's probably not the best sample). If you're hitting the VM using an URI like this:
http://your-dns-name.westus.cloudapp.azure.com
You need to add the web app path onto the end, e.g.
http://your-dns-name.westus.cloudapp.azure.com/webapplication
You can double check the name of the web application by using IIS Manager on the VM, but I think that should be the default name for that quickstart sample.

Excluding a particular IIS website from the web farm environment

We have developed a website that uses In-Proc sessions, stores images uploaded from it on a folder inside its own virtual directory, and uses a third party tool that uses server side caching. This setup works just fine in a single server instance.
But the client has a web farm environment. When we deployed this site on client's web farm. Things started failing. Till now -
we have enabled out-proc session, using SQL state management server
we specified a machine key in the web.config of the server
But the other two, specially the third party tool, is proving difficult to crack.
Will it be possible to remove this one website from the web farm? excuse me if the question sounds naive but I am not a server administrator and not aware of its nitty-gritties
Will it work if we just deactivate one of the websites?
Can we deploy this website on one of the servers in the farm, but keep it outside the web farm's load balancing?
Is there any alternative, other than deploying the website on a completely different server?
Not sure on what vendor the balanacers are but the network admin should be able to setup a VIP (Virtual IP) that translates only to the once server in question.
That is a simple answer but there are many other variables in the network architecture that would have to be answered to accomplish this. I suggest you contact the administrator of the load balancers and ask them if you can isolate traffic for the website to the specified server.

SignalR Performance counter not displaying in the performance monitor

I installed the Microsoft.AspNet.SignalR.Utils version 1.1.0.0 and then install the performance counters using signalr.exe ipc.
In the performance monitor under category "signalr" I can see all the performance counters but it says no instances...so if I add one of the counters in the monitor they don't appear.
My signalr server is hosted on IIS as asp.net web api. Both server and client are using same version of signalr i.e. 1.1.0.0.
Any idea?
I was having the same issue while trying to run the "Microsoft.AspNet.SignalR.LoadTestHarness" from the SignalR source code. I even went so far as to create a full website in my local IIS 8 on Windows 8 (with a DNS entry in my machine's host file pointing the website address to my loop-back ip address - 127.0.0.1).
What ended up working for me was changing the AppPool's Identity to LocalSystem where the load test harness site was running.
A quick how-to for those not familiar, open up IIS, go to the Application Pools, find the Application Pool that the site in question is running under, right-click>Advanced Settings, find the Identity entry, and change it to LocalSystem (from ApplicationPoolIdentity).
Hope this helps.
To use these on full IIS you need to add the app pool user for your application to the Performance Monitor Users group.

IIS, EC2, Web Farm, Web Deploy and ELB

I'm a developer now developing my startup. I really don't know much about IIS setup. I will host my startup on Amazon EC2. And I want to know how can I scale my application if my traffic increase. I been reading about MS Deploy and Web Farm Framework here: https://serverfault.com/questions/127409/iis-configuration-synchronization-for-web-server-farm . And I want a simple architecture, with not to much configuration. So I been looking an experience with an IIS web farm and Amazon ELBs. And I did not find any one.
So the question is:
It is possible to make a IIS web farm with Amazon ELBs?
Any experience on Ec2? IIS web deploy or WFF and/or without ELBs?
What you recommend for an easy web farm setup?
You can do almost anything you want with IIS on EC2. They are full servers (well window 2k8 datacenter edition) and you can open any ports you need to communicate between servers. Here is an explicit tutorial on how to set up WFF, for example, on EC2.
The question is, are you sure you need to build a web farm? If you simply want to have multiple servers running your code then you can accomplish this without anything more than IIS and the tools that EC2 provides.
You build your app so it uses shared resources (like a session state server, central location for storing user uploaded content), configure a server the way you like it, and capture a server image (AMI). You use this image when you configure AutoScaling to launch new instances based on server metrics (like CPU usage), and they would be automatically added to the load balancer when launched.
The last challenge is ensuring servers launched automatically are running your latest code. You can write a custom program to get the latest code from somewhere (like SVN) on server startup, or you can use something much simpler like Dropbox to handle the synchronization.

Viewing ASP.net Development Server from virtual machine

Microsoft recommends testing older versions of IE with the following virtual machines
This is all fine and good, except that the virtual machines can't see the Dev Server from Visual Studio. This makes it very difficult to develop or debug since I have to copy or deploy to IIS for every little change I make. I've tried using ARR, but it seems it can only forward to one specific port at a time, whereas i need to have the port typed in the address bar of the virtual machine to match the port that it is connecting to on the host machine. Is this possible?
You shouldn't need to deploy to IIS to test changes.
We set our IIS up on development machines to point to the web project folder.
Once IIS is setup, you can add an existing website to your solution, select Local IIS and select the Site from the list of sites (rather than browsing the file system and selecting a .csproj file). You'll now have your site in VS that is hosted by IIS, ready to change and debug, and accessible from remote machines.
Generally speaking you cannot access the ASP.NET Development Server on one machine from another.
Here's some additonal notes on what you cannot do with ASP.NET Development Server from MSDN
ASP.NET Development Server is specifically built to serve, or run, ASP.NET Web pages under the local host scenario (browsing from the same computer as the Web server). In other words, the ASP.NET Development Server will serve pages to browser requests on the local computer. It will not serve pages to another computer. Additionally, it will not serve files that are outside of the application scope. The ASP.NET Development Server provides an efficient way to test pages locally before you publish the pages to a production server running IIS.
The ASP.NET Development Server works only with individual pages and does not include the extra facilities of IIS. For example, the ASP.NET Development Server does not support an SMTP mail server. If your Web application involves sending e-mail messages, you must have access to the IIS SMPT virtual server to test e-mail because the ASP.NET Development Server cannot forward e-mail messages or invoke a server that does.
Anyway.....
Googling around I have found an article where somebody had success on accessing a Development Server remotely using a reverse proxy. I have not tried but here's the link
Configuring a Basic Reverse Proxy in Squid on Windows (Website Accelerator)
Also have a look at this StackOverflow question that has answers describing varous methods to achieve your results
Is There a Way to Make Remote Calls to ASP.NET Development Web Server?
You need to type the development server port into the address bar of the client browser, otherwise host the application in IIS and use the default port.
It is overkill to test with this number of configurations in the development environment. It is generally sufficient to test with 2 or 3 configurations while you are writing code (say IE8, FireFox) - just run these from the local machine (no need for a virtual machine). Once you've finished the UI, deploy your application to a test environment running IIS and test it against the larger range of configurations.
If you test each small change against all of these configurations as the change is made, you'll find yourself overwhelmed with testing. Don't forget that as well as the MS recommended test environments, various configurations of other browsers and operating systems (such as FireFox and Opera, Mac OS) are equally important - you may choose to only test a subset of these configurations depending on your resources.
I too found the link Lorenzo mentions in his comment, but had no luck with Squid configuration.
Happily there's a much easier method, as noted here.
Go to CNET and download SPI Port Forwarder
(Note: Click the "Direct Download Link" below the big green "Download Now" button. If you use the Download Now button CNET tries to install adware on your machine before giving you the file. It's very odd.)
In the first column, "Local Port" put the port you want people to connect to your machine on. I wanted people to come in on 80.
Second column, "Remote host", put "localhost" (it'll apparently port-forward to other machines).
Third column, "Remote port", put the port of the local webserver (in my case the ASP.NET Development Server on port 2485).
Click "Activate"
Hope this helps.
I am answering this old question to help peoples who wants to make it work without IIS. Thank you Fiddler !
1. First Step
You have to download Fiddler.
Once Fiddler is downloaded and installed, open it.
Go in Tools-> Fiddler Option-> Connection tab-> And check "Allow remote computers to connect" :
Restart Fiddler.
2. Second Step
After this, in the VM, open internet explorer-> Internet Options-> Connection Tab-> Lan Settings-> Check "Use a proxy server for your LAN" :
The adress is the IP adress of your DEV machine.
And put the port 8888
Now, you can access the ASP.NET Web Server from your VM !
To access it -> http://localhost.:54814
Don't forget the additional point after "localhost" !
The port, "54814" in my case, is the ASP.NET Web Server port.

Resources