ASP.NET URL Rewriting
How do I rewrite URL's in ASP.NET? I would like users to be able to goto http://www.website.com/users/smith instead of http://www.website.com/?user=smith ...
How do I rewrite URL's in ASP.NET? I would like users to be able to goto http://www.website.com/users/smith instead of http://www.website.com/?user=smith ...
I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7 and as we all know, IIS6 needs the ".mvc"-naming in the URL. Will this code work to make sure it works on all IIS-versions? Without having to make special adjustments in code, global.asax or config-files for the different IIS-versions. bool usingIntegratedP...
So I'm writing a framework on which I want to base a few apps that I'm working on (the framework is there so I have an environment to work with, and a system that will let me, for example, use a single sign-on) I want to make this framework, and the apps it has use a Resource Oriented Architecture. Now, I want to create a URL routing c...
I've read ASP.NET Routing… Goodbye URL rewriting? and Using Routing With WebForms which are great articles, but limited to simple, illustrative, "hello world"-complexity examples. Is anyone out there using ASP.NET routing with web forms in a non-trivial way? Any gotchas to be aware of? Performance issues? Further recommended reading I s...
I am using the .NET 3.5 SP1 framework and I've implemented URL routing in my application. I was getting javascript errors: Error: ASP.NET Ajax client-side framework failed to load. Resource interpreted as script but transferred with MIME type text/html. ReferenceError: Can't find variable: Sys Which I believe is because my routing is...
I'm developing a PHP website that uses url routing. I'd like the site to be directory independent, so that it could be moved from http://site.example.com/ to http://example.com/site/ without having to change every path in the HTML. The problem comes up when I'm linking to files which are not subject to routing, like css files, images and...
I know in the MVC Framework, you have the Html Class to create URLs: Html.ActionLink("About us", "about", "home"); But what if you want to generate Urls in Webforms? I haven't found a really good resource on the details on generating URLs with Webforms. For example, if I'm generating routes like so: Route r = new Route("{country}/...
I would like to match "approximate" matches in Web.SiteMap The Web.Sitemap static sitemap provider works well, except for one thing. IT'S STATIC! So, if I would have to have a sitemapnode for each of the 10,000 articles on my page like so : site.com/articles/1/article-title site.com/articles/2/another-article-title site.com/articles...
Hi! In my routing I would like to have something like not found route handler. For example I have created one mapping like routes.MapRoute( "default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id="" } ); routes.MapRoute( ...
Hello there! I'm looking for some information on Routing in MVC with C#. I'm currently very aware of the basics of routing in MVC, but what i'm looking for is somewhat difficult to find. Effectively, what I want to find is a way of defining a single route that takes a single parameter. The common examples I have found online is all b...
I test my app only on local cassini web server, and I get strange thing. One Index page works right in default manner, second shows 404, but when use full version Controller/Index - works normal. Only difference I found is that in first sample there is no slash in the end, and in second slash exists, but link that points on corrupted is...
Do I need a separate controller for the below? http://localhost/bookmarks --> bookmarks controller http://localhost/bookmark/{bookmarkid} --> bookmark controller Is there any way I can combine them both into one controller? I want to keep the uri's the same i.e. bookmark singular indicating fetch a single bookmark. Thanks ...
Hi, I have a special url which I would want only few people to have access to. I have a list of super users stored as an array in the app.yml. How can I use this array in :requirements section of a specific route in the routes.rb file to allow only those super users access to this route? Thanks a lot. ...
Hi, I am looking in to ways to enable a site to basically have something like: http://mysite.com/en-US/index.aspx` Where the "en-US" can vary by culture.. This culture in the URL will then basically set the CurrentUICulture for the application.. Basically, we currently have a page where the user explicitly clicks it, but some are fa...
I am writing a tinyurl clone to learn turbogears. I am wondering how do i redirect my browser to the external website (say www.yahoo.com) from my cherrypy/turbogears app? I googled about it, but could not find much useful info. ...
I am working on a project that needs to use a database driven MVC scheme where the route to the controllers and views are controlled through a single database table. However, I haven't been able to find any tutorials that demonstrate this with a current version of the framework (they all appear to have been written several versions ago) ...
I'm setting up a site where users have their own "profile". I'm using routes for neat URLs and I wondered what are the pros/cons to the following: example.com/:username Or should I include a static route to filter that it's a profile page request? example.com/u/:username example.com/something-static/:username Which is best? ...
For example: http://stackoverflow.com/questions/396164/exposing-database-ids-security-risk and http://stackoverflow.com/questions/396164/blah-blah loads the same question. (I guess this is DB id of Questions table? Is this standard in ASP.NET?) What are the pros and cons of using this type of scheme in your web app? ...
UPDATE - 1/21/09: The only way I've been able to get this working moderately well is to create routes that have additional path info... in other words instead of http://company.com/myDepartment/myTeam/action/id, the routes need to be built to handle paths like http://company.com/department/myDepartment/team/myTeam and so on. END UPD...
I am having problems with thinking up a solution for the following. I got a blog which I recently upgraded from web forms to MVC. The blog is avalible in both swedish and english on two different domains and are running in the same web site in IIS. The problem is that I would like language specific urls on the both sites, like this: En...