i am new in asp.net i dont know to how to combine two asp.net web site into one like domain and subdomain concept.
i know the procedure to host one web application in local iis. Please explain the how to combine two application and how to host in local iis i.e) single url as domain(one web application) and subdomain(another web application).
The url should be like these:
http://localhost/firstapplication/
http://localhost/secondapplication.firstapplication/
Thanks in advance.
I'm not 100% sure I understand your question but I think what you want to do is setup a host header for 2 different applications so that you can access them from the same IIS instance. Here is an article that shows you how to configure the hosts:
Using Host Headers to host multiple websites on IIS 6.0
If you are testing this locally you probably want to make a host file entry to simulate the environment.
If you want it to be localhost/firstapplication and localhost/secondapplication.firstapplication/ then you could create a virtual for each application. Here is how you can do that:
How To Create a Virtual Directory in Internet Information Services (IIS)
Related
Current Scenario that works well:
I have a .NET solution that contains 2 projects - Web Application and a Web API Project.
When I need to Publish - I am publishing Web Application first and then Web API project on the Web Server. I am using IP Address to Communicate from Web Application to Call Web API Controllers.
The client now needs this Application to be published to two different web servers that of course have different IPs.
How do I publish because I am using an IP address that is different for both the web servers?
Even if I use hostname/server name, I would get into the same issue of both being different.
Will you have 2 different databases?
I didnt not understand you clearly what is the problem here, if you host Web Application on serv1 and Web API on serv2, Web Application will use serv2 IP address to access the Web API, usualy Web API does not need to access to the Web application since is used just to store and revive data from someware but if u need to push something to the Web Application, Web API will use serv1 IP address to access.
If the WebApp is in angular/react then create the build from VS Code or whichever ide you are using.
If as WebApp you are using Razor/Mvc then remove all the references and then at every call instead of having the call directly have a web api call.
Web Api can be published independently if no references are attached to it.
I have just begin using ASP.Net Web application in Visual Studio. What I want to know is that I have two web pages namely index1.aspx and index2.aspx. I want to host them separately using different port numbers in local host on the iis server. I know site binding is used in these cases but not sure how to go about it.
What is the best way to do this? I want them to run simultaneously and communicate between each other.
In IIS there is something called Virtual directory. You can create two web applications in IIS and make both pointing to same physical location on your system.
You can also update settings of each web application to have different index pages. i.e. web app1 shall use Index1.aspx as index page, and web app 2 shall use Index2.aspx.
Virtual directories are so cool, you can use the same code base for multiple tenants. All we have to create is new web apps or sites in IIS.
So I solved it like this:
I created two projects WebApp1 and WebApp2 in the same Solution.
Right Click on Solution Explorer--> Properties--->Select the radio button with Multiple Startup projects.
Also make sure The Action of atleast one of the projects is set to Start only . The rest can be Start Without Debugging.
To connect IIS to your web application say webapp1:
Reference this video:
https://www.youtube.com/watch?v=IwbKquNBNgQ
Hope this helps anyone who is trying this out.
I'm looking to create an ASP.NET web forms application which I want to run on a subdomain. I've created many websites before but not into a subdomain.
I am best achieving this with everything in a subfolder and then mapping this to the subdomain?
E.g.
My website (different server) www.my-website.com
Subdomain www.sub.my-website.com
I'll be having a separate server which will run this app and the subdomain will be pointed to the new server with DNS at the host.
My goal is to create a service that will allow someone to register their own domain (so, many domains being used), and have that domain point to a specific service/template within a single web application.
Is this possible using URL rewriting or some other method? I want to have a vanity domain that would essentially act as the unique identifier within my application...
So instead of www.myapplicationdomain.com/site/1 and www.myapplicationdomain.com/site/2, i could allow a vanity domain that my application would utilize.
www.customwdomain.com = application/site/1
www.bettercustomwdomain.com = application/site/2
Is this possible, or would i essentially have to dynamically create new websites in IIS and drop files in those folders that the domain would point to? I know IIS can support multiple websites on the same host, but I was trying to take it a step further.
I guess my question is very similar to this question:
IIS with multiple domains on one single web application
Some considerations:
Trying to make this work on Azure shared hosting
I don't want to use sub-domains
I want the vanity domain to always be in use (e.g. not a redirect)
It is possible.
We have an Ecommerce web application that has many web domains being pointed to it, each with their own unique interface. This is entirely dependent on technologies of the Apache software foundation, and I'm not aware of a way to do this without a web server sorting out domains for the application.
We rely on Apache HTTP server for Virtualhost configurations (the listener & configs for each domain), and for serving static content.
We rely on Apache Tomcat for the single Java app that displays most of the interface and functionality. The Apache HTTP server is configured to pass relevant traffic to the Java app.
Configure multiple custom domains to an web-app and then add application gateway at the front of the application. Now based on the application url redirect to the updated url of the website.
I have created a website using asp.net c# for my college library,i have completed it with all their requirements.I know setup files cannot be created for asp.net websites,so,now i need a way to at least create a link for the website,so that they can access the website from anywhere in the college systems and use it.I have tried deploying and publishing nothing is working.I need any other ideas.
Make sure that the web server you're deploying on is publicly (or at least locally within your college network) accessible. If it is, then accessing a particular website is just a matter of sharing its URL with others. You don't need a SETUP for it.
Note that what you see in a browser when you press F5 is most likely an instance of the built-in "ASP.NET Development Server" that is accessible only on the development machine. You need to deploy your site to an instance of IIS (or some other equivalent) to access it from other machines.
There are 2 steps that you need to perform.
Publish the website
Hosting
You can do it either in the IIS of local domain server to be accessible within the network
OR you can purchase a domain and host it on server to be accessible from anywhere.
You can see this on how to host application in IIS 7.
There are two types of deployment
Local
Global
Local Deployment: Download Cassini Web Server , Install it and Configure the WebApp or Website on that. It will give you the Network Url. Use that url to access it from anywhere in your local network.
Global Deployment: Go to Domain and Hosting Provider, purchase domain and link that domain to webspace and hosting that will Support .Net framework. Generally all windows based hosting now a days have IIS. Do not go for LINUX ,as you need MONO there which is generally not available. Upload you publish pages in the root of our virtual directory. In most of the hosts its httpdocs and some where have wwwroot, depending upon the control panels. Access that pages from the domain name.
this website provides all the details step by step!! its awesome it worked for me :)
http://www.programmerfish.com/how-to-deploy-asp-net-web-application-on-the-network-in-windows-7/