静态页面我用微软Siliverlight做了个柱状图的功能,在我的机器上的IIS发布后,为什么我的机器上、局域网内都可以正常显示,但一放到服务器 上的IIS就出问题,在服务器上单独从文件夹里打开后正常显示柱状图。在IE或者IIS里浏览就什么都不显示,白板,有用过微软Siliverlight的吗?给点意见啊。谢谢 <script type="text/javascript" >
后来发现这里面的代码不执行,我的服务器是2003server.
</SCRIPT>怎么回事啊?
后来发现这里面的代码不执行,我的服务器是2003server.
</SCRIPT>怎么回事啊?
想办法把图片的体积降下来。你可以生成后图片后压缩为JPG
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>This is my first Visifire Chart</title>
<script type="text/javascript" src="Visifire.js"></script>
</head>
<body>
<div id="VisifireChart0" align="center" style="z-index: 0;"> <script type="text/javascript" > // Create Visifire object
var vChart = new Visifire('SL.Visifire.Charts.xap', "MyChart", 492, 243);
// vChart1.setLogLevel(0); // If you want to disable logging.
var styleXml = '<Canvas.Resources>'
+ ' <Style x:Key="TitleStyle" TargetType="vc:Title">'
+ ' <Setter Property="FontColor" Value="Red"></Setter>'
+ ' </Style>' + ' <Style x:Key="ChartStyle" TargetType="vc:Chart">'
+ ' <Setter Property="Background" Value="#dbdbdb"></Setter>'
+ ' <Setter Property="Bevel" Value="True"></Setter>'
+ ' <Setter Property="BorderBrush" Value="Black"></Setter>'
+ ' </Style>'
+ '</Canvas.Resources>';
// Chart Data XML
var chartXml = styleXml +'<vc:Chart Style="{StaticResource ChartStyle}" xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts" Width="492" Height="243" BorderThickness="0.5" Padding="3" AnimationEnabled="true" Theme="Theme1" >'
+ ' <vc:Chart.Titles>'
+ ' <vc:Title Text="各国控断面主要污染因子氨氮年均值(mg/l)" Style="{StaticResource TitleStyle}" FontSize="14"/>'
+ ' </vc:Chart.Titles>'
+ ' <vc:Chart.Series>'
+ ' <vc:DataSeries RenderAs="Column" LegendText="平均值" >'
+ ' <vc:DataSeries.DataPoints>'
+ ' <vc:DataPoint AxisXLabel="唐汉桥" YValue="14"/>'
+ ' <vc:DataPoint AxisXLabel="大闸" YValue="11"/>'
+ ' <vc:DataPoint AxisXLabel="大套桥" YValue="4"/>'
+ ' <vc:DataPoint AxisXLabel="土门楼" YValue="3"/>'
+ ' <vc:DataPoint AxisXLabel="三岔口" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="工农兵" YValue="0.8"/>'
+ ' <vc:DataPoint AxisXLabel="沙河桥" YValue="0.7"/>'
+ ' <vc:DataPoint AxisXLabel="果河桥" YValue="0.6"/>'
+ ' <vc:DataPoint AxisXLabel="临河桥" YValue="0.5"/>'
+ ' <vc:DataPoint AxisXLabel="于桥出口" YValue="0.5"/>'
+ ' </vc:DataSeries.DataPoints>'
+ ' </vc:DataSeries>'
+ ' <vc:DataSeries RenderAs="Line" LegendText="标准值">'
+ ' <vc:DataSeries.DataPoints>'
+ ' <vc:DataPoint AxisXLabel="唐汉桥" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="大闸" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="大套桥" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="土门楼" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="三岔口" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="工农兵" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="沙河桥" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="果河桥" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="临河桥" YValue="1"/>'
+ ' <vc:DataPoint AxisXLabel="于桥出口" YValue="1"/>'
+ ' </vc:DataSeries.DataPoints>'
+ ' </vc:DataSeries>'
+ ' </vc:Chart.Series>'
+ ' </vc:Chart>';
// Set Chart Data XML
vChart.setDataXml(chartXml); // Render chart
vChart.render("VisifireChart0");
</script>
</div>
</body></html>
我看其它地方也没有设置的地方啊
.xaml application/xaml+xml
.xap application/x-silverlight-app
.manifest application/manifest
.application application/x-ms-application
.xbap application/x-ms-xbap
.deploy application/octet-stream
.xps application/vnd.ms-xpsdocument
郁闷了两天了
同时谢谢楼上。在asp版、IIS版跟本没人知道怎么回事
其实最开始我想到了MIME类型映射问题,但马上就否定了。因为我觉得微软怎么可能自己的产品不和自己的产品配套呢?加上你说在内网没问题,所以就猜是网速包括图片尺寸问题了汗~~谢谢你的分!