开发者

Why is my ASPX page so slow to load after a compile?

开发者 https://www.devze.com 2023-03-11 17:14 出处:网络
I have a .Net solution with 2 websites in it (one customer facing, one admin). They both share a Code Library that acts as a data/business layer.

I have a .Net solution with 2 websites in it (one customer facing, one admin). They both share a Code Library that acts as a data/business layer.

When I make changes to my site(s) and recompile the code library, then browse to a page, it takes ages to load; like several minutes.

I understand it might take a bit longer to load up changed code into memory, but this is far too long.

Anyone got any ideas on how I can开发者_JAVA技巧 work out what's going wrong?

I'm thinking there might be some dodgey settings in my project files? Or maybe something dumb in IIS (which happens to be IIS6).

I'm keen for any reading on this topic if anyone would like to point me to some!

Thanks in advance.

-Ev


May be it's because of how you're deploying the site.

Try this: in Visual Studio, go to Build Site and then Publish Site in a directory on your local hard drive. On the server (not on the production server for your first try!), remove every file you have. Backup the database(s) to .bak files and reattach the backup files to the SQL server. FTP the files from your local hard drive to the site.

This way of doing the deployment ensures that you're only working with fully compiled aspx files and that all your AppCode is in .dll format.

If this doesn't change the speed at which the site loads, then you know it's an IIS problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消