Search code examples
asp.netmonowebformsxsp

Mono WebForms: Setting default page to run when starting debugging


is it possible to set a default page to run when starting debugging? In Visual Studio you can set the default page either through the context menu in Solution Explorer or in the project properties. I did not find something like that in MonoDevelop. When I am starting debugging the browser will always navigate to the root of the application.

http://localhost:8080

Because there is no default page set in XSP for this application I get an error and always have to correct it manually.

http://localhost:8080/home.aspx

Thanks for your help.


Solution

  • I found a solution. I did not find the xsp.exe.config but it also works when you add the setting either globally in machine.config (residing in /etc/mono/[version]) or by creating a web.config file in your applications root. The values are comma separated.

    <appSettings>
        <add key="MonoServerDefaultIndexFiles" value="Home.aspx, home.aspx" />
    </appSettings>
    

    The help page http://www.mono-project.com/Config does not tell you that a appSettings section is allowed, but I think that the documentation is just incomplete. For example appSettings are used here http://www.mono-project.com/ASP.NET_Settings_Mapping#Inhibiting_the_settings_mapping too.