Asp.net网站工作很慢。 [英] Asp.net website working very slow.

查看:78
本文介绍了Asp.net网站工作很慢。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在aps.net(Visual Studio 2010)中创建了一个网站。但客户抱怨网站速度很慢,加载页面需要花费太多时间。我们正在使用WCF服务从 Microsoft Dynamics CRM 中检索数据。我们从CRM获取的主要数据和来自SQL Server 2008的其他数据。大多数数据来自CRM通过WCF。然而,我们未能找到网站缓慢的原因。有时CPU使用率高达95%至96%。当我们重新启动服务器网站时工作正常。在(美国)客户端的主服务器和网站的开发正在印度进行。



请帮助什么是这种缓慢背后的主要原因。

解决方案

这个问题需要大量研究。

我们只能建议一些解决方案。



开发者工具

1. NET标签

首先检查浏览器的开发者工具,如Firebug(在Firefox中),它们有不同的标签。在Net标签上,您可以看到所有请求 POST GET 加载任何页面时的网站。

对于每个进程,您都可以看到所有细节和时间轴,其中显示了获取/发布数据所需的时间



因此,当您的网站运行缓慢时,您可以在此处看到,请求完全花时间并找出您在代码中写的内容。



有时一个图像加载请求可能需要几分钟然后无法加载,这会减慢网站的速度。



您需要列出所有需要花时间在NET选项卡上加载的请求,并尝试对它们进行研究。



2. < u>控制台选项卡

控制台选项卡将显示您的网站在加载时遇到的所有错误

您可以更正它们。



示例 - 任何资源,如javaScript,css等......都失败了加载或任何javascript错误将显示在这里。



连接

当您使用WCF服务时访问CRM,检查所有连接文件是否正在释放并在使用后处理连接对象。



处理或关闭连接对象是最重要的连接,否则连接池将不必要地满,并且只有在自动释放资源(垃圾收集)后才允许新连接,这通常需要时间。



CRM

尝试在插件,工作流中制作更多异步请求,这不会阻止用户进一步执行任何任务。



参考文献 -

有关更多建议,请参阅以下文章和讨论。

1. 优化和维护Microsoft Dynamics CRM 2011服务器基础结构 [ ^ ]

2. 优化和维护Microsoft Dynamics CRM 2011和Microsoft Dynamics CRM Online的客户端性能 [ ^ ]。

3. 请帮助 - IIS 7很慢! - WIN 2008 w / Sharepoint& CRM 4 [ ^ ]

We have created one website in aps.net (Visual Studio 2010). But client complaints that website is very slow it takes too much time to load pages. We are retriveing data from Microsoft Dynamics CRM using WCF service.Our main data we fetches from CRM and other data from SQL server 2008. Most of the data is coming from CRM through WCF . Yet we have failed to find cause of slowness in website.Sometimes CPU usage goes upto 95% To 96%. When we restart server website works fine for sometime.Main server at client side in(US) and development of website is going on in india.

Please help what is the main reason behind this slowness.

解决方案

This question requires vast research.
We can only suggest some solutions.

Developer tools
1. NET Tab
First of all check the developer tools of browsers like "Firebug" (in Firefox), which have different tabs. On "Net" tab, you can see all the requests POST or GET made to your website while loading of any Page.
For each process, you can see all the details and Timeline, which shows how much time the request is taking to get/post the data.

So, when your website is running slow, you can see here, which request exactly taking time and find out what you have written in the code for that.

Sometimes one image load request can take several minutes and then fail to load, which slows down the website.

You need to make a list of all the requests which are taking time to load on the NET tab, and try to research on them.

2. Console Tab
Console tab will show you all the errors which your website encounters while loading.
You can correct them.

Example - Any resource like javaScript, css etc... failed to load or any javascript error will show up here.

Connection
As you are using WCF Services and accessing the CRM, check whether all the connection files are releasing and disposing the connection objects after using them.

It is the most important to dispose or close the connections, otherwise the connection pool will be unnecessarily full and will only allow new connections after it releases resources automatically (Garbage Collection), which usually takes time.

CRM
Try to make more asynchronous requests in Plug-Ins, Workflows, which will not block the user from doing any tasks further.

References -
Refer the below articles and discussions for more suggestions.
1. Optimizing and Maintaining a Microsoft Dynamics CRM 2011 Server Infrastructure[^]
2. Optimizing and Maintaining Client Performance for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online[^].
3. Please Help - IIS 7 is SLOW!! - WIN 2008 w/ Sharepoint & CRM 4[^]


这篇关于Asp.net网站工作很慢。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆