Last post Feb 04, 2009 08:08 PM by GreaseLightning
Dec 19, 2008 03:29 PM|GreaseLightning|LINK
I have deployed a website using VWD 2005, uploading it to one of the hosting companies. I am having a problem w/ performance though. Most of the pages seem to perform quite well. But the home page and the catalog page perform poorly. This happens with the
home and the catalog pages initially, but they improve after the first rendering, and yet they are still slow.
Based on the research done, I thought this was a precompilation problem. So I tried the aspnet_compiler.exe tool. Also, I pulled down the documentation on this tool from msdn. I felt I had to compile in place since the hosting company probably wouldn't let
me run the application directly against there site, although I did try it first. That failed. So, I set up an external command from VWD to run the tool because it wouldn't execute from the command line prompt. The string that I put together is:
aspnet_compiler.exe -v /VirtualPath -p TheActualPhysicalPath
I'm not clear on what this virtual path is. It seems to be anything I want it to be. I do know that the tool can't resolve the use of anything other than a forward slash or no slash at all. Anything with a directory path (using back slashes) fails. This
problem occurs only with the -v switch. When I provided the actual path to the website listed in solution explorer using the -p switch, along w/ the virtual path (again, seems like anything I want to use) using the -v switch in the format I mentioned, something
did happen, but it happened soooo quickly, I wondered if it worked. So, I re-deployed the 2 offending pages to see if there was performance improvement. There wasn't any.
So my questions: Am I using this tool correctly? Is there something else I need to do? What is the virtual path anyway?
Any help is appreciated. Thnax in advance
BTW I set the command up using Tools-> External Tools in VWD. I gave the tool a nane, specified the path to aspnet_compile executable and specified the arguments above in the arguments box.
Dec 19, 2008 09:15 PM|Bruce L|LINK
There's a easier way to do that.
Simply use the Publish Website function in VWD. It will automatically precompile for you.
Dec 19, 2008 11:51 PM|GreaseLightning|LINK
Thanks for responding. I can't find any way to use the Publish Website feature. The information I read says it's not available in VWD express edition.
The Publish Web Site utility is not available in Visual Web Developer Express Edition.
And I did fail to mention that I am using VWD express addition. So, I'm still looking for a solution.
Dec 23, 2008 05:02 AM|Thomas Sun – MSFT|LINK
We can use aspnet_compiler.exe command line to precompile your website in local, and then upload the output to host server.
To do so, we can deploy your website on IIS in local. For example, the virtual path is "YouWebSite" in IIS, and your website's physical path is "E:\YouWebSite". We can use the follow command line to precompile this website and copy the output to " F:\targetFolder"
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v \YouWebSite
-p E:\YouWebSite F:\targetFolder
If we run it successfully, we can find the precompiled website in F:\targetFolder. Then we can upload this precompiled website to host server.
You can modify this command line basing on your computer.
I look forward to hearing from you.
Dec 26, 2008 10:54 AM|GreaseLightning|LINK
Thanks very much for your help. It has definitely put me on the right path. However, even after uploading the precompiled code the the hosting companies server, I am experiencing the same problem (pages painting very slowly). Could this be an asp.net problem
at the hositng company? That is, could the problem be that they may not have all the needed extensions? Or am I still doing something wrong. Because it appears as though the .aspx file doesn't know where the precompile code is located.
Dec 26, 2008 02:00 PM|Bruce L|LINK
If there's a configuration issue on the web server hosting the site, you will get an error of some sort. If the page just load slowly, the problem should not have anything to do w/ configuration. I would check w/ the hosting company.
Dec 26, 2008 06:05 PM|GreaseLightning|LINK
Thanks for your help Bruce, I really appreciate it. I'll attempt to talk with the hosting company, but the problem I'm running into is I don't think they understand enough about how asp.net operates - even though they offer it.
Here's where I am: I've uploaded a folder to their server with the precompiled information. I've been attempting to get the home page to display, but the .aspx contains a line that says the following:
This is a marker file generated by the precompilation tool, and should not be deleted!
All of the .aspx files contain this line after precompilation.
I figured that the asp.net precompiler did this so that under the covers it would know where to go to find the appropriate detail. The compiler also generated a bin folder containing the .dlls and the .compiled files. These .compiled files contain xml code
that references the virtual diectory for the -v switch when precompiling. But this is on my local machine. The hosting site has no way of knowing about this folder. And nothing that I've read suggests this may create a problem.
Having said all that, what appears when I try to access the site online is the line mentioned earlier. And I can't understand why asp.net isn't doing what is necessary under the hood to display things.
Any help with this is appreciated. Otherwise I'm going to continue to have this
problem with slow page rendering, which I don't feel customers will find acceptable. And I'm certain that this happening simply because this the source code being compiled in a JIT fashion.
Thanks in advance,
Dec 28, 2008 09:49 PM|Thomas Sun – MSFT|LINK
Thanks for your response.
After precompile website using that command line, all the code and markup in ASPX, ASCX, and ASHX files, along with any associated code-behind files, will live inside of one or more assemblies in the bin directory, although these files will still exist
in the target directory, they exist as nearly empty ‘marker’ files. Once the application finishes compiling you can FTP or XCOPY the target directory to a web server.
For more information, see
In your case, we should change the debug to false in the web.config file. We also can create simple test website to see if it has same issue on server.
Feb 04, 2009 08:08 PM|GreaseLightning|LINK
Hi Thomas and Bruce,
I have been offline for quite a while, but I wanted to let you both know that both of you helped with resolving this problem. The hosting company had problems that they have since resolved. And Thomas your input led to creating the precompiled code that
I needed to get the site working. It is now up and running (albeit still in test mode) and the pages are now rendering quite rapidly.
I want to thank both of you for your help, for without it, I don't believe this issue would have been resolved.
Hopefully in time, I will be able to offer information that will help someone.