Local Website for IFrame

Last post 01-25-2006 1:26 PM by v053884. 10 replies.

Sort Posts:

  • Local Website for IFrame

    09-08-2005, 7:40 PM
    • Member
      20 point Member
    • Mikeyt21
    • Member since 09-02-2005, 6:29 PM
    • Posts 4
    Hi, I am using Dot Net Nuke to develop a company intranet. I would like to create an IFrame with a website running off of the localhost server.
    Whenever I try to do this dotnetnuke complains that "You Must Enter a Valid URL".

    How can I get around this problem?

    Thanks!
  • Re: Local Website for IFrame

    09-09-2005, 12:25 AM
    • Star
      9,364 point Star
    • xddg
    • Member since 12-10-2002, 3:09 PM
    • Melbourne
    • Posts 1,874
    • TrustedFriends-MVPs

    I haven't tried this but have you tried an IP address based url? 

    Nina Meiers

    Nina Meiers


    Free Skins & Containers by Nina Meies
  • Re: Local Website for IFrame

    09-09-2005, 3:01 AM
    • Contributor
      7,345 point Contributor
    • nbc
    • Member since 06-29-2002, 12:06 AM
    • Perth, Western Australia
    • Posts 1,469
    The IFrame module won't accept localhost or 127.0.0.1 because of its validation setting, so you need perhaps to to use the server name? Alternatively you could add a text module and in html mode add

    <iframe src="http://localhost/whatever" width="200" height="200"></iframe> .
  • Re: Local Website for IFrame

    09-09-2005, 7:50 AM
    • Member
      410 point Member
    • Bill Mason
    • Member since 06-22-2005, 7:44 PM
    • Winston Salem, NC
    • Posts 82
     Mikeyt21 wrote:
    Hi, I am using Dot Net Nuke to develop a company intranet. I would like to create an IFrame with a website running off of the localhost server.
    Whenever I try to do this dotnetnuke complains that "You Must Enter a Valid URL".

    How can I get around this problem?

    Thanks!


    Hi,

    I ran into the same problem trying to use  a relative path.  I finally entered any legal URL that it would take.  While still in the iframe edit mode, I looked at the url at the top of the page and noted the moduleID.  I went into SQL server and opened the modulesettings table.  Then just find the record for the tablid for the iframe and look for the "src" record and edit it directly.

    Bill
  • Re: Local Website for IFrame

    09-09-2005, 12:59 PM
    • Member
      20 point Member
    • Mikeyt21
    • Member since 09-02-2005, 6:29 PM
    • Posts 4
     Bill Mason wrote:
     Mikeyt21 wrote:
    Hi, I am using Dot Net Nuke to develop a company intranet. I would like to create an IFrame with a website running off of the localhost server.
    Whenever I try to do this dotnetnuke complains that "You Must Enter a Valid URL".

    How can I get around this problem?

    Thanks!


    Hi,

    I ran into the same problem trying to use  a relative path.  I finally entered any legal URL that it would take.  While still in the iframe edit mode, I looked at the url at the top of the page and noted the moduleID.  I went into SQL server and opened the modulesettings table.  Then just find the record for the tablid for the iframe and look for the "src" record and edit it directly.

    Bill


    I haven't tried this yet, but if it works as you say it does, what is the point of having this built-in check for the IFrame?
    Hopefully, it wasn't included to annoy intranet users :)
  • Re: Local Website for IFrame

    09-09-2005, 2:25 PM
    • Member
      410 point Member
    • Bill Mason
    • Member since 06-22-2005, 7:44 PM
    • Winston Salem, NC
    • Posts 82
    Mikeyt21,

    I guess that is kind of funny.  I just ran into a problem and did what I needed to do to solve it.  It never occurred to me to mention it to someone.
    Bill
  • Re: Local Website for IFrame

    09-09-2005, 9:43 PM
    • Contributor
      7,345 point Contributor
    • nbc
    • Member since 06-29-2002, 12:06 AM
    • Perth, Western Australia
    • Posts 1,469
     Mikeyt21 wrote:

    I haven't tried this yet, but if it works as you say it does, what is the point of having this built-in check for the IFrame?
    Hopefully, it wasn't included to annoy intranet users :)


    It is a simple validation script that checks for a valid url ie 'http://+something+dot=something' which of course localhost fails on. So no great conspiracy here...

    Apart from the workarounds  Bill and I suggested you could also open the EditIFrame.ascx file in DesktopModules/IFrame and comment out the relevant bit;
    <asp:regularexpressionvalidator id="valURL" runat="server" cssclass="NormalRed" controltovalidate="txtSrc" errormessage="You Must Enter a Valid URL"
        display="Dynamic" resourcekey="valURL.ErrorMessage" validationexpression="^((http|https)\://)?[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&amp;%\$#\=~])*[^\.\,\)\(\s]$"></asp:regularexpressionvalidator> 
  • Re: Local Website for IFrame

    09-10-2005, 12:31 PM
    • Member
      372 point Member
    • Kabelsalat
    • Member since 08-08-2005, 9:27 PM
    • Bodensee / Deutschland
    • Posts 74
    Simply change validationexpression intovalidationexpression="^((http|https)\://)?(([a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3})|(localhost))(:\d+)?/?[a-zA-Z0-9\-\._\?\,\'/\\\+\&\;%\$#\=~]*[^\.\,\)\(]*$"

    if you do so, also localhost will be excepted!



  • Re: Local Website for IFrame

    09-11-2005, 1:36 AM
    • Contributor
      6,286 point Contributor
    • smehaffie
    • Member since 09-28-2002, 12:36 AM
    • Posts 1,265
    I guess my question is why do you want to do this.  If a user access the page with the iframe to localhost they user will get an error becuase of the following:

    1) They do not have IIS installed.
    2) If they do have IIS isntalled, then they probably do no have the site setup on thier computer.

    Unless this is a page that will just be accessed on the web server, I don't see how this will work even if you can enter localhost in the URL.

    S. Shawn Mehaffie
    PC Resources, LLC
  • Re: Local Website for IFrame

    10-03-2005, 12:09 PM
    • Member
      15 point Member
    • luisvelasco
    • Member since 08-15-2002, 9:34 AM
    • Tucson
    • Posts 3

    The issue is that developers sometimes have to test before releasing to production. I had the same problem with the validation string; I had to remove the entire line to accept my url. When DNN is being released as a INTRANET portal, the URL can be Many things. It can be a pointer to a document, ip, localhost, asp, aspx, webforms etc. I guess, the more validations DNN has,m the more limitations as well. Sometimes it is not possible to control users, let the users control themselves.

    Thanks

    Luis Velasco

     

  • Re: Local Website for IFrame

    01-25-2006, 1:26 PM
    • Member
      45 point Member
    • v053884
    • Member since 01-18-2005, 1:40 PM
    • Posts 9

    I tried this, commented out the suggested code:

    <!--

    <asp:regularexpressionvalidator id="valURL" runat="server" cssclass="NormalRed" controltovalidate="txtSrc" errormessage="You Must Enter a Valid URL"

    display="Dynamic" resourcekey="valURL.ErrorMessage" validationexpression="^((http|https|file)\://)?[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&amp;%\$#\=~])*[^\.\,\)\(\s]$"></asp:regularexpressionvalidator>

    -->

    It now allows any values, but does not allow the page to UPDATE.  In other words, it breaks the functionality of the page, somehow.

Page 1 of 1 (11 items)