08-03-2009 09:56 PM
Hello,
I developped a website with Measurement Stuido. Everything is OK in the VS environment. But if I use web brower to visit the website, I can NOT see the image of the controls, but only a red cross picture.
For example:
Correct, by using VS debug
Error, by using IE directly
What's wrong?
My development enviornment:
MS: Measurement Studio 8.6 for VS 2008
Tools: VS 2008
Language: C# .net
Web Server: IIS 7
OS: Windows Vista
Web browser: IE8
Thank you very much.
Chang CAI
2009-8-4
Solved! Go to Solution.
08-04-2009 10:23 PM
Maybe it is the setting of the browser cause this problem. Also it would be convenient if you can attach your code.
08-05-2009 08:40 PM
Thanks for your reply.
The codes is very simple as follows:
1. Default.aspx
-------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a" namespace="NationalInstruments.UI.WebForms" tagprefix="ni" %>
<!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>
<form id="form1" runat="server">
<div>
<ni:Led ID="Led1" runat="server" />
</div>
</form>
</body>
</html>
-------------------------------------------------------
08-05-2009 08:46 PM
2. licenses.licx
------------------------------------------
NationalInstruments.UI.WebForms.Led, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
# The following section of this file was autogenerated by Measurement Studio. Do not edit or remove this file from the project.
# This file is used for licensing Measurement Studio components.
# Begin Measurement Studio licenses
NationalInstruments.NetworkVariable.WebForms.NetworkVariableDataSource, NationalInstruments.NetworkVariable, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.NetworkVariable.NetworkVariableLicenser, NationalInstruments.NetworkVariable, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.NetworkVariable.WindowsForms.NetworkVariableBrowserDialog, NationalInstruments.NetworkVariable, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.NetworkVariable.WindowsForms.NetworkVariableDataSource, NationalInstruments.NetworkVariable, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.Slide, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.Thermometer, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.ScatterGraph, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.Gauge, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.ComplexGraph, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.DigitalWaveformGraph, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.NumericEdit, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.Knob, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.AutoRefresh, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.Switch, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.WaveformGraph, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.Meter, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.Tank, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
NationalInstruments.UI.WebForms.Legend, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a
# End Measurement Studio licenses
---------------------------------------
08-07-2009 08:13 AM
This is almost certainly caused because your image is not located in the correct directory. Looking at your asp code I cannot tell where it needs to be but check to make sure that it is in the path that your web server expects it to be in.
Regards,
Steven Zittrower
Applications Engineer
National Instruments
08-07-2009 11:22 AM
Hello, thanks for your help. I think you are right.
The image property is as follows: That shows the axd can not be visited.
I had add the httpHandler path centence into the web.config file.
For example:
---------------------------
<httpHandlers>
<add path="ImageStateHandler.axd" verb="GET" type="NationalInstruments.UI.WebForms.ImageStateHandler, NationalInstruments.UI.WebForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a" validate="true" />
</httpHandlers>
--------------------------
But how to put the correct path? Add the NI webform control dll files to application \Bin\ directory? Or add those dll files to IIS settings?
Pls. advise.
Thank you very much.
Chang CAI
2009-8-8
08-10-2009 01:05 AM - edited 08-10-2009 01:07 AM
I think, you are seeing this because IIS7 does not look at some sections in the web.config when you do a simple copy-website from the VisualStudio.
The images are not being shown in the client, because it is missing the http handler mapping in the server. [This would bepicked up in IIS6 or earlier from the web.config, but not by default in IIS7, I think].
To fix this, you could manually add this handler mapping to your web-application in IIS7. To do this, on Vista:
Now, you should be able to see the images. Let me know if this did not solve the issue for you.
Please look at ASP.NET Integration With IIS 7.0 [on iis.net] for some more information.
Update: Added the missing link
08-10-2009 07:59 AM
Dear Mahesh,
It is done! Amazing!
Thank you very much! You are a real expert.
Chang CAI
2009-8-10