web.config and shared hosting... or should I say "I smell smoke"

Topics: ASP.NET 2.0
Nov 3, 2012 at 9:23 AM
Edited Nov 3, 2012 at 10:31 AM

Nothing like a good GoDaddy shared hosting environment to use as a development server I always say.  Now the issue...  8, count em, 8 web sites each running everything from php to cshtml with a little asp AND aspx stuffed in between.  My goal is not to have the server seize up and spit out unrecognizable vbscript garble, but instead allow a BlogEngine.NET app, that's somewhere in that mess of folders and domains, find it's home page, otherwise known as default.aspx.  The web.config appsettings - add key="BlogEngine.VirtualPath" value="~/" - adds the folder name to the domain name i.e mydomain.com/thefoldername/default.aspx when it should be mydomain.com/default.aspx instead.  If someone could help me out of this mess I promise to never do it again.  On this server.



Nov 3, 2012 at 10:30 AM

Problem solved.

I added a defaultDocument to the web.config with the value of default.aspx at the top of the heap and success!  I guess now it's time to get some real hosting.



Nov 4, 2012 at 1:52 PM

Hi David: Just curious...were you trying to make BE the root of a domain, so that "mydomain.com/default.aspx" was the BE installation?

Or were you trying to get BE to run in "mydomain.com/be/default.aspx"?

I think you will find most shared hosting systems use the physical "yourroot/domain1" structure for mapping. You could use a virtual server at GD for running your own server and configuring it however you want (more expensive, but you have control).

Nov 7, 2012 at 3:03 AM

I was setting it up in a shared hosting environment on a GoDaddy windows server.  I've been able to run WebMatrix on it just fine by tweaking the web.config.  How the server is set up is...

  • first_domain.com
  • second_domain.com
  • third_domain.com
  • fourth_domain.com

first_domain.com might be running php, second_domain.com could be running cshtml as an example.  I did get BlogEngine working quite well actually, and we are learning how it works, smoothing out a few things, playing with the css and all.  I'll let you know when we go live with it.