Base solution for your next web application
Open Closed

i can not see Web Page on Default Web Site #1102


User avatar
0
legion123 created

i deploy ABP sample Web site to IIS(Default Web Site)

sample :
<a class="postlink" href="http://localhost/MyAbp/">http://localhost/MyAbp/</a>

i clicked Menu (About)
page goto
<a class="postlink" href="http://localhost/About/">http://localhost/About/</a>

but i hope page
<a class="postlink" href="http://localhost/MyAbp/About">http://localhost/MyAbp/About</a>

why sitename is cleared?


6 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    I think this is related to startup template. We will fix it. For your project, you can change Top Menu' html code to fix it.

  • User Avatar
    0
    legion123 created

    thank you very much.
    i soon try it. :D

  • User Avatar
    0
    legion123 created

    i found it.

    MyAbpZeroNavigationProvider.cs file is there


    public class MyAbpZeroNavigationProvider : NavigationProvider
    {
        public override void SetNavigation(INavigationProviderContext context)
        {
            context.Manager.MainMenu
                .AddItem(
                    new MenuItemDefinition(
                        "Home",
                        L("HomePage"),
                        url: "/",                                           // <----- i wish this url is "/" + "Virtual ApplicationPath"  :( 
                        icon: "fa fa-home",
                        requiresAuthentication: true
    
  • User Avatar
    0
    hikalkan created
    Support Team

    I did it in this commit:

    <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero-template/commit/236de82e543e18002ff3302bd8e0f167ff4dff95">https://github.com/aspnetboilerplate/mo ... 67ff4dff95</a>

    You can make same changes on AbpProjectNameNavigationProvider.cs, _TopMenu.cshtml and UrlChecker.cs.

  • User Avatar
    0
    legion123 created

    thank you very much.
    i changed my sample souces.
    problem is cleared .
    but i found another same case.

    i change these souce codes.

    file: _LanguageSelection.cshtml

    @using MyAbp.Web.Views
    @model MyAbp.Web.Models.Layout.LanguageSelectionViewModel

    @{
    var calculateLangMenuUrl = new Func<string, string>((url) =>
    {
    return ApplicationPath + url;
    });
    }

    <li class="dropdown">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
    <i class="@Model.CurrentLanguage.Icon"></i>
    <span>@Model.CurrentLanguage.DisplayName</span>
    <b class="caret"></b>
    </a>
    <ul class="dropdown-menu">
    @foreach (var language in Model.Languages)
    {
    if (language.Name != Model.CurrentLanguage.Name)
    {
    <li><a href="@calculateLangMenuUrl("AbpLocalization/ChangeCulture?cultureName")=@(language.Name)&returnUrl=@(Request.Url)"><i class="@language.Icon"></i> @language.DisplayName</a></li>
    }
    }
    </ul>
    </li>

  • User Avatar
    0
    hikalkan created
    Support Team

    Thank you, we will also fix it.