Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
i have used the route in my webapplication, it is working perfect local, but in online server , it does not work, it loads an empty page , any idea about this problem
 
here u r my Global file private void RegisterRoutes()
{
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false ;
System.Web.Routing.RouteTable.Routes.Add("MySupney"
, new System.Web.Routing.Route("MySupney/{username}"
, new RouteHandler(string.Format("~/UserProfile/MySupney.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("Profile"
, new System.Web.Routing.Route("Profile/{username}"
, new RouteHandler(string.Format("~/UserProfile/Profile.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("BusinessProfile"
, new System.Web.Routing.Route("BusinessProfile/{username}"
, new RouteHandler(string.Format("~/UserProfile/DisplayBusinessProfile.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("EditProfile"
, new System.Web.Routing.Route("EditProfile/{username}"
, new RouteHandler(string.Format("~/UserProfile/frm_Profile.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("EditBusinessProfile"
, new System.Web.Routing.Route("EditBusinessProfile/{username}"
, new RouteHandler(string.Format("~/UserProfile/frm_BusinessProfile.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("MessageBoard"
, new System.Web.Routing.Route("MessageBoard/{username}"
, new RouteHandler(string.Format("~/UserProfile/MessageBoard.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("MessageBoardAll"
, new System.Web.Routing.Route("MessageBoardAll/{username}"
, new RouteHandler(string.Format("~/UserProfile/DisplayMessageBoardAll.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("Albums"
, new System.Web.Routing.Route("Albums/{username}"
, new RouteHandler(string.Format("~/UserProfile/Albums.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("ManageAlbum"
, new System.Web.Routing.Route("ManageAlbum/{username}"
, new RouteHandler(string.Format("~/UserProfile/ManageAlbum.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("CreateAlbum"
, new System.Web.Routing.Route("CreateAlbum/{username}"
, new RouteHandler(string.Format("~/UserProfile/CreateAlbum.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("Applications"
, new System.Web.Routing.Route("Applications/{username}"
, new RouteHandler(string.Format("~/UserProfile/Applications.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("Connections"
, new System.Web.Routing.Route("Connections/{username}"
, new RouteHandler(string.Format("~/UserProfile/Connections.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("MicroProfile"
, new System.Web.Routing.Route("MicroProfile/{username}"
, new RouteHandler(string.Format("~/UserProfile/DisplayMicroProfile.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("MiniProfile"
, new System.Web.Routing.Route("MiniProfile/{username}"
, new RouteHandler(string.Format("~/UserProfile/DisplayMiniProfile.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("MyMatches"
, new System.Web.Routing.Route("MyMatches/{username}"
, new RouteHandler(string.Format("~/UserProfile/MyMatches.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("BlockedFriends"
, new System.Web.Routing.Route("BlockedFriends/{username}"
, new RouteHandler(string.Format("~/UserProfile/BlockedFriends.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("AcceptedRequests"
, new System.Web.Routing.Route("AcceptedRequests/{username}"
, new RouteHandler(string.Format("~/UserProfile/AcceptedRequests.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("MyRequests"
, new System.Web.Routing.Route("MyRequests/{username}"
, new RouteHandler(string.Format("~/UserProfile/MyRequests.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("RequestsRecieved"
, new System.Web.Routing.Route("RequestsRecieved/{username}"
, new RouteHandler(string.Format("~/UserProfile/RequestsRecieved.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("RequestsSent"
, new System.Web.Routing.Route("RequestsSent/{username}"
, new RouteHandler(string.Format("~/UserProfile/RequestsSent.aspx"))));
 

System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("ShowFav"
, new System.Web.Routing.Route("ShowFav/{username}"
, new RouteHandler(string.Format("~/UserProfile/ShowFav.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("MyInterests"
, new System.Web.Routing.Route("MyInterests/{username}"
, new RouteHandler(string.Format("~/UserProfile/MyInterests.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("ShowInt"
, new System.Web.Routing.Route("ShowInt/{username}"
, new RouteHandler(string.Format("~/UserProfile/ShowInt.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("ShowInvitationList"
, new System.Web.Routing.Route("ShowInvitationList/{username}"
, new RouteHandler(string.Format("~/UserProfile/ShowInvitationList.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("ShowStatistics"
, new System.Web.Routing.Route("ShowStatistics/{username}"
, new RouteHandler(string.Format("~/UserProfile/ShowStatistics.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("NumberOfViews"
, new System.Web.Routing.Route("NumberOfViews/{username}"
, new RouteHandler(string.Format("~/UserProfile/NumberOfViews.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("ApperanceSearch"
, new System.Web.Routing.Route("ApperanceSearch/{username}"
, new RouteHandler(string.Format("~/UserProfile/ApperanceSearch.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("MyLoginHistory"
, new System.Web.Routing.Route("MyLoginHistory/{username}"
, new RouteHandler(string.Format("~/UserProfile/MyLoginHistory.aspx"))));
 
System.Web.Routing.RouteTable.Routes.RouteExistingFiles = false;
System.Web.Routing.RouteTable.Routes.Add("InviteFriends"
, new System.Web.Routing.Route("InviteFriends/{username}"
, new RouteHandler(string.Format("~/UserProfile/InviteFriends.aspx"))));
 
}
i realy searched so much but no use, i hope that i will find solution here, waiting
Posted 28-Jan-13 9:42am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 380
1 CPallini 375
2 BillWoodruff 314
3 George Jonsson 279
4 OriginalGriff 227
0 OriginalGriff 5,030
1 CPallini 4,225
2 Sergey Alexandrovich Kryukov 3,604
3 George Jonsson 2,831
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 28 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100