Hi,
This one is causing me a few nightmares as I'm on the live box trying to work out what is going wrong!
If someone accesses our ASP.Net MVC website with the full URL http://www..net all is OK. If they go to: http://.net then our custom error page is shown. This used to work OK before we moved the site to MVC.
We do have an Appl...
Hi,
What's the correct way to get the full url (including protocol and domain) for a controller and action? I need this to be able to send links to pages via email.
I was hoping to just use Url.Action() and concatenate it onto the current server hostname from Request.Url. However, it seems that Url.Action is context sensitive and so wi...
how many methods for adding style sheets in a page using Asp.net MVC
...
How can you revert records in a way that respects REST conventions and routing?
I am looking for examples of how to setup my routes.rb and build the link & controller action to do the revert. All the examples I have found are pre-REST rails.
My understanding is that I need to have revert_to_version function in my resource controller....
I have installed Visual Web Developer 2008, the .net framework 3.5 but when i try to include System.Web.Routing intellisense can't find it and if i type it by hand it says it does not exist.. any suggestions?
...
My HomeController is controlling some pages like 'Index' and some others like 'Contact', 'About Us'.
But, if I type:
www.blabla.com/
the 'Index' will be called and it works.
But, if I type:
www.blabla.com/AboutUs
it doesn't work at all! It just works if I type:
www.blabla.com/Home/AboutUs
How can I make all the actions in Home...
Hi everyone!
How can I do this: I have on page named "Schedule" and it can be accessed through 2 differente ways:
URL 1- www.bla.com/Admin/Schedule
URL 2- www.bla.com/Schedule
"URL 1" will be accessed by users with Admin previlegies and this View will show some Admin stuff, and users must be LoggedOn.
In the otherhand, "URL 2" will ...
I'm trying to plan for future (months away) localization of a new ASP.NET MVC site.
Trying to decide what makes most sense to do, as far as constructing the URLs and routing.
For instance should I start off immediately with this :
http://www.example.com/en/Products/1001
http://www.example.com/es/Products/1001
or just
http://www....
I have a Linksys WRT54G wireless router connected to a big LAN in my dorm. We regularly use DAAP (iTunes sharing) to play our own music at the different lounges and kitchens. This works fine when I connect my laptop directly to the LAN, but as soon as I access it through my router, I cannot see other shares, and they can't see mine. Prob...
I would like to know how to set up the routing in asp.net mvc so I can have similar urls to stackoverflows question urls?
http://stackoverflow.com/questions/115634/do-you-believe-that-asp-net-mvc-is-ready-for-production/
I am guessing that for url creation there is a helper class that creates the question urls.
The part i am wonder...
Hi there.
I have set up an ASP.NET MVC project, and everything is working great, but I do have one problem with the routing. My Global.asax looks like this:
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{cont...
I note this intriguing bit in ASP.NET MVC:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
I'd like to map {*pathInfo} into a route.
Something like:
routes.MapRoute(
"area/{*pathInfo}",
"{controller}/{action}/{id}",parameters
new { controller = "Area", action = "Index", id = ??? }
);
but how do I pass in the variable "f...
I am working on a project that needs to grab the actual URL and use it in the route itself. Everything I am seeing, reading and testing allows the route to grab the items after the site URL. This is what I have tried and each time it simply say the site is blank (which is probably because of the default of blank). Can you throw me any...
I am experiencing strange behavior with my Zend Framework application.
I run this url, hoping to get index controller run the 1234567890 action.
http://hello.com/index/1234567890?test=http%3A%2F%2Fworld.com%2Findex.php
I however get exception like this:
Message: Invalid controller specified (4567890)
And strangely all URLs that ar...
In my asp.net-mvc ontroller I accept a bunch of form field values and from those create a string the Lucene library understands.
Then I want to redirect to a get method that will show results depending on this lucene string.
The lucene string is in the pattern {fieldName1:value1 fieldName2:value2 ...}
my Global.asax has the followi...
I want to be able to map a route using a URL that doesn't conform to the {controller}/{action}/{id} format. The mapping looks like:
routes.CreateArea("Root", "MyApp.Web.Controllers",
routes.MapRoute("Category-List", "Category/{category}",
new { controller = "Category", action = "List" }),
routes.MapRoute("Default", "{co...
Hi, I have a route in my website for ExportTo :
Shared Sub RegisterRoutes(routes As System.Web.Routing.RouteCollection)
Dim urlPattern As String
Dim categoryRoute As System.Web.Routing.Route
urlPattern = "ExportTo.aspx/{fileName}"
categoryRoute = New System.Web.Routing.Route(urlPattern, New ExportRouteHandler("~/ExportTo.aspx"))
r...
Say that I have to following 2 routes in this order:
Zip:
url: home/:zip
param: { module: home, action: results }
State:
url: home/:state
param: { module: home, action: results }
and I use a route such as:
'@State?state=CA'
Why does it resolve to the Zip route?
I thought when you specified the route name explicitly: '@Stat...
Please consider the following scenario in BizTalk 2006:
Received message should be routed to orchestration or send port according to the following constraints
(Message.Type = "SomeType" AND Message.Sender = "SomeSender")
OR
(Message.Type = "SomeOtherType" AND Message.Sender = "SomeOtherSender" AND Message.IsSigned = true)
OR
(Message.S...
What is the best method in Zend Framework to provide restricted areas and redirect users to a login page? What I want to do is set a flag on my controllers for restricted pages:
class AdminController extends Zend_Controller_Action
{
protected $_isRestricted = true;
....
and have a plugin check to see if the controller is restr...