简体   繁体   English

为什么我的 ASPX 页面在编译后加载这么慢?

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

I have a.Net solution with 2 websites in it (one customer facing, one admin).我有一个.Net 解决方案,其中有 2 个网站(一个面向客户,一个管理员)。 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.我知道将更改的代码加载到 memory 中可能需要更长的时间,但这太长了。

Anyone got any ideas on how I can 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).或者可能是 IIS(恰好是 IIS6)中的一些愚蠢的东西。

I'm keen for any reading on this topic if anyone would like to point me to some!如果有人想向我指出一些,我很想阅读有关此主题的任何内容!

Thanks in advance.提前致谢。

-Ev -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.试试这个:在 Visual Studio 中,go 构建站点,然后在本地硬盘上的目录中发布站点。 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.将数据库备份到 .bak 文件并将备份文件重新附加到 SQL 服务器。 FTP the files from your local hard drive to the site. FTP 将文件从本地硬盘驱动到站点。

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.这种部署方式可确保您只使用完全编译的 aspx 文件,并且您的所有 AppCode 均为.dll 格式。

If this doesn't change the speed at which the site loads, then you know it's an IIS problem.如果这不会改变站点加载的速度,那么您知道这是一个 IIS 问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM