locked
Asp.net core publish in Filezila RRS feed

  • Question

  • User-297906461 posted

    I had publish asp.net core MVC core web application  in Filezila. I follow this steps:

    1. Open your project in Visual studio. Right click on your main project and click publish
    2. Create a new profile with any name.Click next.
    3. Select publish method as File System.Also Select the location where you want to save.Click next.
    4. Select Configuration as Release-Any CPU.
    5. Click Publish.

    but When i run it ,i found some bootstrap libraries and functions are not working. for example :

    • bootstrap model with partial view  in iis express (Debug)step it load the partial view but after i publish it it  popup empty model and not load  partial view
    • bootstrap rtl file in iis express (Debug)step represent all text from right to left  but after i publish it it represent all text from left to right

    How can i solve it? peas answer me as fast as possible Thanks

    Saturday, November 16, 2019 4:24 PM

All replies

  • User1120430333 posted

    How can i solve it? peas answer me as fast as possible Thanks

    What lead you to using Filezila, which you should probably stop using the unorthodox approach?

    Sunday, November 17, 2019 1:01 AM
  • User-297906461 posted

    can you told me what is the orthodox  approach? because i don't know another approach

    Sunday, November 17, 2019 3:29 AM
  • User-297906461 posted
    @using Microsoft.AspNetCore.Identity
    
    @inject SignInManager<IdentityUser> SignInManager
    @inject UserManager<IdentityUser> UserManager
    
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>@ViewData["Title"] - test</title>
    
        <environment include="Development">
            <link href="~/lib/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
            <link href="~/lib/bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet" />
            <link href="~/lib/bootstrap/dist/css/bootstrap-theme.css" rel="stylesheet" />
            <link href="~/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
            <link href="~/lib/bootstrap/dist/css/bootstrap-rtl.css" rel="stylesheet" />
            <link rel="stylesheet" href="~/css/site.css" />
            <script src="~/lib/jquery/dist/jquery.js"></script>
            <script src="~/lib/jquery-validate/jquery.validate.js"></script>
            <script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
        </environment>
        <environment exclude="Development">
            <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
                  asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
                  asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
            <link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
    
        </environment>
    
    </head>
    <body style="background-color:#E6E5C6;" >
        <nav class="navbar navbar-inverse navbar-fixed-top" style="background-color:#18593D;">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                     </div>
            </div>
        </nav>
    
        <partial name="_CookieConsentPartial" />
    
        <div class="container body-content">
            @RenderBody()
    
        </div>
    
        <environment include="Development">
            <script src="~/lib/jquery/dist/jquery.js"></script>
            <script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
            <script src="~/js/site.js" asp-append-version="true"></script>
        </environment>
        <environment exclude="Development">
            <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js"
                    asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
                    asp-fallback-test="window.jQuery"
                    crossorigin="anonymous"
                    integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT">
            </script>
            <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
                    asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
                    asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
                    crossorigin="anonymous"
                    integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd">
            </script>
            <script src="~/js/site.min.js" asp-append-version="true"></script>
        </environment>
    
        @RenderSection("Scripts", required: false)
    </body>
    </html>
    

    this is my layout page

    Sunday, November 17, 2019 6:15 AM
  • User-782232518 posted

    nobody know the solution ?

    You didn't debug enough yet, so how come a solution.

    Since you have a good case (on IIS Express) and a bad case (deployed to IIS), tools like Fiddler or your browser's developer tools can reveal the key differences in file loading and JavaScript execution. Before a careful analysis of that, the culprit won't be clear, and no solution can be made.

    Sunday, November 17, 2019 3:04 PM