2017-02-16 225 views
0

鏈接網址在服務器上不好,但在我的本地正確!爲什麼我的鏈接網址到我的網站上的不良網址?

我使用:

Url.Action("myaction", "mycontroller", new { id = a.Id, title = a.Title,Name="test", area = "" }) 

和:

routes.MapRoute(
      name: "ViewRout", 
      url: "{lang}/{Name}/{id}/{title}", 
      defaults: new { controller = "mycontroller", action = "myaction", lang = "en", id = UrlParameter.Optional, title = UrlParameter.Optional }, 
      constraints: new { id = @"\d+",     
      namespaces: new[] { string.Format("{0}.Controllers", typeof(RouteConfig).Namespace) } 
     ); 

網址在本地:

/en/test/6546/title1 

但是,URL服務器(!不總是,經常,有時只是壞) :

/x1(a)xsyidfjazxdfdsxd/en/test/6546/title1 

請幫幫我!

回答

相關問題