从命令行运行ASP.NET Web应用程序(Running ASP.NET web application from command line)
我有ASP.NET Web应用程序,并希望运行它。 机器上没有安装Visual Studio。 在我的具有Visual Studio的计算机上,我能够使用此链接中提到的步骤运行应用程序
http://www.codeproject.com/Articles/166319/Run-ASP-NET-Web-Application-from-Command-Prompt
但是,生产框没有WebDev.WebServer20.EXE。 显然exe文件可以下载然后我可以运行程序,但在生产盒上我不能这样做。
有没有其他方法从命令行运行ASP.NET程序? 这是一个简单的程序,我没有使用任何第三方DLL文件,也没有命令行参数。
I have ASP.NET web application and would like to run it. The machine doesn't have Visual Studio installed on it. On my machine which has Visual Studio I was able to run the application using the steps mentioned in this link
http://www.codeproject.com/Articles/166319/Run-ASP-NET-Web-Application-from-Command-Prompt
However, the production box doesn't have WebDev.WebServer20.EXE. Obviously the exe file could be downloaded and then I could run the program, but on production box I can't do that.
Is there any other way to run ASP.NET program from command line? It is a simple program, I am not using any third-party dll files and there are no command line arguments.
原文:https://stackoverflow.com/questions/26597461
最满意答案
这是因为您的
Category
类引用了其他类别,称为subcategory
。 对于每个类别,您需要获取所有子类别,因此您可以获得许多子查询。 我们称之为SQL N + 1问题。 让我们尝试使用FETCH JOIN
:SELECT c FROM category c JOIN FETCH c.subCategories
应该执行一个(更大的)查询。
That because your
Category
class has reference to other categories, calledsubcategory
. For each category you need to fetch all subcategories, so you get many subqueries. We call it SQL N+1 problem. Let's try to useFETCH JOIN
:SELECT c FROM category c JOIN FETCH c.subCategories
Should execute one (bigger) query.
相关问答
更多-
sql count(*)查询执行多个结果的另一个查询的结果(sql count(*) query on results of another query performing multiple results)[2022-12-22]
试试此解决方案: SELECT C.CountryName,Count(u.UserId) AS UserCount FROM User_Subscribe AS us LEFT JOIN User AS u ON us.UserId = u.UserId LEFT JOIN Country AS c ON u.CountryId = c.CountryId WHERE c.CountryId = 3 GROUP BY c.CountryName Try This Solution : SELECT ... -
你看过Criteria查询了吗? 它是一种用于以编程方式构造查询和参数的Hibernate功能。 如果您的目的是查询符合所有这些条件的实体: prop1 =“A”和prop2.x = 3和prop2.y和prop3.get(i).type =“Circle” 支持关联查询 ,然后你可以做类似的事情 Criteria criteria = session.createCriteria(Model.class); criteria.add(Restrictions.eq("prop1", "A")); crit ...
-
LINQ执行多个查询而不是单个“加入”查询(LINQ performing multiple queries instead of a single “joined” query)[2023-01-14]
这是由延迟加载引起的 - 您可以通过应用LoadWith() (相当于Lin的SQL的EF的Include() )然后再执行查询来解决这个问题: var dlo = new DataLoadOptions(); dlo.LoadWith(p => p.OtherViews); dc.LoadOptions = dlo; //your query here This is caused by lazy loading - you can get around that by appl ... -
我解决了这个问题; 这是我的联接表的一个问题。 请参阅以下内容: - @Id @ManyToOne public Employee employee; @Id @ManyToOne public Area area; 我使用了@Id导致了抛出的StackOverflowError异常。 使用以下查询,在Employee上获取EAGER和@Fetch JOIN的OneToMany,以及在Area上获取LAZY和@Fetch SELECT的OneToMany,然后我可以执行以下查询: - List当我通过多个线程反复执行相同的操作集时,我已经设置了一个简单的压力测试。 当我检查hibernate统计信息时,结果是查询缓存hitCount为零! 好吧,虽然可以从统计信息中获取有关缓存命中的统计信息( 如果通过在配置中设置属性hibernate.generate_statistics=true来启用统计信息),这是IMO不是诊断缓存“问题”的最佳方法。 我的建议是激活1.执行的DML语句和2.缓存活动的日志记录。 相关的日志记录类别是: org.hibernate.SQL在执行时记录所有SQL DML语 ...映射为@DocumentId的字段需要被视为一种特殊情况。 由于它也用于索引内文档的删除(和更新),因此它必须被视为单个关键字以避免含糊不清:不会应用分析器。 QueryBuilder DSL自动预处理与索引管道期间使用的相同分析器的匹配()子句; 由于id字段被视为单个唯一关键字,因此在这种情况下输入文本不会被细分。 通过id加载实体我通常会推荐使用传统的Hibernate Criteria,而不是使用全文查询。 如果要使用全文查询将其与其他全文限制结合使用,可以将id属性映射到其他@Field (位于@ ...您的查询在sql级别很好,但在Hibernate的情况下,您将面临此异常 Caused by: java.lang.IllegalArgumentException: node to traverse cannot be null! 所以转换这个查询 @Query("(select category from Category category where category.isDelete=false and category.status='A' AND " + "category.id in ...
通过Spring - Hibernate在多个数据库中执行SQL查询(Executing an SQL query in multiple databases through Spring - Hibernate)[2022-09-22]
您可以考虑2个选项: AbstractRoutingDataSource 使用此解决方案,您可以在执行查询之前切换到正确的数据库。 所以你可以写出类似的东西 // GOLD database CustomerContextHolder.setCustomerType(CustomerType.GOLD); List- goldItems = catalog.getItems(); assertEquals(3, goldItems.size()); System.out.pri ...
具有多个自连接执行缓慢的大型表上的空间查询(Spatial query on large table with multiple self joins performing slow)[2023-11-06]
这个查询应该有很长的路要走( 要快得多): WITH school AS ( SELECT s.osm_id AS school_id, text 'school' AS type, s.osm_id, s.name, s.way_geo FROM planet_osm_point s , LATERAL ( SELECT 1 FROM planet_osm_point WHERE ST_DWithin(way_geo, s.way_geo, 5 ...这是因为您的Category类引用了其他类别,称为subcategory 。 对于每个类别,您需要获取所有子类别,因此您可以获得许多子查询。 我们称之为SQL N + 1问题。 让我们尝试使用FETCH JOIN : SELECT c FROM category c JOIN FETCH c.subCategories 应该执行一个(更大的)查询。 That because your Category class has reference to other categories, called subc ...相关文章
更多- Chapter 9 - Securing Your Application -- Professional ASP.NET MVC 1.0
- Full-Text Search in ASP.NET using Lucene.NET
- 《DotNetNuke 4 高级编程》(Professional DotNetNuke 4: Open Source Web Application Framework for ASP.NET 2.0)扫描版[PDF]
- AMF: ASP.NET Mobile Framework
- 微信公众平台开发(ASP.NET)
- 微信公众平台开发小记(ASP.NET)
- Ubuntu(Linux) + mono + jexus +asp.net MVC3 部署
- Hibernate在Web应用程序中使用示例
- token验证-微信公众平台开发3(asp.net)
- asp.net 模拟CURL调用微信公共平台API 上传下载多媒体文
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)