Aero 2007 Issue

Latest post 06-16-2007 8:17 AM by Nick. 29 replies.
  • 04-01-2007 4:48 PM In reply to

    • Tommyweather
    • Top 10 Contributor
    • Joined on 02-07-2006
    • Quakertown, PA
    • Posts 66
    • Points 730

    Re: Aero 2007 Issue

    I tried your adjustment and had no success.

    Server Error in '/' Application.

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS1525: Invalid expression term '/'

    Source Error:


    Line 22:                 Graphics g = Graphics.FromImage(pic);
    Line 23: g.SmoothingMode = SmoothingMode.AntiAlias;
    Line 24: g.DrawImage(Image.FromFile(context.Server.MapPath(/SiteFiles/1000/background.PNG)), 0, 0, y, x),
    Line 25: context.Response.ContentType = "image/jpg";
    Line 26: pic.Save(mem, ImageFormat.Jpeg);

    Source File: c:\HostingSpaces\tloker\test.absolutepigskin.com\wwwroot\bg.ashx    Line: 24


    function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == 'none') { elemLevel2.style.display = ''; } else { elemLevel2.style.display = 'none'; } }


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

     

    • Post Points: 0
  • 04-01-2007 4:53 PM In reply to

    • Tommyweather
    • Top 10 Contributor
    • Joined on 02-07-2006
    • Quakertown, PA
    • Posts 66
    • Points 730

    Re: Aero 2007 Issue

    This is what I'm using

    <%@ WebHandler Language="C#" Class="GenericHandler1" %>

    using System;
    using System.Web;
    using System.IO;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Drawing.Imaging;

    public class GenericHandler1 : IHttpHandler {
      
        public void ProcessRequest (HttpContext context) {
            if (context.Request.QueryString.Keys.Count == 1)
            {
                try
                {
                    int x, y;
                    y = Convert.ToInt32(context.Request.QueryString.Keys[0].Split('x')[0]);
                    x = Convert.ToInt32(context.Request.QueryString.Keys[0].Split('x')[1]);
                    MemoryStream mem = new MemoryStream();
                    Bitmap pic = new Bitmap(y, x);
                    Graphics g = Graphics.FromImage(pic);
                    g.SmoothingMode = SmoothingMode.AntiAlias;
                    g.DrawImage(Image.FromFile(context.Server.MapPath(/SiteFiles/1000/oakwood2.png)), 0, 0, y, x);
                    context.Response.ContentType = "image/jpg";
                    pic.Save(mem, ImageFormat.Jpeg);
                    mem.WriteTo(context.Response.OutputStream);
                    pic.Dispose();
                }
                catch (Exception ex)
                {
                    context.Response.Write(ex.ToString());
                }
            }
            else context.Response.Redirect("~/");
        }
     
        public bool IsReusable {
            get {
                return false;
            }
        }

     

    This is the error I get when trying to visit http://test.absolutepigskin.com/bg.ashx?800x600=1

    Server Error in '/' Application.

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS1525: Invalid expression term '/'

    Source Error:


    Line 22:                 Graphics g = Graphics.FromImage(pic);
    Line 23: g.SmoothingMode = SmoothingMode.AntiAlias;
    Line 24: g.DrawImage(Image.FromFile(context.Server.MapPath(/SiteFiles/1000/oakwood2.png)), 0, 0, y, x);
    Line 25: context.Response.ContentType = "image/jpg";
    Line 26: pic.Save(mem, ImageFormat.Jpeg);

    Source File: c:\HostingSpaces\tloker\test.absolutepigskin.com\wwwroot\bg.ashx    Line: 24


     

     

    • Post Points: 0
  • 04-02-2007 3:38 AM In reply to

    • Nick
    • Top 10 Contributor
    • Joined on 10-11-2005
    • Gilwern, S.Wales, Uk
    • Posts 2,603
    • Points 19,725

    Re: Aero 2007 Issue

    Tommyweather:

    I tried your adjustment and had no success.

    Server Error in '/' Application.

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS1525: Invalid expression term '/'

    Source Error:


    Line 22:                 Graphics g = Graphics.FromImage(pic);
    Line 23: g.SmoothingMode = SmoothingMode.AntiAlias;
    Line 24: g.DrawImage(Image.FromFile(context.Server.MapPath("/SiteFiles/1000/background.PNG")), 0, 0, y, x),
    Line 25: context.Response.ContentType = "image/jpg";
    Line 26: pic.Save(mem, ImageFormat.Jpeg);

    Source File: c:\HostingSpaces\tloker\test.absolutepigskin.com\wwwroot\bg.ashx    Line: 24


    function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == 'none') { elemLevel2.style.display = ''; } else { elemLevel2.style.display = 'none'; } }


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

     

    • Post Points: 0
  • 04-04-2007 7:37 AM In reply to

    • Tommyweather
    • Top 10 Contributor
    • Joined on 02-07-2006
    • Quakertown, PA
    • Posts 66
    • Points 730

    Re: Aero 2007 Issue

    Nick, the resizer is working but I'm still a little unclear as to what files I need to add the following and where in those files should I add it?

    <script type="text/javascript">
       document.documentElement.style.backgroundImage = 'url(/bg.ashx?'+(window.screen.width)+'x'+(window.screen.availHeight)+')';
       document.documentElement.style.backgroundPosition = 'top';
    </script> 

    • Post Points: 0
  • 04-04-2007 7:44 AM In reply to

    • Nick
    • Top 10 Contributor
    • Joined on 10-11-2005
    • Gilwern, S.Wales, Uk
    • Posts 2,603
    • Points 19,725

    Re: Aero 2007 Issue

    Which version of CS are you using? If it's 2007, that goes into the master.master. If it's 2.x, then that has to go into the Skin-TitleBar.ascx
    • Post Points: 0
  • 04-04-2007 7:49 AM In reply to

    • Tommyweather
    • Top 10 Contributor
    • Joined on 02-07-2006
    • Quakertown, PA
    • Posts 66
    • Points 730

    Re: Aero 2007 Issue

    Where in the master.master file should it go?

     

    • Post Points: 0
  • 04-04-2007 7:54 AM In reply to

    • Nick
    • Top 10 Contributor
    • Joined on 10-11-2005
    • Gilwern, S.Wales, Uk
    • Posts 2,603
    • Points 19,725

    Re: Aero 2007 Issue

    In the
    • Post Points: 0
  • 04-04-2007 7:58 AM In reply to

    • Tommyweather
    • Top 10 Contributor
    • Joined on 02-07-2006
    • Quakertown, PA
    • Posts 66
    • Points 730

    Re: Aero 2007 Issue

    In the?  Where specifically in the code in the master.master?  Seems like it has no affect where I add it.

    <script type="text/javascript">
       document.documentElement.style.backgroundImage = 'url(/bg.ashx?'+(window.screen.width)+'x'+(window.screen.availHeight)+')';
       document.documentElement.style.backgroundPosition = 'top';
    </script>

    • Post Points: 0
  • 04-04-2007 8:04 AM In reply to

    • Nick
    • Top 10 Contributor
    • Joined on 10-11-2005
    • Gilwern, S.Wales, Uk
    • Posts 2,603
    • Points 19,725

    Re: Aero 2007 Issue

    In the?  Where specifically in the code in the master.master?  Seems like it has no affect where I add it.

    <script type="text/javascript">
       document.documentElement.style.backgroundImage = 'url(/bg.ashx?'+(window.screen.width)+'x'+(window.screen.availHeight)+'=1)';
       document.documentElement.style.backgroundPosition = 'top';
    </script>

    Try that
    • Post Points: 0
  • 04-04-2007 8:09 AM In reply to

    • Tommyweather
    • Top 10 Contributor
    • Joined on 02-07-2006
    • Quakertown, PA
    • Posts 66
    • Points 730

    Re: Aero 2007 Issue

    Nick,

    In the words of the Borat "GREAT SUCCESS!"  That did the trick and appreciate your patience helping my dumb ass with this.  I really need to learn more about how such things work.  Big Smile 

    • Post Points: 0
  • 04-04-2007 8:18 AM In reply to

    • Tommyweather
    • Top 10 Contributor
    • Joined on 02-07-2006
    • Quakertown, PA
    • Posts 66
    • Points 730

    Re: Aero 2007 Issue

    Another question for ya my good man.  Is there a way to make the background  stretch vertically as well as horizontally?  It isn't a huge deal but I notice in Aero it fills the screen as one image.  The resizer  works to stretch it horizontally to fit but it repeats vertically.  See the link below.

    http://test.absolutepigskin.com/forums/ 

    • Post Points: 0
  • 04-04-2007 8:28 AM In reply to

    • Nick
    • Top 10 Contributor
    • Joined on 10-11-2005
    • Gilwern, S.Wales, Uk
    • Posts 2,603
    • Points 19,725

    Re: Aero 2007 Issue

    CSS issue. U need to add this to common.css:
    body, html { background-position: center; background-repeat: no-repeat; background-attachment: fixed; }
    • Post Points: 0
  • 04-04-2007 8:37 AM In reply to

    • Tommyweather
    • Top 10 Contributor
    • Joined on 02-07-2006
    • Quakertown, PA
    • Posts 66
    • Points 730

    Re: Aero 2007 Issue

    Don't worry about it... figured it out.  Just added something to the common.css file and it seems to do the trick.

    background-attachment:fixed;

    background-repeat:repeat;  

    • Post Points: 0
  • 06-11-2007 4:56 AM In reply to

    • greenspan
    • Top 50 Contributor
    • Joined on 07-14-2006
    • Posts 6
    • Points 110

    Re: Aero 2007 Issue

     Hi.

    Where can I do this?

    Thanks in advance. 

    • Post Points: 20
  • 06-16-2007 8:17 AM In reply to

    • Nick
    • Top 10 Contributor
    • Joined on 10-11-2005
    • Gilwern, S.Wales, Uk
    • Posts 2,603
    • Points 19,725

    Re: Aero 2007 Issue

    please explain?

    • Post Points: 5
Page 2 of 2 (30 items) < Previous 1 2 | RSS