Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Could not load file or assembly NationalInstruments.Common ... or one of its dependencies. The system cannot find the file specified.

Hello, I'm writing my first NI webforms with a simple graph.

 

I referenced NationalInstruments.UI and NationalInstruments.UI.WebForms then I inserted a ni:WaveformGraph on aspx page. Nothing more.

On my development PC it's show a page within the empty graph but on my web server I get the following message:

 

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'NationalInstruments.Common, Version=8.1.20.415, Culture=neutral, PublicKeyToken=4544464cdeaab541' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 57: 		<compilation debug="true">
Line 58: <assemblies>
Line 59: <add assembly="NationalInstruments.Common, Version=8.1.20.415, Culture=neutral, PublicKeyToken=4544464cdeaab541"/>
Line 60: <add assembly="NationalInstruments.UI, Version=8.1.20.472, Culture=neutral, PublicKeyToken=4544464cdeaab541"/>
Line 61: <add assembly="NationalInstruments.UI.WebForms, Version=8.1.20.472, Culture=neutral, PublicKeyToken=4544464cdeaab541"/>

Source File: D:\Data\www\dev.ghsolutions.it\web.config    Line: 59
 

I deployed all National files in my /bin directory to the web server:

NationalInstruments.Common.Native.dll

NationalInstruments.UI.dll

NationalInstruments.UI.Styles3D.dll

NationalInstruments.UI.WebForms.dll

 

I think that something is missing!

 

Please, how can I deploy the webforms without installing Measurement Studio on the web server?

 

Thank you

Roberto

 

0 Kudos
Message 1 of 13
(9,977 Views)

Roberto -

 

In the list of MStudio DLLs that you deployed to the web server, you specified NationalInstruments.Common.Native.dll, but you did not specify NationalInstruments.Common.dll. Did you deploy it also? Did you confirm that the Version and PublicKeyToken of the NationalInstruments.Common.dll that you deployed to your web server match the Version and PublicKeyToken in the web.config file?

 

David Rohacek

National Instruments

0 Kudos
Message 2 of 13
(9,971 Views)

David,

your suggestion was good.

I added a reference to NationalInstruments.Common in my project and rebuild it to have NationalInstruments.Common.dll in /bin.

Then after a new deployment the abode web server error disappear but I cannot see the image:  

<img id="graph" src="ImageStateHandler.axd?Id=A8A47BAC08794CCF8A2543E0501A9259&amp;State=SessionState" border="0" style="height:325px;width:600px;" /> 

I read a similar topic on this forum but I cannot access directly to web server and also I don't know which O.S. version and IIS version is there.

In my web.config the http headers should be configured well:

<httpHandlers>
      <add path="ImageStateHandler.axd" verb="GET" type="NationalInstruments.UI.WebForms.ImageStateHandler, NationalInstruments.UI.WebForms, Version=8.1.20.472, Culture=neutral, PublicKeyToken=4544464cdeaab541" validate="true" />
</httpHandlers>

Why my developer PC show images and web server does not?

Thank you

Roberto

 

 

 

0 Kudos
Message 3 of 13
(9,968 Views)

Roberto-

 

When you make the changes as suggested here through IIS7 manager, IIS7 just modifies the web.config file. So, you could just do that on a test server machine, and then just use the changed web.config file and upload it to your actual server.

 

IIS6 expects the module and handler definition to be in <system.web>/<httpModules> and <system.web>/<httpHandlers>

IIS7 expects the module and handler definition to be in <system.webServer>/<modules> and <system.webServer>/<handlers>.

 

As far as your problem is concerned, I think, your webserver could be using IIS7. So, could you please modify your web.config and add these entries (if not already there) and try ?

 

<system.webServer> <validation validateIntegratedModeConfiguration="false"/> <!--You might have some additional content in your web.config here--> <handlers> <!--In addition to the exisiting entries, Just add the following 2 to the end in your web.config file--> <remove name="NIImageStateHandler"/> <add name="NIImageStateHandler" path="ImageStateHandler.axd" verb="GET" type="NationalInstruments.UI.WebForms.ImageStateHandler,NationalInstruments.UI.WebForms, Version=8.1.20.472, Culture=neutral, PublicKeyToken=4544464cdeaab541"/> </handlers> </system.webServer>

 

 

 

-Mahesh
National Instruments
0 Kudos
Message 4 of 13
(9,933 Views)

Mahesh,

thank you, I did your test with <system.webServer>/<modules> and <system.webServer>/<handlers> and the result was the same.

 

Then, I called my provider and he told me that server is Win 2003 Web edition + II6, so the web.config tags should be the same as my (VS2008 on XP + IIS5.1)

 

Do you have any other suggestion?

Roberto

 

Message Edited by robson on 08-28-2009 08:48 AM
Message Edited by robson on 08-28-2009 08:48 AM
0 Kudos
Message 5 of 13
(9,918 Views)

Roberto,

 

Could you please double-check that you have copied all the dependent DLLs to the webserver for the NI assemblies that are referenced in the website ?

 

Measurement Studio documents what files need to be copied over for each of its .NET assemblies in a help topic named, ".NET XCOPY Deployment Files". You can find it from VisualStudio's help: "NI Measurement Studio Help" >> "Deploying Applications" >> "Merge Modules and Deployment Files".

 

Also, are you not able to view the controls at all or is it an intermittent problem (i.e does hitting refresh button in the browser help ) ?

-Mahesh
National Instruments
0 Kudos
Message 6 of 13
(9,884 Views)

Mahesh,

I just added mesa.dll, msvcp80.dll, msvcr80.dll and mscvrt.dll as indicated in "Measurement Studio .NET XCOPY Deployment Files" also if I don't use 3D styles but the result is the same.

I'm not able to view the control at all. The browser page is empty. This is the browser source code:

<!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><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="ni1.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTgwNTc0MTkxNg9kFgICAw9kFgICAQ8PFwAXAwUFWUF4ZXMWARcABQVYQXhlcxYBFwAFBVBsb3RzFgEXAGQYAgUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFBWdyYXBoBQVncmFwaA8XAQUHU3RhdGVJZAUgQ0MwNkQ1OUE2ODg5NDQyOUJBMTkyRTE2OTVBOUIyODRkrRAiY3IkpqKl0zYzm2DWZaj98Uw=" />
</div>
<div>
<img id="graph" src="ImageStateHandler.axd?Id=CC06D59A68894429BA192E1695A9B284&amp;State=SessionState" border="0" style="height:325px;width:600px;" />
</div>
</form>
</body>
</html>

simply, I think ImageStateHandler.axd is not found or does not respond!

 

My project references are:

NationalInstruments.Common
NationalInstruments.UI
NationalInstruments.UI.WebForms

 

The DLL's deployed on the web server are the newest found on my developer PC:

mesa.dll                                                    3.0.0.0
msvcp80.dll                                               8.0.50727.3053
msvcr80.dll                                               8.0.50727.3053
msvcrt.dll                                                  7.0.2600.2180
NationalInstruments.Common.dll               8.1.20.415
NationalInstruments.Common.Native.dll     8.1.20.415
NationalInstruments.UI                              8.1.20.472
NationalInstruments.UI.Styles3D.dll            8.1.20.472
NationalInstruments.UI.WebForms             8.1.20.472

 

Roberto


 

 

 

Message Edited by robson on 09-01-2009 04:29 AM
0 Kudos
Message 7 of 13
(9,860 Views)

hello

nobody has any more idea?

Roberto

0 Kudos
Message 8 of 13
(9,794 Views)

Roberto-

 

I was out of office and hence couldn't reply earlier. I do not see anything that should be causing the problem. Is it possible for you to send the web.config file that you have used while deploying to your server ?

If you can send a zipped website (a simple webpage with a graph) which will be copied to the application directory in the webserver (and is supposed to work but does not work when you try it with your provider) would be more helpful. We could try to reproduce the issue here and see what could be the problem.

-Mahesh
National Instruments
0 Kudos
Message 9 of 13
(9,786 Views)

Mahesh,

 

thank you very much of your attention.

 

In attach there's the web.config downloaded from the web site dev.ghsolutions.it . You can test the online graph clicking here

In ni-demo.zip there's my C# solution (VS2008 + Measurement Studio 8.1.2.472)

 

Roberto

Download All
0 Kudos
Message 10 of 13
(9,783 Views)