2016-03-16 45 views
1

我有以下Globals.asax.cs文件。 它在我的本地系統上完美工作。 但以下的路徑,沒有在服務器 http://ap6am.com/te/sdfsdf-17.html使用Globals.asax的Asp.net路由在服務器上無法正常工作。在本地工作

工作頁面被路由到http://ap6am.com/te/sdfsdf-17

任何人都可以找到可能的問題。 該路線在我本地系統中工作,但不在服務器上。 我的Globals.asax.cs的內容如下。

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.Routing; 
using System.Web.Security; 
using System.Web.SessionState; 

namespace andhravilas 
{ 
    public class Global1 : System.Web.HttpApplication 
    { 

    protected void Application_Start(object sender, EventArgs e) 
    { 
     RegisterRoutes(RouteTable.Routes); 
    } 

    public void RegisterRoutes(RouteCollection routes) 
    { 
     routes.MapPageRoute("GArticle", "Gallery/{slug}", "~/Gallery/Article.aspx"); 

     routes.MapPageRoute("GCategory", "Gallery/Categories/{slug}", "~/Gallery/Categories.aspx"); 

     routes.MapPageRoute("GSlideShow", "Gallery/{slug}/{id}", "~/Gallery/SlideShow.aspx"); 

     routes.MapPageRoute("Article", "en/{slug}", "~/english/Article.aspx"); 

     routes.MapPageRoute("enArticleHtml", "en/{slug}.html", "~/english/Article.aspx"); 

     routes.MapPageRoute("Category", "en/Categories/{slug}", "~/english/Categories.aspx"); 

     routes.MapPageRoute("enFeed", "en/category/english/{slug}/feed", "~/en/feed.aspx"); 

     routes.MapPageRoute("Tags", "en/Tags/{tag}", "~/english/Tags.aspx"); 

     routes.MapPageRoute("tArticleHtml", "te/{slug}.html", "~/telugu/Article.aspx"); 

     routes.MapPageRoute("tArticle", "te/{slug}", "~/telugu/Article.aspx"); 

     routes.MapPageRoute("teFeed", "te/category/telugu/{slug}/feed", "~/te/feed.aspx"); 

     routes.MapPageRoute("tCategoryHtml", "te/Categories/{slug}.html", "~/telugu/Categories.aspx"); 

     routes.MapPageRoute("tCategory", "te/Categories/{slug}", "~/telugu/Categories.aspx"); 

     routes.MapPageRoute("tTagsHtml", "te/Tags/{tag}.html", "~/telugu/Tags.aspx"); 

     routes.MapPageRoute("tTags", "te/Tags/{tag}", "~/telugu/Tags.aspx"); 
    } 
    } 
} 

回答

相關問題