I am working on a website in which many users can create their account and have a personalized page. I wish to provide them a twitter like url to access their pages, for example www.mysite.com/smith or www.mysite.com/john . I am using asp.net mvc 1.0. I have an understand that i can add routes to the global.asax file, but i am not able to figure out how to add a route that will work for such urls.
I've done a lot of searching trying to figure this out: I am soon to develop an app using Personalized URLs in ASP .Net. Thankfully we are going to use the mysite.com/user1, mysite.com/user2 approach, as I can find plenty of info on making that happen using URL rewrites. However, in the post @ http://forums.asp.net/p/1259856/2842613.aspx#2842613 there is someone asking if there is a way to do something along the lines of user1.mysite.com, but dynamically. In the post there are answers that it can be done, but they are not very clear. I presented this my supervisor who then asked how does this work with DNS and I shrugged my shoulders and did the Scooby-Doo "I don't know" sound (rye-ron't-row)...
i have a function that pulls URLs from various web resources. needless to say some are full valid URLS and some are relative as per the HTML of the page. below is my asp.net/ c# logic i derived for examining the URL and then generate a full usable URL from whats pulled from the site...
NOTE: origianlurl is the full url of the first searched page, and relativeUrl is a url found within the searched page (it can be a full www.site.com or a /contactus.html) private string ResolveRelativePaths(string relativeUrl, string originatingUrl) { if (relativeUrl.StartsWith("http") || relativeUrl.StartsWith("www")) return relativeUrl; if (relativeUrl.StartsWith("/")) { //get main url something.com [code]...
our web application should be hosted under proxy server, for that we had to change our URL to be relative.
we changed all the url's but then we saw that web resources that are embeded in the .net dll's are being written to the page with absolute path, start with "/" for example:
[Code]....
how can we change it? how can we set the web resource to be relative like this "../webresource.axd"
I have an MVC web application, the urls like following in my views folder:
<img src="../../Images/Delete.png"/>
are working on my localhost, but when I deployed the application on production server, they stopped working and when I use single ".." instead of double "../.." , they start working on production server.
I've been able to create a cool little website, it's up and running with users logging in and out, I created roles so my administrative team can see sensitive data that's not available to regular and anonymous users.
Now they would like me to create a page specific to each user. For instance when user A logs in they are redirected to a page that has information that pertains to user A only (like a list of their benefits/ their remaining vacation time). This page needs to be accessible only to user A.
I have a website with a home page using web parts and can be personalized. One thing that we need is to track the usage of each web parts i.e. How many users are using each web parts.
When I go to check in the database, there the whole Personalized page is saved as a Binary Data. The info regarding each webparts is not saved.
Even to achieve the first link above, I need to replace capital letters and non-standard characters like é with e, and replace spaces with hyphens. Is all of this possible using URL Rewrite Module 2.0 or might I be better off coding some ASP? I'm new to .net and may have to do something in classic if I struggle. And I only just get by in ASP...
I've tried some of the tutorials on the official IIS website and have got through a simple rewrite wizard, but replacing characters seems more complicated, and I'm sure some of the tutorials have errors in them...
I have a application which uses intelligencia urlrewriter to rewrite urls into seo friendly urls. Blog engine is integrated in this application under subfolder but shares webconfig with my application. Application runs perfectly on development server, but when i publish it to 2008/IIS7 server urls links don't work. Links similar to following work
Anything which has query parameters in aspx url fails. I'm not sure what is causing this error on 2008/IIS 7 server and not on my VS 2008 development server.
I am using asp.net and when I type a bad url manually(in the browser) it gives me: The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. I want a bad url that doesn't exist to be re-directed to the home page. How do I do this?
I am using the NerdDinner project to experiment with MVC. http://nerddinnerbook.s3.amazonaws.com/Intro.htmI have put an image map on the front page and cannot work out how to generate the urls for it.
if I choose without dash, when I try to access [URL] it will return a 301 to the link without dash: [URL] The question is, how can I do that with ASP.NET MVC?
I know the default routes in MVC include an id param which often maps to the identity of an entity as it's stored in the database. Now, often this is OK, but what about when you don't want someone to be able to manipulate it? Quite frankly, on many business apps this is very common. For example, you don't want someone to change the account number (not the best example, but you get the idea) in the URL for obvious reasons. So, you would need to validate the account number against the logged in user on every request. Obviously, that is not a realistic solution, and in webforms many people would store something like that in session. I am trying to rely on session very little in MVC, but aside from that would I just go old school and use hidden fields
What is the best way to implement friendly urls in asp.net 2.0 for example I have http://www.predatorsfc.org/BrowseThreads.aspx?ForumID=23 and would to like add the forum title to the url to make the url more user friendly ?
My site was working fine before I starting working on incorporating URL redirection/rewriting. I have tried to preface all the URLs for graphic images and navigate URLs with a tilde and a slash ("~/"). However, now that I'm using rewriting on many of my pages, if the number of folders in the URL is 2 or less (such as MyDomain.com/Title/Author), it finds the graphics files without any problems, like before. When I view page source, I see that the HTML is calling for relative URLs that start with "../../", which is why it works for 2 or less folders in the URL. When there are 3 or more folders (such as MyDomain.com/Title/Author/Category), then it doesn't display the graphics files.
why I'm getting these relative URLs and so the files are not displaying correctly at times?
I have a program that parser html and collecting urls. The problem is when checking for duplicates before I add them to an arraylist is that I cannot distinguish between types of the following format:
I've been using the LongURL.org API for expanding short URLs. The great thing about this service is that it returns a long URL, the title of the actual page and meta-info.The real problem I have is that it seems to take an inordinate amount of time to fetch the data. I'm considering shifting the request to JavaScript so that the URL is fetched via an AJAX update panel, in order that the page loads quickly, and the URL data is updated while the user looks at the content (some search results).Does anyone know how else I could gather the info described above, n a better time-frame? I'm using C# ASP.NET but would consider solutions in other languages.
I am interested in the architecture of a CMS where i can pass a full URL instead of a query string. I would like to make a site that could handle a request to any page... Say'http://www.my-domain.com/directory/page.aspx'and have the resulting response deliver a generic page/file.I would like the request to be passed through an XML document where i could store page names and the corresponding file to render content...
How would you accomplish these in ASP.NET Webforms 4.0 Routing;.aspx pages should not be accesible directly, pages should be accesible only with routes, Start page should be "/" or "/home" or something else, but not "Default.aspx".
home/page1 gallery/image1 info/IT/contact home/page2 home/page3 gallery/image2 info/IT/map and so on.
I would like to arrange the above urls into a tree fashion as shown below (each item will be a url link). The final output would be a simple HTML List (plus any sub list(s))
thus:
home gallery info page1 image1 IT page2 image2 contact page3 map
Programming Language is C# , platform is asp.net
EDIT 1:
In the above example, we end up with Three Lists because in our example there is three main 'groups' eg: home, gallery, info.
I have recently updated a website. All of the urls have changed. Now I get traffic to old urls that doesn't exist anymore. However, most of these url's have corresponding pages on the new site. I believe most of the traffic to the old urls are spiders. What would be the correct way to handle this?
Preferably I'd like a solution that gives a nice experience for the real users if they type in an old url (or use an old bookmark they've made) but that also notifies the spiders of the change of url, so that they can update their registers. However, if the two are hard to combine, the last one is prioritized (since most of the traffic is spiders). I'm using ASP.NET