Bogus project compilation error-VBForums
Results 1 to 7 of 7

Thread: Bogus project compilation error

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2014
    Posts
    372

    Bogus project compilation error

    Hello

    After compiling my Web project and uploading it (I have compiled it now 3 times just to make sure I did it right), to my external Web hosting service, I get the following error:

    The file '/Frina/Contact.aspx' has not been pre-compiled, and cannot be requested.

    Contact.aspx is one Web page of several but the only one that I have worked on and the only one I am concerned about at the moment.

    What else might lead the server into thinking that the project has not been pre-compiled?

    Thanks

    The Stack Trace looks like this:

    [HttpException (0x80004005): The file '/Frina/Contact.aspx' has not been pre-compiled, and cannot be requested.]
    System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +10026502
    System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +103
    System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) +165
    System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +43
    System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
    System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
    System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +344
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

  2. #2
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,385

    Re: Bogus project compilation error

    Most likely you are missing a required dll from the bin directory

    If you can run your app locally, have you checked that you have everything that is in your bin folder locally on your hosted web server, in the bin directory? and of course the latest versions ?
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2014
    Posts
    372

    Re: Bogus project compilation error

    Thanks for your reply.

    My Web.config file has a target framework of ASP.NET 4.5.2 but I have just been informed by my Web hosting service of the following:

    to select "ASP.NET 4.0 integrated pipeline mode" which support all other ASP.NET versions till 4.7.
    I take it that that mean my project should have started life in Visual Studio 2017 as a ASP.NET 4.0 one.

    Is it possible simply to change the version of my project in Visual Studio or do I have to begin the whole thing again in 4.0. I am not sure if Visual Studio 2017 even goes down to ASP.NET 4.0.

    Thanks.

  4. #4
    Fanatic Member PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Newport, UK
    Posts
    605

    Re: Bogus project compilation error

    You can change the framework from the project properties (VS 2017 lets you go back as far as 2.0), you should be fine as long as you aren't relying on anything from version 4.5.

    Shame the hosting provider is behind the times with the installed version though.

    Actually I am not sure that setting the version to 4.0 would fix this problem as I think version 4 of the CLR should support versions later than 4.0, prebuilding is something else.

    If you publish your project from VS there should be an option to prebuild it, just can't remember where it is buried though.
    Last edited by PlausiblyDamp; Dec 7th, 2017 at 07:21 AM.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2014
    Posts
    372

    Re: Bogus project compilation error

    Thanks, PlausiblyDamp

    I now have the project in 4.0 but I still get that 'The file '/Frina/Contact.aspx' has not been pre-compiled, and cannot be requested' error.

    It loads up fine locally.

    I compile it via Command Prompt and it compiles and uploads without a problem. It is only when I go to the actual URL that I see that error.

  6. #6
    Fanatic Member PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Newport, UK
    Posts
    605

    Re: Bogus project compilation error

    Quote Originally Posted by SteveHi View Post
    Thanks, PlausiblyDamp

    I now have the project in 4.0 but I still get that 'The file '/Frina/Contact.aspx' has not been pre-compiled, and cannot be requested' error.

    It loads up fine locally.

    I compile it via Command Prompt and it compiles and uploads without a problem. It is only when I go to the actual URL that I see that error.
    I suspect the version isn't the cause of the problem here, it is probably down to the server missing certain dlls. If it works locally you might have dlls you require installed in the GAC and therefore aren't in your application's bin folder. When you deploy the app to your provider the server probably doesn't have these dlls installed and that is the cause of the error.

    Unless you know what dlls you need and which are present on the server there isn't much you can do other than make sure you are shipping all the dlls you need. From solution explorer I think you can tell it to copy the dlls (copy local or similar is the option). Try that and see if it helps.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2014
    Posts
    372

    Re: Bogus project compilation error

    I will need to identify which DLLs are missing and then try to locate them and copy them, I imagine, into the 'bin' folder.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.