Get domain & subdomain of server by console application - c#-4.0

Let's take one case that i hosted my web application on window server 2008 R2 and one exe (console application) running on that server.
I can access that web application by URI:
<subdomain>.<domain>.net , is there any way to get subdomain and domain info from EXE (C#) ?
Thanks in Advance.

The answer is... it depends.
If you only have one site hosted on your box then you can just connect to the local instance via either the IP Address the website on the machine resolves too, or by using http://localhost etc.
When you have a URL, the situation becomes more complicated. The machine could be hosting several websites - how do you know which one you want to connect to? In this instance, I would advise just storing the url you want to connect to in config.
However, it should be possible to list the all of the domains from IIS - you'll need to use WMI.

Related

Not able to access blazor website from other computers

I am trying to host a Blazor website on a local Windows machine via IIS, and it can be accessed from the same machine using IP address in the URL like https://10.0.0.123:8080/myblazor, and I also make sure port 8080 is opened on the firewall, but I am not able to access my Blazor website using the same URL from other computers. Does anyone know why? Thanks in advance!
I added another regular website (simple HTML website) and I can access from other computers. So doesn't look like it's the firewall issue or IIS issue.

Spreading web sites onto more servers

We have 200 customer facing web sites all on one server. They are all ASP.NET running in IIS. Is it possible to move some of them to another server WITHOUT changing the customer's URL? Any links explaining how to do this would be helpful.
If your sits are already registered to specific sub domains, you can simply re-point the names to the new server using dns.
If they are simply different sites under the same domain on IIS you can use your current IIS server to reverse proxy the new ones. Some info is given here
Lastly, you could consider using a load balancer such as netscaler, f5 or application request routing. You would again, point the domain name to this using DNS and the load balancer would send the requests to the correct server.

Host only some subdomains of my website on Azure

Let's say I have a website that is hosted on a traditional dedicated hosting:
http://www.mycompany.com
This website has 'folders' like /area1, /area2, /area3, etc.
I'd like to host /area1 and /area3 on Windows Azure, and keep the other parts of the website hosted on my existing dedicated hosting.
Is it possible? How?
Subfolders will always be requested against the base host, you will not be able to serve content from the Azure instance without first hitting your www server. If you use subdomains on the other hand (like #CSharpRocks suggest) you will be able to configure separate DNS entries and thus direct traffic directly to the Azure web role without ever hitting your dedicated server.
Not exactly what you're looking for but you can set a CNAME that points to a Web role. You'll end up having something like this:
http://area1.mycompany.com
http://area2.mycompany.com

Hosting website from home Windows Server 2008

I have created a website in asp.net and deployed it on IIS. It is working fine locally. Now I want to access this site on internet. I don't want to buy domain name now. So, I am perfectly fine with the URL like this http://120.89.12.32/MyAppName/Default.aspx
Could anyone assist me knowing that if it is possible for me to host my asp.net application from my home? I am using Windows Server 2008 [R2] Enterprise edition.
Yes you can, but you'll need a static IP address. Most people have a dynamic one, unless they've specifically requested a static one. You may have to pay a small surcharge for static.
You can of course just access your site with whatever the current IP is, but being dynamic it will change from time to time.
Also you'll have to make sure that your router's/modem's firewall is configured to relay requests to your server. And make sure that if your ISP also provides a firewall it is configured to allow inbound requests.

TFS2010: Single Server Deployment wizard, Bad sharepoint URLs

I just installed TFS2010, and set it up with the single server wizard. It installed me Sharepoint Services an let everything working pretty well.
But, the sharepoint URLs it generates from the Server name "server". As my setup is without a domain, the URLs work okay only from the server computer, not from the others.
I have to give access to LAN clients, and Internet Clients, both connected thought my Public Ip.
How can I change those sharepoint IPs from TFS to be generated From the IP, not from the Server's name??
Thanks in advance
Sharepoint is simply an ASP.Net web application sitting on IIS so all the configuration for host headers etc can be added in IIS itself - if you have multiple instance of sharepoint running on the server, you'll have to add URL's using the sharepoint configuration site but most stuff can be tweaked through IIS (IP's its listening on etc)
If you not on an domainan and want people to have access to the site though you'll have to add your machines IP to the DNS server that you clients are using

Resources