Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using ASP.NET in GitHub Pages

I am trying to create a personal website on GitHub Pages using the ASP.NET Web Forms template from Visual Studio 2013. (I'm trying to learn ASP.NET/C#)

But it looks like GitHub pages only will load a file named "index.html" as the home page.

I made my index.html file redirect to my Default.aspx file, but it just causes my browser to download that file. This is my index.html file currently:

<html>
<head>
<title></title>
<meta http-equiv="refresh" content="1;url=/JoeWebsite/Default.aspx">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If your browser doesn't automatically go there within a few seconds, 
you may want to go to 
<a href="/JoeWebsite/Default.aspx">My Website</a> 
manually.
</body>
</html>

The ASP.NET project is in the correct repo in github. The folder for the project is named "JoeWebsite" evident from the code snippet above.

Is it possible to have a ASP.NET website in GitHub? How?

If not, is there an alternative free hosting service that does?

like image 479
AzNjoE Avatar asked May 25 '15 18:05

AzNjoE


People also ask

Can we host ASP Net website on GitHub?

Now that you can run . NET web applications without server-side code, you can deploy these applications to various static site hosts, such as Azure Static Web Apps and GitHub Pages. Check out how to deploy Blazor WASM to these alternative static site hosts: Azure Static Web Apps using GitHub.

Can I use GitHub Pages for a personal website?

GitHub Pages are public web pages hosted for free through GitHub. GitHub users can create and host both personal websites (one allowed per user) and websites related to specific GitHub projects. Imagine you work on a letter using Microsoft Word on your computer.

Can GitHub Pages host HTML?

GitHub is a platform for storing, tracking, and managing project source code. It is also where you can publish your HTML website – and like Netlify, it is free to host here.

Can GitHub Pages run a server?

You can only deploy static sites on github pages. You can't deploy a server on github pages.


1 Answers

As far as I know Github does not support ASP.NET, but you can use a free Azure account. Take a look at:

http://www.asp.net/hosting

like image 199
S.Spieker Avatar answered Sep 21 '22 07:09

S.Spieker