加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

iis-7 – localhost上的IIS非常慢

发布时间:2020-12-15 22:38:49 所属栏目:asp.Net 来源:网络整理
导读:我在 Windows Vista双核CPU上使用IIS7.第一次点击WCF服务或ASP.NET网页表有时会花费超过一分钟,这对我来说是不可接受的. 我将应用程序配置为使用Classic .NET应用程序池并尝试使用Maximum worker进程,首先将其设置为4,但将其重新设置为1,因为它没有预期的结
我在 Windows Vista双核CPU上使用IIS7.第一次点击WCF服务或ASP.NET网页表有时会花费超过一分钟,这对我来说是不可接受的.

我将应用程序配置为使用Classic .NET应用程序池并尝试使用Maximum worker进程,首先将其设置为4,但将其重新设置为1,因为它没有预期的结果.还有其他我可以试试的东西吗?

解决方法

检查web.config文件以获取编译模式.在开发过程中,您应该以调试模式运行站点.如果您在发布模式下运行,则每个aspx和ascx都将编译为临时程序集,而不仅仅是您点击的页面和控件.另外,将batch设置为false.
<configuration>
    <system.web>
         <compilation debug="true" batch="false" ...>
         ...
         </compilation>
    ...
    </system.web>
    ...

当然,这些不建议用于生产环境,这些环境会因这些变化而变慢.

另外,检查this forum thread,您可以在其中找到一些有趣的提示,例如重置ASP.NET临时文件文件夹的权限:

I had the same problem and made all of
the adjustments as mentioned in this
forum but it didn’t help. I began to
suspect that the slow loading time of
the dlls had to do with security
settings. It appears that access to
the dlls goes through security
checking that is part of the operating
system and not part of VIsual Studio.
The dlls are located in a directory
for your application under:

06001

In order to speed up the security
checking,you need to remove all of
the security settings on the root
folder of your application in the
above mentioned directory,or on the
directory “Temporary ASP.NET Files” if
you want to have it apply to all web
applications you develop.

You right mouse click the folder and
select Properties -> Security

Remove all users and groups. Some will
not be allowed to be removed because
they inherit their permissions from
their parent folder. You must first
remove the inheritance by clicking on
the Advanced button and then uncheck
the “Inherit from parent…” checkbox.
Then remove the user or group. There
must not be any users or groups where
the checkboxes for their permissions
are greyed out. If they are greyed
out,it means that you didn’t remove
the inheritance from their parent.

After you have removed all users and
groups from the folder,you then need
to add the following users and groups:

Administrators Users ASPNET Network
Network Service Local Service

Give each of these accounts full permission. Click on the Advanced button again and check off the “Replace permission entries on all child objects…”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读