如何在asp.net中加载我的网页加载 [英] How to speedup my web pages to load in asp.net

查看:122
本文介绍了如何在asp.net中加载我的网页加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,





我已经使用c#,后端作为Sqlserver-2008完成了我的asp.net Web应用程序。 />


i已发布我的网络应用程序。



n



它花了很多时间加载它。



任何人都可以帮助我,如何加快我的web应用程序在几秒钟内工作/加载。



请帮帮我。



谢谢

解决方案

1.通过以下方式修改web.config中的设置:

a)删除属性debug

b)将会话到期设置为更高的值,如下一个示例(24小时):

< sessionState mode =InProccookieless =falsetimeout =1440/> ;



2.在应用程序托管的Web服务器上,执行IIS中的下一个设置/优化:

a)创建和使用您自己的应用程序池,仅适用于您的w eb应用程序;

b)在您的站点高级设置设置连接超时到更高的值;

在这里您可以找到更多详细信息:< a href =http://securitywing.com/8-effective-ways-to-improve-iis-7-5-performance/>如何加速我的网页加载 - asp-net [ ^ ]



3.尝试最大限度地优化主页(如果使用MVC则主要布局);



4.尝试优化起始页;



对于第3点和第4点,有一些想法:

a)如果您使用的是有多行的网格或表格,请尝试使用分页;

您可以在我的下一篇文章中找到有关分页的详细信息:高级ASPX GridView分页和数据实体 [ ^ ]

b)页面中使用的图像尝试使它们的大小尽可能小,并使用像JPEG这样的压缩格式;

c)如果您使用的是静态数据,请尝试将它们缓存到中应用程序会话,因此只要Web应用程序处于活动状态,所有用户都只能使用它们;


请参阅此链接



http://www.realsoftwaredevelopment.com/20-提示 - 改进 - aspnet-application-performance / [ ^ ]



ASP.NET网站性能改进 [<小时ef =http://www.codeproject.com/Articles/36749/ASP-NET-Web-Site-Performance-Improvementtarget =_ blanktitle =New Window> ^ ]

您好,



在Web应用程序优化中,我们需要关注3个部分:IIS服务器,客户端和MSSQL优化

1. IIS优化:

- 找到IIS和Linux之间网络/带宽的最佳解决方案MSSQL得到了很多帮助。

- COMET服务器推送也有助于在没有客户请求的情况下从服务器到客户端提供小的不断变化的数据。 (查看更多: http://en.wikipedia.org/wiki/Comet_%28programming%29 [ ^ ])

- 确保页面已压缩(使用gzip检查: http://checkgzipcompression.com/ [ ^ ])

- 图像优化。

- 流媒体托管,我的建议是使用Youtube ;-)

2.客户:

- html,css与 http: //validator.w3.org/ [ ^ ]

- 使用共享jquery(我的建议是使用Google jquery)

- 如果您的页面连接到任何外部资源,请确保与其他服务器连接良好。

3. SQLserver:

- 确保每个查询都是最好的(例如:使用select top代替select *)

- 使用SQL分页。

- 使用SQL Server Analysis Services查找性能优化的最佳实践



希望该解决方案能够提供帮助您在Web应用程序优化中。

Tri


Hi guys,


I have completed my asp.net web application using c#, backend as Sqlserver-2008.

i have published my web application.

n

its taking lots of time to load it.

can any one help me, how to speedup my web application to work/load in seconds.

Please, help me.

Thanks

解决方案

1.Modify the settings from your web.config in the next way:
a)remove the attribute "debug"
b)setup the session expiration to a higher value, like in the next example (24 hours):
<sessionState mode="InProc" cookieless="false" timeout="1440"/>

2.On the web server where the application is hosting, do the next settings/optimizations in the IIS:
a)Create and use your own Application Pool and only for your web application;
b)On the "Advanced Settings" of your site setup "The connection time-out" to a higher value;
Here you could find more details: How-to-speedup-my-web-pages-to-load-in-asp-net[^]

3.Try to optimize at maximum your master page (main layout if you are using MVC);

4. Try to optimize the start page;

For points 3 and 4 there are some ideas:
a)If you are using grids or tables with multiple rows, try to use pagination;
You can find details about pagination in my next article: Advanced ASPX GridView Pagination and Data Entities[^]
b)The images used in the pages try to make them in size as small as possible and use a compressed format like JPEG;
c)If you are using static data try to cache them into the Application session so only ones will be used for all users as long the web application will be active;


refer this links

http://www.realsoftwaredevelopment.com/20-tips-to-improve-aspnet-application-performance/[^]

ASP.NET Web Site Performance Improvement[^]


Hi there,

In web application optimize we need to focus in 3 parts : IIS Server, Clients & MSSQL optimize
1. IIS optimize:
- Using cache.
- Find the best solution for network/ bandwidth between IIS & MSSQL is helped a lot.
- COMET server push is also help to provide a small changing pieces of data from server to client without request from client. (View more: http://en.wikipedia.org/wiki/Comet_%28programming%29[^])
- Make sure pages had compressed(Using gzip check: http://checkgzipcompression.com/[^] )
- Image optimization.
- Stream media hosting, my suggestion is using Youtube ;-)
2. Clients:
- html,css valid with http://validator.w3.org/[^]
- Using shared jquery (my suggestion is using Google jquery)
- Make sure that connect with other server is good if your pages connect to any outside resources.
3. SQLserver :
- Make sure every query is the best (Example: using "select top" instead for "select *" )
- Using SQL paging.
- Using SQL Server Analysis Services to find out the best practices for performance optimization

Hope that solution will help you in web application optimization.
Tri


这篇关于如何在asp.net中加载我的网页加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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