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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Error: Exception has been thrown by the target of an invocationError: Exception has been thrown by the target of an invocation
Previous
 
Next
New Post
4/9/2009 10:32 PM
 

I'm building an eCommerce site using DNN vertion 5. The site requires SSL certificate on some pages, special to the products registration page.

The site url is a normal url, something like http://www.myecommerce.com. When user has navigated to the site which the url, and then go to the product registration page, the site will redirect "http://www.myecommerce.com/productregistration.aspx" to https://www.myeommcerce.com/productregistration.aspx". To do that, i have  inserted below code in the skin file:

<script runat="server">
    Protected Sub btnReservation_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        If Not (Me.Request.IsSecureConnection) Then
            Dim serverName As String = HttpUtility.UrlEncode(Request.ServerVariables("SERVER_NAME"))
            Dim filePath As String = "/Reservations.aspx"
            Response.Redirect("https://" + ServerName + filePath)
        End If
    End Sub
</script>

As you see, the page has a link which is a server LinkButton like "<asp:LinkButton runat="server" ID="btnReservation" Text="RESERVATIONS"
                        CssClass="main_menu" onclick="btnReservation_Click"></asp:LinkButton>"

When user click on RESERVATIONS link, the page will redirect from http to https to be over SSL.

But when user click the link button, a exception has occured, something like "Exception has been thrown by the target of an invocation"

I have traced the exception, and see that the exception has occured at the first line in the method OnInit in the file admin/Skins/Nav.ascx.vb

Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
            InitializeNavControl(Me, "SolpartMenuNavigationProvider")
            AddHandler Control.NodeClick, AddressOf Control_NodeClick
            AddHandler Control.PopulateOnDemand, AddressOf Control_PopulateOnDemand
            MyBase.OnInit(e)
 End Sub

I have tried a lot but i haven't found a solution for the problem.

Please help me, thank you very much !


 

 

 

 
New Post
4/10/2009 10:34 AM
 

nguyen uy hung wrote
I'm building an eCommerce site using DNN vertion 5. The site requires SSL certificate on some pages, special to the products registration page.

There's a much easier way already built in to DNN.

First, login as host and goto Host|Portal Settings and edit the portal you are using. Under Avanced Settings, SSL Settings, click SSL Enabled and SSL enforced and click update.

Then select Admin|Pages and select the page that you want secured and select edit. Under advanced settings, click secure, then update.

Repeat this for any pages you need and that should do it.

I hope this is of some help to you.

 


Dwayne J. Baldwin
 
New Post
5/26/2009 3:22 AM
 

i found the same error when i use third party control, grid control. This error throw when the control try to post back. Anyone can explain about this error?

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Error: Exception has been thrown by the target of an invocationError: Exception has been thrown by the target of an invocation


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