今天打开Infragistics看下里边的控件
点了几个看,感觉很好看,用户体验很好,遂逐个查看.
点到有些例子的时候突然提示出错.
内容如下

There was an error processing the requested sample.

If you are running multiple versions of the .NET Framework on the computer hosting these samples, please ensure that this virtual directory is mapped to the correct version of the .NET Framework (2.0).

To change the version of the .NET Framework an application is bound to, or to change the version for all applications on a given site, you can use the Microsoft aspnet_regiis.exe utility, or the "Internet Information Services" administration console.  

To configure the version of the .NET Framework a specific application uses

  1. Open up the Internet Information Services console.
  2. Navigate to your application in the tree on the left, and right-click.
  3. Choose Properties from the right-click menu.
  4. Your dialog should look like the one below.  Simply choose the proper framework version (in this case, 2.0.50727), and click the OK button.
  5. Repeat these steps for the WebSchedule Forms folder ([wwwroot]/ig_common/20061clr2/forms/webschedule/)

ASP.NET Version Picker

To view the actual problem which caused this page to be shown, you must turn off customErrors in the SamplesBrowser's web.config file. To turn off custom errors, find the section in the Web.Config for <customErrors mode="On"defaultRedirect="troubleshooting.htm" /> and set mode="Off"

If you receive an error similar to the following:
The path '/ig_common/20061clr20/Forms/WebSchedule/App_GlobalResources/' maps to a directory outside this application, which is not supported.
when trying to add an appointment to a WebSchedule sample, the problem is likely caused by an extraneous trailing '/' in the "ig_common" virtual directory. To fix the problem, open up the Internet Information Services administration console, and select Properties from the right click menu available on the "ig_common" node. In the "Local Path" textbox, remove the trailing '/' from the value if there. Using a default installation of NetAdvantage, the value should be "C:\Inetpub\wwwroot\aspnet_client\infragistics"


按照提示一步步操作,终于发现问题所在.
因为系统盘不在C盘,而且Infragistics也没装在系统盘.
所以把自定义页面关掉之后就出来错误提示.如下

 

“/ig_Samples20063CLR20/CS”应用程序中的服务器错误。

未能找到路径“c:\Program Files\Common Files\Infragistics\Presets\20063\CLR2x\Web\WebCombo\Standard\Office 2007 Black_CLR20.xml”的一部分。

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.IO.DirectoryNotFoundException: 未能找到路径“c:\Program Files\Common Files\Infragistics\Presets\20063\CLR2x\Web\WebCombo\Standard\Office 2007 Black_CLR20.xml”的一部分。

源错误:

行 42: 			this.oleDbConnection1.ConnectionString = WebSamplesCS.Config.NorthwindMDBConnString;
            行 43:
            行 44:             this.WebCombo1.LoadPreset(WebSamplesCS.Config.PathToPreset + @"\WebCombo\Standard\Office 2007 Black_CLR20.xml", true);
            行 45:             this.UltraWebGrid1.LoadPreset(WebSamplesCS.Config.PathToPreset + @"\UltraWebGrid\Standard\Office 2007 Black_CLR20.xml", true);
            行 46: 

源文件: e:\Program Files\Infragistics\NetAdvantage 2006 Volume 3 CLR 2.0\ASP.NET\Samples\CS\WebRefreshPanel\LinkedPanels\WebForm1.aspx.cs    行: 44

堆栈跟踪:

[DirectoryNotFoundException: 未能找到路径“c:\Program Files\Common Files\Infragistics\Presets\20063\CLR2x\Web\WebCombo\Standard\Office 2007 Black_CLR20.xml”的一部分。]
            System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2013808
            System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
            System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +114
            Infragistics.WebUI.Util.Serialization.Serializer.LoadPreset(ISupportPresetSerialization target, String filePath, Boolean reset) +73
            Infragistics.WebUI.WebCombo.WebCombo.LoadPreset(String filePath, Boolean reset) +11
            WebSamplesCS.WebRefreshPanel.Link_Panels.WebForm1.Page_Load(Object sender, EventArgs e) in e:\Program Files\Infragistics\NetAdvantage 2006 Volume 3 CLR 2.0\ASP.NET\Samples\CS\WebRefreshPanel\LinkedPanels\WebForm1.aspx.cs:44
            System.Web.UI.Control.OnLoad(EventArgs e) +99
            System.Web.UI.Control.LoadRecursive() +47
            System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
            


版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.210


 

百思不得其解.
抱着试试看的心态....
打开X:\Program Files\Infragistics\NetAdvantage 2006 Volume 3 CLR 2.0\ASP.NET\Samples\CS路径下的web.config (X为你安装Infragistics的盘符)
搜索c:\Program Files\Common Files\Infragistics\Presets\20063\CLR2x\Web\
果真在这里,哈哈.之后把盘符C改为你所在的系统盘的盘符就行了.
这个可是个bug啊.


看到有网友出现和我一样的问题,但没解决,我就发出来做个记录吧.免得有人出了这个问题还再重复我的操作..