Learning Curve…

Posts Tagged ‘Uniform Resource Locator

 

ASP.NET 4.0 supports built in support for URL Routing. This can make site more user friendly and site content more discoverable by search engines. It is also easy to remember and while bookmarking.

Following example shows URL without using Routing mechanism of ASP.NET 4.0.

http://website/products.aspx?categoryid=12

After using Routing mechanism of ASP.NET 4.0, above URL becomes as follow.

http://website/products/software

For mapping above URL to the list of products based on category, we need to map our route using new method MapPageRoute of class Route as shown in following examples.
Application_Start(object sender, EventArgs e)   {
     RouteTable.Routes.MapPageRoute(“ProductsRoute”,
         “product/{prodId}”, “~/products.aspx”);
}

 

Advertisements

These terminologies are the core on which SOA stands. Every service must expose one or more ends by which the service can be available to the client. End consists of three important things where, what and how:-
Contract (What)
Contract is an agreement between two or more parties. It defines the protocol how client should communicate with your service. Technically, it describes parameters and return values for a
method.
Address (Where)
An Address indicates where we can find this service. Address is a URL, which points to the location of the service.
Binding (How)
Bindings determine how this end can be accessed. It determines how communications is done. For instance, you expose your service, which can be accessed using SOAP over HTTP or BINARY over TCP. So for each of these communications medium two bindings will be created.

ASP.Net 4.0 introduced a new URL redirection method RedirectPermanent() which avoids round trips.
You can implement this as shown below:

RedirectPermanent(“/newpath/newpage.aspx”);


Author

Learning days (Calendar)

October 2017
M T W T F S S
« Jun    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Knowledge Bank (Archives)

I am on Twitter

Blog Stats

  • 510,411 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 43 other followers

%d bloggers like this: