Display ASP.Net MSChart / File Issue
I’ve add MSChart to a webpage and I’m also using a Survey page I got from 4GuysFromRolla. Both work on my development machine but when I move them to my hosting site there are issues.
With MSChart page the chart is not displayed although it’s included the Page Source code:
src="/ClubInformationTracking/ChartImg.axd?i=chart_3d90c53b0f844807a2491a1d79a636a1_0.png&g=75fecf0f14cf4121b623691d383263aa" alt="" style="height:300px;width:700px;border-width:0px;" />
And when I try to open the Survey page I get this: Parser Error Message: Could not load file or assembly 'sstchur.web.survey' or one of its dependencies. The system cannot find the file specified.
Source Error:
<%@ Register TagPrefix = "sstchur" Namespace = "sstchur.web.survey" Assembly = "sstchur.web.survey" %>
<%@ Page Language = "C#" %>
Assembly Load Trace: The following information can be helpful to determine why the assembly sstchur.web.survey
could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]
(DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
The Hosting site is using Version 4.0 and the dll needed for the survey is in the BIN directory.
When I moved my files to the hosting site I had to change every instance when I referred to a file from:
“~/FileName”
To
“FileName”
I’ve tried all of the “fixes” I could find for the MSChart that involved changes to the web.config
file but because of the 开发者_运维问答error messages associated with the Survey page I’m guessing this is the issue.
Any suggestions?
The /Bin folder is in a subdirectory.
Root/public/ClubInformationTracking/BIN
ASP.NET only looks for DLLs in the application's root /bin
folder. If you just added the ClubInformationTracking
folder yourself and did not configure it to be an IIS application or virtual directory via the web hosting provider's control panel, then that is the problem, as ASP.NET is looking for any DLLs in /Bin
(or, perhaps, /public/Bin
, depending on how things are setup).
There are two possible remedies here:
Move the
Bin
folder (and its contents) from theClubInformationTracking
subfolder intopublic
and see if that works. If not, try moving it toroot
From the web hosting provider's control panel, make the
ClubInformationTracking
folder a virtual directory or IIS application. If you're unclear on how do to this, contact your web hosting provider's support.
Thanks, and happy programming!
精彩评论