Web Forms :: Dev Web Server Problem Distinguishing URLs
Jul 22, 2010
I think there is a bug with the asp.net developement web server. If I store a url in a field for example ../attachments/650/403.pdf and try to poplulate a link with this data the correct url should be: http://localhost:60242/myweb/attachments/650/403.pdf. However the dev server omits the myweb part so the url fails. If I compile and move the code to an IIS website the correct url is produced. This makes developing more difficult. I tried using ../attachments/650/403.pdf but the dev web server failed to distinguish this also.
View 2 Replies
Similar Messages:
Nov 16, 2010
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]...
View 1 Replies
Apr 29, 2010
I'm debugging a site that is deployed to the site root on the production server, but in my local copy, under the built-in, debugging web server, the URL's include the 'site name'. E.g. my local site is 'PVLive', so all URL's are 'localhost:nnnnn/PVLive/mmmm.aspx'. Certain URL's are hard coded in the site's pages to use paths relative to the root, e.g. I get errors when code tries to redirect to 'localhost:nnnnn/Index.aspx'.
Can I do something to keep the 'PVLive' site name out of the URL's?
View 3 Replies
Jun 23, 2010
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"
View 3 Replies
Mar 13, 2011
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.
View 2 Replies
Jan 4, 2011
(I have tested this with a vanilla asp.net site running from the webdev server and it is a problem here also):
I have the following markup in my .master file
[code]....
Clearly Asp.Net does something to encode the url. As it happens, I really need the head tag to be runat="server" and I would also like to be able to have "&" in link-urls within it is there some trick I can use to have my cake and eat it too?
View 2 Replies
Jul 20, 2010
want to store all urls along with parameters came through http protocol of a web site in a file.
looking for code .net c#.
View 5 Replies
Sep 29, 2010
I have a gread problem. i want eliminate aspx extension from the end of my application pages url but i dont know how i can do it that it works for all of the pages and the pages that maybe will add in future. i think i should write a rewrite rule in web.config or do it in IIS but i dont know how it is possible.
View 2 Replies
Jun 3, 2010
i have a website that generates urls dynamicly.(?Department=1&Category=4&Page=2) then i rewrite the url to (Phone-d1/Sony-Ericsson-c4/)
I have hunderds of products so how do i create a sitemap for this, or should i doit only for the Departments, if so how would i do it.
View 2 Replies
Jan 21, 2010
and when user click the link take the user to the link.
i know how to do this if i have to direct teh user to a web page and from that page fetch news article title and news article body from database depending on a news article id.
[Code]....
now i have PDF versions of news. i like to show a list of this titles and when the users clicks open the PDF files.
View 5 Replies
Jun 7, 2010
I have a Table with a column containing Site Urls.
Eg. http:/Root1/Site1
http://Root1/Site2
http:/Root2/Site1
http:/Root3/Site3 ......... upto n number of sites.
I want to dynamically create a tree view from this Site Url data Such that Sub-sites are under there parent site.
View 7 Replies
Feb 15, 2010
I'm not sure that what I need to do is possible.I'm using the SQL SiteMap Provider as the source for my main navigation menu. When a user hits my site, they are asked to enter their location (town name). This preference setting is being stored using the Profile Provider. The page then reloads to showwww.mysite.com/liverpool in the address bar, for example. The information shown on this page is relevant to where they are. I'm using URL rewriting to map this to a page that is passed a parameter (eg. viewZone.aspx?ZoneID=234). I now need to insert the town name into some of the URLs generated from the sitemap. For example:www.mysite.com/cars-for-salewould becomewww.mysite.com/liverpool/cars-for-saleSome URLs would need to remain unchanged such as www.mysite.com/shop.Do you know if this is possible? If needed I could put a placeholder inside the URL in the database - **townName**/cars-for-sale and then run some kind of replacement procedure at run-time, but I don't know where in the execution process I could do that.
View 5 Replies
Feb 16, 2011
I want to rewrite something like this:
www.webaddress.com/article.aspx?date=150211&title=title-of-news-article
to this:
www.webaddress.com/150211/title-of-news-article
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...
View 6 Replies
Dec 16, 2010
I need to Encrypt the URLs in my ASP.NET MVC application.
Do I need to write the code in Global page in Route Collection to Encrypt all the URLs?
View 1 Replies
Feb 17, 2011
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
<rewrite url="^/Abc" to="~/abc.aspx" processing="stop"/>
<rewrite url="^/Abc_123" to="~/abc-123.aspx" processing="stop"/>
But links like following fail to redirect and i get 404 errors
<rewrite url="^/Abc/(.*/)" to="~/abc.aspx?id=$1" processing="stop"/>
<rewrite url="^/XYZ" to="~/xyz.aspx?cat=school" processing="stop"/>
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.
View 1 Replies
Feb 22, 2011
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?
View 4 Replies
Feb 28, 2010
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.
[Code]...
View 1 Replies
May 2, 2010
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?
View 3 Replies
Sep 2, 2010
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
View 2 Replies
Feb 23, 2010
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 ?
View 6 Replies
Aug 12, 2010
i want to convert my dynamic urls to static urls.
I dont have apache installed on my server so it cant be through .htaccess re-write.
Here is the example what i want :
[URL]
I want to change all odds.asp pages to static URLs.My previous posts and new posts too.
Here is my odds.asp file
[URL]
View 1 Replies
Dec 2, 2010
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?
View 7 Replies
Jan 6, 2010
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:
http://forums.asp.net/AddPost.aspx?ForumID=15
http://forums.asp.net/AddPost.aspx?ForumID=15/helloworld.asp
http://forums.asp.net/AddPost.aspx?ForumID=15/helloworld.asp/byeworld.html
Now if I captured the first url, how can I avoid collecting the next few since they are not technically duplicates.
View 2 Replies
Mar 25, 2010
I want a regex expression which only match extensionless url. In otherwords if an extension is present in url then completely ignore it.
/(.+)/(.+) this will match an URL both with and without extension.
www.site.com/sports/cricket should match
www.site.com/sports/cricket.aspx shouldn't match
View 3 Replies
May 26, 2010
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.
View 2 Replies