Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
671 views
in Technique[技术] by (71.8m points)

asp.net - Set default webpage for website on Microsoft Windows Azure

I recently set up a website on azurewebsites.net.

But when I go to the url http:/website.azurewebsites.net/ it doesn't load.

But when I go to http:/website.azurewebsites.net/home.aspx it loads.

What I want is that if a user goes to http:/website.azurewebsites.net/ it loads with the home.aspx content or get redirected to http:/website.azurewebsites.net/home.aspx

This doesn't work

 <system.webServer>
   <defaultDocument>
     <files>
       <clear />
       <add value="Default.aspx" />
     </files>
   </defaultDocument>
  </system.webServer>

Sorry here's the actual link http://rathgarfantasyhockey.azurewebsites.net/default.aspx which works fine, but when you go to http://rathgarfantasyhockey.azurewebsites.net HTTP error 404, The resource cannot be found is displayed.

Can anyone help??

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

According to this blog post: http://blogs.msdn.com/b/cesardelatorre/archive/2010/07/22/how-to-set-a-default-page-to-a-windows-azure-web-role-app-silverlight-asp-net-etc.aspx

<defaultDocument> 
          <files>                           
             <clear/>                           
             <add value="Default.aspx"/>                      
          </files>
</defaultDocument>

Should Work. Or you could Type to Url map it. To do that check out http://msdn.microsoft.com/en-us/library/cc668201.aspx


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...