Jump to content

Generating CPU Images


Nisd

Recommended Posts

Okay so I need a hand here, I can't get this working....

 

I get the following error: "Cannot use a leading .. to exit above the top directory."

 

<%@ Page Language="C#" EnableViewState="false" %>
<%@ Import Namespace="TCAdminSDK.Objects" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
   <title></title>
</head>
<body>
   <%  Datacenter[] dataCenters = Datacenter.GetDatacenters();
       foreach (Datacenter dataCenter in dataCenters)
       {
           foreach (TCAdminSDK.Objects.Server server in TCAdminSDK.Objects.Server.GetServersByDataCenter(dataCenter.DatacenterID))
           {                
               Image img = TCAdminSDK.Util.ChartGenerator.SaveChartToTempWebFolder(this.Page, server.GetGameServerCPUChart(7, TCAdminSDK.Util.ChartGenerator.GetDefaultProperties()));
               
               %>
                   <img alt="cpuChart" src="<%= img.ImageUrl %>"/>
               <%
           }
       }
       %>
</body>
</html>

 

But that error makes no sense to me what so ever.

Link to comment
Share on other sites

I believe this problem is caused by the master page/subpage locations. Supposing your master page is in the root directory and your content pages are in a subdirectory.

 

Simple solution is to place a copy of the master page(in the root directory ) into the subdirectory or folder where the content pages are existing.

 

You can/should make changes like the following, into your page:--

 

<%@ Page Language="C#" MasterPageFile="main.master" Title="www.tcadmin.com" %>

 

inseted of

 

<%@ Page Language="C#" MasterPageFile="~/main.master" Title="www.tcadmin.com" %>

 

This is a problem in ASP.NET

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use