Tuesday, October 7, 2008

WSE - Web Service Enhancements in VS2008

Web service Enhancements in Visual Studio 2008

Web Service Enhancements
It is a class library primarily focused on building the message-level security using the latest protocols, that includes security, trust and addressing. These capabilities can be added to the application at design time using code or at runtime using the policy file.

WSE in Visual Studio 2003
The addition of WSE to the visual studio 2003 project is straight forward.
• Create a project in Visual Studio 2003.
• Create the Web service reference in Visual Studio 2003.
• Right click on the project and select “WSE settings 2.0”

• Check the option “Enable this project for Web Service Enhancements”

• Notice the reference class file being generated with the WSE class members.

WSE in Visual Studio 2008
Visual studio 2008 doesn’t support or implement WSE in any way. The best way to get around this problem is
• Create a web reference in Visual studio 2008 (it doesn’t implement WSE).
• Copy the content of the web reference folder created in 2003. (Follow the steps mentioned under the section “WSE in Visual Studio 2003”)
• Paste it in the web reference folder of the VS2008 project.
• Refresh the VS2008 project.

Improving Website Performance - Part 3

Retrieve multiple resultsets from database
Design the app in such a way that the requestpath to database is very minimal. Each of the roundtrip decreases the number of requests per second the app can serve. Make sure to return the multiple resultset in single database request. It will enhance the performance as well as the scalability of the application.

Restrict the amount of data retrieved
The sql query or the stored procedure can be designed to restrict the number of results retrieved from the database. In other words the business logic should reside in the stored procedure or Sql query which might constraint a number of results returned from database.

Friday, October 3, 2008

Improving Website Performance - Part 2

Make Use of Repeater control
The ASP.NET controls datagrid, datalist and dataview are heavy on the HTML and doesn't provide scalable performance benefit. Repeater controls provide a better performance over the other ASP.NET controls.

Build the project in Release mode
While building a project make sure to set up the build in release mode. The build in debug mode creates PDB's which overloads the server performance.

Avoid strings and use StringBuilder
The performance of stringbuilder.append is better than string + string. StringBuilder can be a good choice if the concatenation count is more than 3.

Use Server.transfer
server.transfer - sends the request directly to server
response.redirect - sends the response header to client and client in turn sends the request for redirection causing multiple request path.