SB Development License Image Paths

Last post 09-30-2010, 11:07 PM by Eric. 2 replies.
Sort Posts: Previous Next
  •  09-28-2010, 8:01 AM 64220

    SB Development License Image Paths

     
    I have a Small Business (10 Domains)  licensed copy of the Cute Editor for .Net. I wish to take advantage of using the http://localhost/webapplication ability for development. I have confirmed that development using http://localhost/webapplication does work for me with my license. However, I'm having trouble getting past one item that I'm sure you or other customers have come across a solution for.
     
    My production site might be: http://www.mydomain.com
     
    My Dev site site would be: http://localhost/webapplication
            with webapplication configured as a Virtual Directory under IIS 6.0 as an application (allowing scripts).
     
    My issue is this. When using the Cute Editor and an image is added to the html using the pre-built image managers in your tool, it is given a path of "/webapplication/images/myimage.jpg" in the <img> tag. Everything works fine while in the "Dev" environment and image is shown just fine. But when I move to PROD and wish to drop the "webapplication" from the URL and use strictly the Domain Name as the root URL, the images are not found because the path for the images becomes http://www.mydomain.com/webapplication/images/myimage.jpg. The correct path should be http://www.mydomain.com/images/myimage.jpg.
     
    It seems that the easiest solution would be to configure IIS on the "Dev" environment to define the web site root path as http://localhost/webapplication and not http://localhost as it appears to be doing. That way, your Image Inserter would pick up that root path and not add"/webapplication" as a prefix to it's path for the images. Then my site content can move from DEV -> PROD without any pathing issues. That said, I have not found a way to configure IIS to understand that http://localhost/webapplication should be the root path.
     
    An alternative solution would be to take one of my ten allowed domains and use it exclusively for DEV. If possible, I would not use a domain for this purpose on DEV but an IP with ports to allow me to have many "web applications" available at a time. How can I get that to work? This is probably my preferred solution because it allows me to demo the site for my customers using an external IP. Is that allowed with my license?
     
     
  •  09-30-2010, 3:08 PM 64276 in reply to 64220

    Re: SB Development License Image Paths

    vballboa,
     
    You need to use the following property:

    BaseHref
    Sets or retrieves the baseline URL on which relative links will be based.
     
    Demo:
     
     
    Keep me posted

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-30-2010, 11:07 PM 64282 in reply to 64276

    Re: SB Development License Image Paths

    Dear vballboa,
     
    When you move to production enviornment, you can use filter to drop the "webapplication" from the URL, you only need add the following highlighted code in your production enviornment: 
     <%@ Page Language="C#"%>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
        <head> 
     </head>
     <body>
            <form id="Form1" runat="server">   
           <CE:Editor id="Editor1"  URLType=Absolute runat="server" ></CE:Editor>
     br />
      </form>
      <script type="text/javascript">
          function CuteEditor_FilterHTML(editor, code) {
              return code.replace("localhost/webapplication", "www.mydomain.com");
               //please change these two parameters based on your  actual situation. 

          }
          function CuteEditor_FilterCode(editor, code) {
              return code.replace("localhost/webapplication", "www.mydomain.com");
          }   
           </script>  
     </body>
    </html>
    <script runat="server">
     void Page_Load(object sender, System.EventArgs e)
      {   
      }
    </script>
     
    Thank you for asking
    Eric@cutesoft.net  
View as RSS news feed in XML