Same domain for wordpress and asp.net mvc - asp.net

Let's say I have domain "mysite.com". I want to go to wordpress site when I'm on "mysite.com" and do asp.net mvc when I'm on "mysite.com/app".
Is it possible? (Hosting that I consider has iis and wordpress installed)

Let's say I have domain "mysite.com". I want to go to wordpress site when I'm on "mysite.com" and do asp.net mvc when I'm on "mysite.com/app". Is it possible? (Hosting that I consider has iis and wordpress installed)
According to your description, I suggest you could consider using add nested web application inside the workpress IIS web site to achieve your requirement.
More details, you could refer to below steps:
1.Deploy your MVC application to your server by using web deploy
2.Right click the wordpress site and click add application inside the IIS
3.Type in app as the alias and select the MVC folder as the physical path
4.Click OK
Result:

using windows IIS hosting you can get what you need.

Related

IIS URL Rerouting MVC 404 Error - Hangfire

I'm trying to add an MVC site under a domain where there is an existing site. The new site is just a simple mvc site to show a hangfire dashboard. I'm using IIS 8.5.
The current site is an old ASP.NET Web Forms site and will not allow the routing to the new MVC application and I get a 404.
The old site needs to be accessible at https://example.com and I need to be able to access the Hangfire site at https://example.com/Reporting/hangfire.
I have the MVC application configured and it works when the physical path of the Web Forms site is not pointing to the root folder (example.com).
I am new to the routing configuration in IIS so I am not sure if there is a URL Rewrite rule that would be useful for this or if need to do something else.
Edit
This is the root site, its a web forms site deployed by someone else. I added the MVC site as an web application and it uses a different app pool. I get a 404 in this case because the web forms app is handling the routing and its never getting to the MVC app.
I was able to get this working by deploying the site under a sub-domain; I had to convince our admin to allow this. The MVC site worked on its own but never when nested under the Web Forms site.

How to publish asp.net website?

I have created a web site in asp.net with sql database. I want to publish it. I searched on google but it is showing me to publish site on iis. But I want to publish it online like www.mysite.com.
How can i publish my asp.net website like above.
ASP.NET applications can be only hosted in IIS Server.
So you need a web server to publish your website.
Then you need to purchase a domain name like "www.mysite.com" from any vendors.
Then you can easily map the purchased domain to your published site in IIS.
Hope this will help you..
i found this on the with a quick search:
https://www.youtube.com/watch?v=fWLCZukjPz0

Upload ASP.NET project to web

I created a ASP.NET project (without database) and now I want to upload it to the web.
I found a hosting server (x10hosting) and I published my problem through FTP to the server.
The problem accures when I'm tring to navigate into my website - all I get is tree of the elements that are in my project (aspx pages, bin folder, etc) and even when I'm clicking on one of the pages I just see the code I wrote.
If someone could explain how to upload ASP.NET project to the web that would be great :)
Thanks alot!
To host asp .net web application/website you need to select any asp .net hosting provider. I don't think x10hosting is providing asp .net hosting service, they are facilitating php hosting in free account . You can try to other free hosting site like https://somee.com/default.aspx.

How to base my ASP.NET website out of a specific URL directory?

I've got IIS 7 serving up my ASP.NET MVC website. It's the only site that I have configured in IIS. When I access the site, the site is based out of the root URL directory. For example, my site would be accessed like this: http://example.com/index.html
How can I configure the ASP.NET site to be prefixed by a specific URL directory? I'd like it to be something like this: http://example.com/application/index.html
Is this something I do in the ASP.NET configuration or within IIS itself?
You can create an "Application" for your site (right click on your web site in IIS Manager and choose "Add Application") and give it the directory name that you want. This way you can have, for example, multiple applications under the same domain e.g. http://example.com/application1/whatever and http://example.com/application2/whatever.
This article describes the differences between Sites, Applications and Virtual Directories:
http://www.iis.net/learn/get-started/planning-your-iis-architecture/understanding-sites-applications-and-virtual-directories-on-iis

Issue with Response.Redirect and Page.ResolveUrl in ASP.NET WebForms site hosted on Amazon AWS

I have deployed an ASP.NET WebForms site to Amazon AWS to the following link ('webapp' is just a dummy name I haven't included the real url)
http://webapp.elasticbeanstalk.com
My problem is that wherever I do a redirect using Response.Redirect (for example Response.Redirect('~/Page.aspx') or create a link using Page.ResolveUrl (for example Page.ResolveUrl('~/Page.aspx'), the url becomes
http://webapp.elasticbeanstalk.com/webapp_deploy/Page.aspx
But I want it to be simply:
http://webapp.elasticbeanstalk.com/Page.aspx
My guess is that the site is located in a folder called 'webapp_deploy' on the Amazon server and the home sign '~' gets mapped to 'webapp_deploy'.
Is this a known issue or am I doing something wrong ? Are there any workarounds to this...do I need to change something in the AWS console ?
Thanks
By default, your web application will be deployed to webappname_deploy, but you can change that in the Project Properties.
In the Solution Explorer, right-click on the web project and select "Properties".
In the properties pane, go to the "Package/Publish Web" tab.
On that tab, there is a form field labeled "IIS Web site/application name to use on the destination server:"
Remove webappname_deploy, so it would just say "Default Web Site/"
Your web app will then be deployed to the root of the IIS Default Web Site.

Resources