Wednesday, August 27, 2008

Visual Web Developer 2005 Express Edition is waiting for an internal operation to complete. If you regularly encounter this delay during normal usage

Some peoples may encounter this problem during the usage of Visual Web Developer. According to some expert opinions it waits for some Remote Procedure Call to Complete. But nobody could say which one. In my experience I noticed, it related with Internet Information Services. To VWD to get back to normal running do the following steps.
Open the Task manager. Close the inetinfo.exe process. Then wait a moment the VWD will start responding. To rectify the problem completely, try uninstall the IIS and reinstall. If the problem not solved when you stop the inetinfo.exe process try uninstall and reinstall IE 7.

Friday, August 22, 2008

The file has not been pre-compiled, and cannot be requested

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 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 .

Tuesday, August 19, 2008

Call a method in an aspx page it runs perfectly fine on development machine when deploy it on the production server it throws an error BC30451

I would like to share some of my experience with code. First post is here.

call a method in an aspx page it runs perfectly fine on development machine when i deploy it on the production server it throws an error BC30451 type not declared

Last week I had a strange experience. I am using Visual Web Developer for creating web applications. I was working for one of our clients. I added some new functionalities to web application and put those methods in a class file of App_Code folder. Methods were declared as public and create new instance of that classes in aspx pages. So I could access those methods from my aspx pages. It worked perfectly form my local development machine. But when I tried to deploy it on the production server it throws some error "BC30451 type not declared" at the point where I created the instances of the classes.
I tried every possible methods to figure out the exact cause of the problem. First i put the class inside a namespace because it was not like that. But it made any change in the error

Finally I got the solution.
My web application on the production server resides inside a subfolder of "httpdocs" and the default App_data folder and everything in the root of "httpdocs". I had created the App_Code folder inside that subfolder and copied the class files there.
To rectify that problem I simply create App_code folder in the root of "httpdocs" and copied class files to there. Now it is working without fail.

I think the IIS looking class files for the root of the folder which created as an application. In this case "httpdocs" was the created application folder so IIS will always look there for class files, if it is not there will thrown as error message.