-
Dec 6th, 2017, 08:51 PM
#1
Thread Starter
Hyperactive Member
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
-
Dec 7th, 2017, 05:46 AM
#2
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
-
Dec 7th, 2017, 07:09 AM
#3
Thread Starter
Hyperactive Member
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.
-
Dec 7th, 2017, 07:16 AM
#4
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.
-
Dec 7th, 2017, 11:42 AM
#5
Thread Starter
Hyperactive Member
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.
-
Dec 7th, 2017, 11:49 AM
#6
Re: Bogus project compilation error
Originally Posted by SteveHi
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.
-
Dec 7th, 2017, 12:06 PM
#7
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|