Main website on ASP.NET C# with folder in PHP - c#

I needed some help in understanding how i can get this setup completed. Due to the current setup of the website, we have a "/blog" that is powered by Wordpress PHP. We are looking to upgrade the website with ASP.NET C# for the main website "/" in a Windows Azure server but maintaining "/blog" on a Linux machine.
The service doesn't wish to use sub-domain for the blog in fear of losing too much SEO value that cannot be duplicated.
May i ask how can this be done?
Thanks!

Make the php website a subfolder of your main ASP.NET site as described in Create a Separate Site or Virtual Directory for PHP Content.
See also Can PHP and ASP.Net run together within the same web site in IIS 7.5?

Related

Deploying ASP.NET Core Web API and ASP.NET Core with Angular in a subfolder (1&1 Windows Business Hosting)

I've acquired a 1&1 Windows Business Hosting which allows to deploy ASP.NET Core applications (so yeah, I have no access to IIS solutions of building as application stuff or that kind of things I've seen in other posts). I wanted to deploy a web and an API in different subfolders within the 1&1 server I've acquired.
What I want to achieve is the following:
Imagine that my domain is https://myDomain. com.
If a user access directly that URL he should see a specific page of the Angular Web App. However, if the called is https://myDomain. com/api/controllerName it should do whatever I have programmed in that controller of the Web API.
I want to have the folder structure something like this:
But it is also valid if I manage to get it like this:
Is any of these two cases even possible to be done? If possible, how I should proceed for being able to do it? I don't have a lot of knowledge in these topics related to web deployment.
What I have managed to do up until now:
If I deploy just the ASP.NET Core Web API outside the subfolder it works with no issues. If I deploy just the ASP.NET Core with Angular outside the subfolder it also works. My issue is that I'm unable to get them both to work at the same time when at least one of them is in a subfolder.
Alternatives on how to achieve this are also welcome!
Thanks in advance :)
You can deploy ASP.NET Core Web API and ASP.NET Core with Angular in two folders as shown in the image below.
These two folders are virtual directories in IIS. If you want to specify which app to access by default, you can modify the rewrite rule in web.config under the wwwroot folder.

Installing Wordpress in a Sub Directory in windows server along with asp.net

I have deployed asp.net based website to domain e.g xyz.com.
I want to manage the blog site of the website via WordPress cms. So I have created a folder by the name of "blog" in the base directory and installed WordPress in it. WordPress installation is working fine on the local host. But when I try to access it via domain link xyz.com/blog it gives 404 error because every request is managed by asp.net MVC. I want to ignore the xyz.com/blog route not to be managed by asp.net MVC.
I am not sure where I should do that kind of configuration in IIS or any rules rewrite.
Because you are getting 404 error, Can you please check your ASP.NET Applications Directory Browsing Settings. Please enable it and check again. Moreover Sometimes due to Application Pool (Integrated/Classic) you may get this type of error.

Determine the type of IIS websites

I am writing a windows service in c# which runs on every server containing "Windows Server 2003". Purpose of this service is to check all the IIS websites and their types. For the current scenario, we only have two types, One is php and other is ASP.Net
Is there any way to get that? or any other possible alternate?
IIS web sites don't have a type.
A site can run both asp.net and php at the same time.
Just because asp.net and php is enabled for a site, doesn't mean it is actually used.
So you don't need to look at IIS but at the content files. Do you see *.php, *.aspx or *.cshtml files?
By looking at the file extensions you should be able to determine what type of technology is used.

ASP.NET website to be deployed on Windows Azure with databases

I know this is a very common question and I could find several answers, but I think my situation is a bit different.
So, I have an ASP.NET Website (NOT a web application), built using "Web forms". Its a very simple website which does bunch of REST calls and talks to the SQL Server 2008. Can you please help me finding a step by step guide to deploy the same on Windows Azure using VS 2010? As of now, the website runs fine on a traditional web hosting server.
So far what I am getting are approaches which use MVC (and using ASP.NET web application, not website). I don't think that I should be concerned about MVC at all? Does a website vs. web application aspect make a difference? If yes, do I need to convert the website to web application?
There's a lot of content on web, so I am a bit confused given my condition. Can someone please put me in right direction? Thanks a lot.
You'll need to convert your Website project to an ASP.NET Web Role project, whether you first convert it to a ASP.NET Web Application or not doesn't really matter. The rest of the tutorial you already linked to applies just fine.
There's no need to look at ASP.NET MVC, It's a different technology than web forms, and there's no need to move to it in order to get your site hosted on Azure.
As for your database, unless you host that yourself in a VM-Role or somewhere else (and connect it using Azure Connect), you'll need to convert it to Sql Azure or Azure Table Storage. SQL Azure is largely compatible with SQL Server, but there are a few features which are unsupported.

convert web application to a web site

I have a c# .net VS2010 web application that contains only classic asp files.
What I want to do is convert the web application to a web site to make it easier to manage the classic asp files.
How can I convert from web application to web site? I have researched google and found lots of examples going the other way.
I don't think there's an automated way to do this. You could just create a new website in Visual Studio and copy your files from the web app into this new website. Be sure to go into each and every .aspx/.ascx file and edit the 'Codebehind' attribute so that it reads 'Codefile' (codebehind directive needs to be compiled and thus won't work in an ASP.NET website). You'll also need to delete the Designer/Designer.cs files.
Hopefully you don't have too many files so that this won't be too much of a PITA.

Categories