I had a very serious problem a few years back. We created a new project based on net 2.0 on C#. It worked perfectly on my local development system without any problem. We deployed it on production server. After the deployment, when we tried to access some of the pages it thrown the error. Some of other pages loaded without any problem.
The file 'default.aspx' has not been pre-compiled, and cannot be requested.
The site itself was compiled before deployment. We tried the pre-compiled files in our local system( we tested only with non complied files). Then we could access almost every pages including the pages which created problem in deployment server. So we decided it is the problem with the deployment server. We contacted the hosting company, they finally concluded nothing wrong with the hosting.
Into Solution
Actually our project was converted from classic asp to asp.net. Some of the com components used in the old site still included in the new project for time saving. But that was the problem. We refer to some com dll files in the project. Those dll files were in the system folders of our local development system. So it worked perfectly in our local system. But when we compiled and deployed in the remote system, the dll files missed. That created the problems, but the error message was bit confusing. Only the pages we used the com components thrown errors and pages without reference loaded without any problem
Solution for "The file has not been pre-compiled, and cannot be requested"
It is not easy to install the missing "com" components in the deployment server. So we just copied the .dll files into the "bin" folder of the deployment server. Now it is working without fail.
Conclusion :-
A lots of error message from .net creating confusion everywhere. In the above case actually the problem was missing "com" components which was referred through web.config file. But raised an error message connected with compilation .
Actually our project was converted from classic asp to asp.net. Some of the com components used in the old site still included in the new project for time saving. But that was the problem. We refer to some com dll files in the project. Those dll files were in the system folders of our local development system. So it worked perfectly in our local system. But when we compiled and deployed in the remote system, the dll files missed. That created the problems, but the error message was bit confusing. Only the pages we used the com components thrown errors and pages without reference loaded without any problem
Solution for "The file has not been pre-compiled, and cannot be requested"
It is not easy to install the missing "com" components in the deployment server. So we just copied the .dll files into the "bin" folder of the deployment server. Now it is working without fail.
Conclusion :-
A lots of error message from .net creating confusion everywhere. In the above case actually the problem was missing "com" components which was referred through web.config file. But raised an error message connected with compilation .
3 comments:
Useful article. Gave me a hint when i had a similar problem. In my case though it worked when i did the compile on the deployment server, since it happens to have aspnet_compiler.
I had a great time with this post of yours. Professional and real site. Thanks!online document management
restart your IIS
Post a Comment