Asp.net MVC5 WebRole after deploying to Azure Cloud, breaks up on @ Scripts.Render

I have a cloud service with the Asp.Net MVC 5 web role and Azure SDK 2.3 focused on 4.5.1 framework; The website works great locally. But when I deploy it to the Azure Cloud service, I have a classic null-link error:

The reference to the object is not installed in the instance of the object. Exception Details: System.NullReferenceException: The object reference was not set to the object instance.

Source Error:

Line 9:      @Scripts.Render("~/bundles/jquery")

My BundleConfig.cs is simple:

    public static void RegisterBundles(BundleCollection bundles)
    {
        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                     "~/Scripts/jquery-{version}.js",
                     "~/Scripts/knockout-{version}.js",
                     "~/Scripts/jquery.signalR-{version}.js",
                     "~/Scripts/modernizr-{version}.js"
                    ));

Using Intellitrace Logs in WebRole I see this error:

Invalid file name for file monitoring 'E: \ sitesroot \ 0 \ Scripts

Entering remotely into the instance, I can see that the folder scripts are in that exact path.

@Script. . @Style.Render .

Release, Staging.

Web.config

compilation debug="true" and false

. , ?

+4
2

, WEBGREASE. . .

+4

, jquery, jquery. jquery (, jquery.signalR modernizr) jquery.

0

Source: https://habr.com/ru/post/1543015/


All Articles