我使用asp ajax图表控件有一个奇怪的情况.我有一个试图在aspx页面上显示图表的应用程序.以下是我的web.config中的几个片段 -
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\temp\;"/>
</appSettings>
Run Code Online (Sandbox Code Playgroud)
...
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
Run Code Online (Sandbox Code Playgroud)
...
<handlers>
<remove name="ChartImageHandler"/>
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>
Run Code Online (Sandbox Code Playgroud)
当我通过VS2010 IDE运行应用程序时,我在尝试显示图表时收到以下错误 -
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Unknown server tag 'asp:Chart'.
Run Code Online (Sandbox Code Playgroud)
但是,如果我将它部署到我的服务器,似乎找不到图表(图像将出现的轮廓,红色X表示无法找到图像).不同之处在于我从windows xp 32位机器运行IDE,而我部署的服务器是运行IIS 7的64位Server …
我使用nhibernate来查询我的数据库,并在我的日志文件中看到各种语句如下 -
static sql for entity static select for entity version select snapshot select
然后使用我的域实体进行查询.
我相信这些在建立会议工厂时很常见,但我只是想确定一下.有谁知道这些条目是什么意思?
谢谢你的帮助.
我已经构建了一个包含一些jquery代码的mvc应用程序.当我从我的ide运行应用程序时,一切都很完美.当我发布到服务器并打开页面时,jquery不起作用.我得到对象预期的错误.
这可能是由于我的文件映射?这是我在应用程序中的映射示例 -
<script type="text/javascript" href="../../Scripts/jquery-1.3.2.js"></script>
Run Code Online (Sandbox Code Playgroud)
我成功地将应用程序发布到iis7,但是jquery已经破解了.我确实发布了现有网站中的应用程序.
有什么想法吗?
我在类库中使用DNX实现log4net时遇到问题.我的project.json中有以下内容 -
...
"dependencies": {
"log4net": "2.0.3",
"Microsoft.Framework.Logging": "1.0.0-beta4"
},
"frameworks": {
"dnx451": { },
"dnxcore50": {
"dependencies": {
"System.Collections": "4.0.10-beta-22816",
"System.Linq": "4.0.0-beta-22816",
"System.Threading": "4.0.10-beta-22816",
"Microsoft.CSharp": "4.0.0-beta-22816"
}
}
}
...
Run Code Online (Sandbox Code Playgroud)
当我尝试在类中使用log4net时,我收到以下错误 -

但是,我确实在引用文件夹中看到了DNX 451和50的引用.有没有人想过如何解决这个问题?
此外,如果我从我的project.json文件中删除dnxcore50,它似乎解决了,我可以编译该项目.
我使用dnx x64 1.0.0.rc1在本地IIS中托管asp.net 5/mvc 6应用程序.我想附加到iis进程并调试我的应用程序,但是没有为我设置断点的类加载符号.
这个版本的dnx和IIS有可能吗?如果是这样,如何在加载符号的情况下附加到iis进程?
--- UPDATE
所以我试过附加到dnx.exe,但仍然没有运气.奇怪的是,我能够让这个工作一次,但不能再复制它.因此,如果任何人都可以概述在IIS上调试MVC 6所需的步骤,请在此处发布.
您好我有以下代码使用带有linq的nhibernate 3.0从我的数据库中检索数据 -
public IQueryable<myEntity> getEntityWithChild
{
get { return _currentSession.Query<myEntity>().Fetch(c => c.myOtherEntity); }
}
Run Code Online (Sandbox Code Playgroud)
当我尝试将其传递给视图时,我收到以下错误,这不是非常具体.当我没有急于使用以下装载时,这工作正常 -
public IQueryable<myEntity> getEntityWithChild
{
get { return _currentSession.Query<myEntity>(); }
}
Run Code Online (Sandbox Code Playgroud)
但是每次其他实体延迟加载时我都会创建一个单独的查询.有没有人在此之前看到这个可能能指出我正确的方向.谢谢你的任何想法.
System.NotSupportedException was unhandled by user code
Message=Specified method is not supported.
Source=NHibernate
StackTrace:
at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource)
at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.Process(IASTNode tree)
at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process()
at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process(IASTNode ast, ISessionFactoryImplementor factory)
at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory)
at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) …Run Code Online (Sandbox Code Playgroud) 我正在尝试将元组从c#转换为vb.net.这是元组的声明 -
private List<Tuple<string, string, Action<T, string>>> items = new List<Tuple<string, string, Action<T, string>>>();
Run Code Online (Sandbox Code Playgroud)
我将项目添加到Item3(动作),就像这样 -
foreach(var iforeach(var i in items)
{
i.Item3(t, string.Empty);
}
Run Code Online (Sandbox Code Playgroud)
在vb.net中,我将我的元组定义如下 -
Private list As New List(Of Tuple(Of String, String, Action(Of T, String)))
Run Code Online (Sandbox Code Playgroud)
并试图像这样添加一个动作到Item3 -
Dim mytype = Activator.CreateInstance(Of T)
For Each item As Tuple(Of String, String, Action(Of T, String)) In list
item.Item3(mytype, String.Empty)
Next
Run Code Online (Sandbox Code Playgroud)
我已经尝试了不同方式的各种迭代来向Item3添加Action,但似乎没有用.对于上面的示例,我在VS中获得以下消息 - 参考的参数数量不正确....
任何人都可以了解如何将其转换为vb.net?谢谢.
我正在研究控制台应用程序,我想使用城堡windsor进行di.我在控制台应用程序的Main方法中有以下代码 -
private static IWindsorContainer container;
static void Main(string[] args)
{
container = new WindsorContainer(new XmlInterpreter(new ConfigResource("castle")));
...
Run Code Online (Sandbox Code Playgroud)
这是我的配置文件 -
<configSections>
<section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor"/>
</configSections>
<castle>
<components>
<component
id="myrepository"
service="_123App.Repositories.IMyRepository, _123App"
type="_123App.Repositories.MyRepository, _123App"
/>
</components>
</castle>
Run Code Online (Sandbox Code Playgroud)
当我运行应用程序时,我收到以下错误 -
Could not convert from '_123App.Repositories.MyRepository, _123App' to System.Type - Maybe type could not be found
Run Code Online (Sandbox Code Playgroud)
有谁知道这里会发生什么?我使用反射器来确保程序集名称是正确的,一切都在它应该的位置.谢谢你的任何想法.
编辑 - 这是整个异常堆栈跟踪 -
Castle.MicroKernel.SubSystems.Conversion.ConverterException was unhandled
Message=Could not convert from '_123App.Repositories.MyRepository, 123App._123App' to System.Type - Maybe type could not be found
Source=Castle.Windsor
StackTrace:
at …Run Code Online (Sandbox Code Playgroud) 我必须从foxpro数据库中提取一些数据.我找到了一个示例应用程序,它从sql server db中提取数据,并以下列格式将连接字符串存储在app.config文件中 -
<connectionStrings>
<add name="test"
connectionString="Data Source=localhost\SQLExpress;Initial Catalog=test;Integrated Security=SSPI;Timeout=300;"
providerName="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</connectionStrings>
Run Code Online (Sandbox Code Playgroud)
我想在foxpro中做同样的事情,但我不知道为配置的providerName部分放什么.我可以得到连接字符串就好了.有没有人知道视觉foxpro的提供商名称是什么?
谢谢
c# ×3
nhibernate ×2
.net ×1
asp.net ×1
asp.net-core ×1
asp.net-mvc ×1
charts ×1
dnx ×1
foxpro ×1
vb.net ×1