Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Getting "The resource cannot be found" using href=

Reply
Thread Tools

Getting "The resource cannot be found" using href=

 
 
Tony Girgenti
Guest
Posts: n/a
 
      08-05-2007
Hello.

I have an ASP.NET 2.0 web site with a master page that works fine when i
test it in VS2005, but when i upload it to a live isp site, it gives the
error at the end of this post for one of the links. Here is the line that
has the link:
<div class="readmore"><a href="/CoyneWebServices/File
Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>

I tried putting a tilde"~" after the href=", but it won't allow that line in
the source view.

I also tried using:
<div class="readmore"><a href="CoyneWebServices/File
Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>

<div class="readmore"><a
href="http://www.tonygirgenti.info/CoyneWebServices/File
Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>

<div class="readmore"><a href="/File Maintenance/Warehouses.aspx"
title="More info">&raquo; more</a></div>

Any help would be gratefully appreciated.

Thanks,
Tony



Server Error in '/' Application.
--------------------------------------------------------------------------------

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.

Requested URL: /CoyneWebServices/File Maintenance/Warehouses.aspx




--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210


 
Reply With Quote
 
 
 
 
ThatsIT.net.au
Guest
Posts: n/a
 
      08-05-2007
/CoyneWebServices/File Maintenance/Warehouses.aspx

your link starts with a "/" this means "CoyneWebServices" is a folder in the
root directory, but this may not be the case on your isp.

You may need to use the "../../" addressing

if you have say
/folder1/folder2

and
/folder3/folder4

and you had a file in folder4 that linked to a file in folder2 you would use

.../../folder1/folder2

and you had a file in folder3 that linked to a file in folder2 you would use

.../folder1/folder2

"Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
news:ORjt1%(E-Mail Removed)...
> Hello.
>
> I have an ASP.NET 2.0 web site with a master page that works fine when i
> test it in VS2005, but when i upload it to a live isp site, it gives the
> error at the end of this post for one of the links. Here is the line that
> has the link:
> <div class="readmore"><a href="/CoyneWebServices/File
> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>
> I tried putting a tilde"~" after the href=", but it won't allow that line
> in the source view.
>
> I also tried using:
> <div class="readmore"><a href="CoyneWebServices/File
> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>
> <div class="readmore"><a
> href="http://www.tonygirgenti.info/CoyneWebServices/File
> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>
> <div class="readmore"><a href="/File Maintenance/Warehouses.aspx"
> title="More info">&raquo; more</a></div>
>
> Any help would be gratefully appreciated.
>
> Thanks,
> Tony
>
>
>
> Server Error in '/' Application.
> --------------------------------------------------------------------------------
>
> 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.
>
> Requested URL: /CoyneWebServices/File Maintenance/Warehouses.aspx
>
>
>
>
> --------------------------------------------------------------------------------
>
> Version Information: Microsoft .NET Framework Version:2.0.50727.42;
> ASP.NET Version:2.0.50727.210
>
>



 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      08-05-2007
"Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
news:ORjt1%(E-Mail Removed)...

> I have an ASP.NET 2.0 web site with a master page that works fine when i
> test it in VS2005, but when i upload it to a live isp site, it gives the
> error at the end of this post for one of the links. Here is the line that
> has the link:
> <div class="readmore"><a href="/CoyneWebServices/File
> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>


1) Are you sure it actually exists on the live server...?

2) You have spaces in your URL - avoid that if you possibly can

3) You appear to have omitted the question mark at the beginning of the
QueryString...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      08-05-2007
Tony Girgenti wrote:
> Hello.
>
> I have an ASP.NET 2.0 web site with a master page that works fine when i
> test it in VS2005, but when i upload it to a live isp site, it gives the
> error at the end of this post for one of the links. Here is the line that
> has the link:
> <div class="readmore"><a href="/CoyneWebServices/File
> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>
> I tried putting a tilde"~" after the href=", but it won't allow that line in
> the source view.


You need to put runat="server" in the tag to be able to use the tilde.
The server translates the tilde url to an actual url, so the control has
to be a server control.

<a href="~/CoyneWebServices/File%20Maintenance/Warehouses.aspx"
title="More info" runat="server">&raquo; more</a>

As mark mentioned, an URL should not contain spaces. Although most
browsers doesn't care, a correct URL may not contain spaces.

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
Tony Girgenti
Guest
Posts: n/a
 
      08-06-2007
Hello ThatsIT.

Using your logic, if i have off of the root
"FileMaintenance/Warehouses.aspx"(i removed the space), from the
AppMaster.master(which is in the root), i use
<a href="/FileMaintenance/Warehouses.aspx" title="More info">&raquo;
more</a>

This works OK when uploaded to live site, but does not work when i run it
from VS2005.

Why is that?

Thanks,
Tony

"ThatsIT.net.au" <me@thatsit> wrote in message
news:(E-Mail Removed)...
> /CoyneWebServices/File Maintenance/Warehouses.aspx
>
> your link starts with a "/" this means "CoyneWebServices" is a folder in
> the root directory, but this may not be the case on your isp.
>
> You may need to use the "../../" addressing
>
> if you have say
> /folder1/folder2
>
> and
> /folder3/folder4
>
> and you had a file in folder4 that linked to a file in folder2 you would
> use
>
> ../../folder1/folder2
>
> and you had a file in folder3 that linked to a file in folder2 you would
> use
>
> ../folder1/folder2
>
> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
> news:ORjt1%(E-Mail Removed)...
>> Hello.
>>
>> I have an ASP.NET 2.0 web site with a master page that works fine when i
>> test it in VS2005, but when i upload it to a live isp site, it gives the
>> error at the end of this post for one of the links. Here is the line
>> that has the link:
>> <div class="readmore"><a href="/CoyneWebServices/File
>> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>>
>> I tried putting a tilde"~" after the href=", but it won't allow that line
>> in the source view.
>>
>> I also tried using:
>> <div class="readmore"><a href="CoyneWebServices/File
>> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>>
>> <div class="readmore"><a
>> href="http://www.tonygirgenti.info/CoyneWebServices/File
>> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>>
>> <div class="readmore"><a href="/File Maintenance/Warehouses.aspx"
>> title="More info">&raquo; more</a></div>
>>
>> Any help would be gratefully appreciated.
>>
>> Thanks,
>> Tony
>>
>>
>>
>> Server Error in '/' Application.
>> --------------------------------------------------------------------------------
>>
>> 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.
>>
>> Requested URL: /CoyneWebServices/File Maintenance/Warehouses.aspx
>>
>>
>>
>>
>> --------------------------------------------------------------------------------
>>
>> Version Information: Microsoft .NET Framework Version:2.0.50727.42;
>> ASP.NET Version:2.0.50727.210
>>
>>

>
>



 
Reply With Quote
 
Tony Girgenti
Guest
Posts: n/a
 
      08-06-2007
Hello Mark.

>> 1) Are you sure it actually exists on the live server...?<<

Not sure of what you mean by this. I can see it on the web site using ftp.
I uploaded the whole site using ftp. Its there.

> 2) You have spaces in your URL - avoid that if you possibly can

Removed spaces.

> 3) You appear to have omitted the question mark at the beginning of the
> QueryString...

What query string?

Thanks,
Tony

"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
> news:ORjt1%(E-Mail Removed)...
>
>> I have an ASP.NET 2.0 web site with a master page that works fine when i
>> test it in VS2005, but when i upload it to a live isp site, it gives the
>> error at the end of this post for one of the links. Here is the line
>> that has the link:
>> <div class="readmore"><a href="/CoyneWebServices/File
>> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>

>
> 1) Are you sure it actually exists on the live server...?
>
> 2) You have spaces in your URL - avoid that if you possibly can
>
> 3) You appear to have omitted the question mark at the beginning of the
> QueryString...
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      08-06-2007
"Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
news:(E-Mail Removed)...

>> 1) Are you sure it actually exists on the live server...?<<

> Not sure of what you mean by this. I can see it on the web site using
> ftp. I uploaded the whole site using ftp. Its there.


And is it where it should be in the folder hierarchy...?

>> 3) You appear to have omitted the question mark at the beginning of the
>> QueryString...

> What query string?


Apologies - I didn't read your OP closely enough...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Tony Girgenti
Guest
Posts: n/a
 
      08-06-2007
Hello Goran.

I removed the space and added runat="server" like this:
<a href="~/CoyneWebServices/FileMaintenance/Warehouses.aspx" title="More
info" runat="server">&raquo; more</a>

This still does not work. The source view does not allow it. When i hover
the mouse pointer over it, it says "File
'~/coynewebservices/filemaintenance/warehouses.aspx' was not found."

Thanks,
Tony

"Göran Andersson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Tony Girgenti wrote:
>> Hello.
>>
>> I have an ASP.NET 2.0 web site with a master page that works fine when i
>> test it in VS2005, but when i upload it to a live isp site, it gives the
>> error at the end of this post for one of the links. Here is the line
>> that has the link:
>> <div class="readmore"><a href="/CoyneWebServices/File
>> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>>
>> I tried putting a tilde"~" after the href=", but it won't allow that line
>> in the source view.

>
> You need to put runat="server" in the tag to be able to use the tilde. The
> server translates the tilde url to an actual url, so the control has to be
> a server control.
>
> <a href="~/CoyneWebServices/File%20Maintenance/Warehouses.aspx"
> title="More info" runat="server">&raquo; more</a>
>
> As mark mentioned, an URL should not contain spaces. Although most
> browsers doesn't care, a correct URL may not contain spaces.
>
> --
> Göran Andersson
> _____
> http://www.guffa.com



 
Reply With Quote
 
ThatsIT.net.au
Guest
Posts: n/a
 
      08-06-2007

"Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
news:%(E-Mail Removed)...
> Hello ThatsIT.
>
> Using your logic, if i have off of the root
> "FileMaintenance/Warehouses.aspx"(i removed the space), from the
> AppMaster.master(which is in the root), i use
> <a href="/FileMaintenance/Warehouses.aspx" title="More info">&raquo;
> more</a>
>
> This works OK when uploaded to live site, but does not work when i run it
> from VS2005.
>
> Why is that?



FileMaintenance/Warehouses.aspx

is relitive from where you lcik the link

/FileMaintenance/Warehouses.aspx

is from the root always

>
> Thanks,
> Tony
>
> "ThatsIT.net.au" <me@thatsit> wrote in message
> news:(E-Mail Removed)...
>> /CoyneWebServices/File Maintenance/Warehouses.aspx
>>
>> your link starts with a "/" this means "CoyneWebServices" is a folder in
>> the root directory, but this may not be the case on your isp.
>>
>> You may need to use the "../../" addressing
>>
>> if you have say
>> /folder1/folder2
>>
>> and
>> /folder3/folder4
>>
>> and you had a file in folder4 that linked to a file in folder2 you would
>> use
>>
>> ../../folder1/folder2
>>
>> and you had a file in folder3 that linked to a file in folder2 you would
>> use
>>
>> ../folder1/folder2
>>
>> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
>> news:ORjt1%(E-Mail Removed)...
>>> Hello.
>>>
>>> I have an ASP.NET 2.0 web site with a master page that works fine when i
>>> test it in VS2005, but when i upload it to a live isp site, it gives the
>>> error at the end of this post for one of the links. Here is the line
>>> that has the link:
>>> <div class="readmore"><a href="/CoyneWebServices/File
>>> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>>>
>>> I tried putting a tilde"~" after the href=", but it won't allow that
>>> line in the source view.
>>>
>>> I also tried using:
>>> <div class="readmore"><a href="CoyneWebServices/File
>>> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>>>
>>> <div class="readmore"><a
>>> href="http://www.tonygirgenti.info/CoyneWebServices/File
>>> Maintenance/Warehouses.aspx" title="More info">&raquo; more</a></div>
>>>
>>> <div class="readmore"><a href="/File Maintenance/Warehouses.aspx"
>>> title="More info">&raquo; more</a></div>
>>>
>>> Any help would be gratefully appreciated.
>>>
>>> Thanks,
>>> Tony
>>>
>>>
>>>
>>> Server Error in '/' Application.
>>> --------------------------------------------------------------------------------
>>>
>>> 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.
>>>
>>> Requested URL: /CoyneWebServices/File Maintenance/Warehouses.aspx
>>>
>>>
>>>
>>>
>>> --------------------------------------------------------------------------------
>>>
>>> Version Information: Microsoft .NET Framework Version:2.0.50727.42;
>>> ASP.NET Version:2.0.50727.210
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      08-06-2007
Tony Girgenti wrote:
> Hello Goran.
>
> I removed the space and added runat="server" like this:
> <a href="~/CoyneWebServices/FileMaintenance/Warehouses.aspx" title="More
> info" runat="server">&raquo; more</a>
>
> This still does not work. The source view does not allow it. When i hover
> the mouse pointer over it, it says "File
> '~/coynewebservices/filemaintenance/warehouses.aspx' was not found."
>
> Thanks,
> Tony
>


Acccording to your other posts in the thread, the CoyneWebServices is
not a folder in your solution.

The tilde represents the root folder in your application, not the root
folder of the web, so you should remove CoyneWebServices from the url.

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resource expression to access resource located in library Heinrich Moser ASP .Net 1 03-27-2008 04:25 PM
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
Resource manager problem: naming for embedded resource. Dirc Khan-Evans ASP .Net 1 10-17-2005 12:52 PM
i'm hosed... i'm getting "The resource cannot be found" on remote browsers =?Utf-8?B?amhpbGw=?= ASP .Net 3 12-29-2004 08:15 PM
The system cannot locate the resource specified. Error processing resource avishosh XML 2 08-08-2004 06:28 AM



Advertisments