Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Use Image in asp:HyperLink - Gets Resource ErrorUse Image in asp:HyperLink - Gets Resource Error
Previous
 
Next
New Post
7/9/2006 8:48 PM
 

I'm trying to use an image in my custom module to direct to another control via EditURL.  The gridview works perfectly wiith a Hyperlink until I add the ImageURL parameter.  This is on a 4.0.2 version system.  It then gives me this error:

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: /dev_dnn/Default.aspx

And flags two errors each time in the logs:

  7/9/2006 7:42:49 PM   General Exception       AssemblyVersion: 04.00.02; Method: DotNetNuke.HttpModule ...
AssemblyVersion: 04.00.02
Method: DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest
FileName:
FileLineNumber: 0
FileColumnNumber: 0
PortalID: -1
PortalName:
UserID: -1
UserName:
ActiveTabID: -1
ActiveTabName:
AbsoluteURL: /dev_dnn/Default.aspx
AbsoluteURLReferrer:
ExceptionGUID: f346bf7b-bca9-415e-8706-93a1d904bfcf
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
InnerException: Unhandled Error:
Message: System.Exception: Unhandled Error: ---> System.Web.HttpException: Not Found at DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --- End of inner exception stack trace ---

7/9/2006 7:42:49 PM   Page Load Exception   host     AssemblyVersion: 04.00.02; Method: System.Web.Util.UrlPa ...
AssemblyVersion: 04.00.02
Method: System.Web.Util.UrlPath.ReduceVirtualPath
FileName:
FileLineNumber: 0
FileColumnNumber: 0
PortalID: 0
PortalName: My Website
UserID: 1
UserName: host
ActiveTabID: 57
ActiveTabName: Test
AbsoluteURL: /dev_dnn/Default.aspx
AbsoluteURLReferrer:
ExceptionGUID: 238287e0-e57d-4b86-96d0-9ed15e417c8b
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
InnerException: Cannot use a leading .. to exit above the top directory.
Message: DotNetNuke.Services.Exceptions.PageLoadException: Cannot use a leading .. to exit above the top directory. ---> System.Web.HttpException: Cannot use a leading .. to exit above the top directory. at System.Web.Util.UrlPath.ReduceVirtualPath(String path) at System.Web.Util.UrlPath.Reduce(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.UI.Control.ResolveClientUrl(String relativeUrl) at System.Web.UI.WebControls.Image.AddAttributesToRender(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.WebControls.HyperLink.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.WebControls.TableCell.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.WebControls.Table.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.GridView.Render(HtmlTextWriter writer, Boolean renderPanel) at System.Web.UI.WebControls.GridView.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at DotNetNuke.Entities.Modules.PortalModuleBase.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl........ (more follows)

Here's the ascx page code:

<asp:HyperLink ID="enrollmentView" runat="server" NavigateUrl='<%# EditUrl("ItemID", Eval("ItemID").ToString(), "ViewEnrollment") %>' ImageUrl="~/DesktopModules/PDSessions/images/view.gif"></asp:HyperLink>

I'm lost as to why the addition of an ImageURL in the tag causes this - VS2005 validates it and builds the page without any problems, but DNN is acting as if I'm referencing a file outside of the root. 

Does anyone have any idea of a fix?  Thanks in advance...

 
New Post
7/12/2006 6:17 PM
 

No one has any ideas?  I can add the image to the grid if I don't embed as a part of the link - but I should not have to do this.  I need to set the visibility of this link image based on teh value of the field in the link, and that is erroring out if it is not tied to the link (perhaps I'm code blind and am missing the error for an alternate method). 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Use Image in asp:HyperLink - Gets Resource ErrorUse Image in asp:HyperLink - Gets Resource Error


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out