asp.net – VirtualPath位于当前应用程序根目录之外
发布时间:2020-12-15 21:09:27 所属栏目:asp.Net 来源:网络整理
导读:背景: ASP.NET Webforms应用程序与VB.NET后端。 我刚刚从Visual Studio 2010升级到Visual Studio 2013和.NET 4.5.1。这段代码以前工作,因为我们在Visual Studio 2005和.NET 2.0。但自从升级我得到这个错误。 在ASCX用户控制中。 script language="javascri
背景:
ASP.NET Webforms应用程序与VB.NET后端。 我刚刚从Visual Studio 2010升级到Visual Studio 2013和.NET 4.5.1。这段代码以前工作,因为我们在Visual Studio 2005和.NET 2.0。但自从升级我得到这个错误。 在ASCX用户控制中。 <script language="javascript" type="text/javascript"> <!-- function SetItem_<%Response.Write(m_strJSAlias)%>(strValue) { $("#<%Response.Write(txtShop.ClientID)%>").attr('value',strValue); __doPostBack('frmCorpPortal_Form',''); void FocusOnNext_<%response.Write(m_strJSAlias)%>; } 我们现在得到这个错误,我们从来没有得到: VirtualPath was outside the current application root. Parameter name: virtualPath Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: VirtualPath was outside the current application root. Parameter name: virtualPath Line 4: <script language="javascript" type="text/javascript"> Line 5: <!-- Line 6: function SetItem_<%Response.Write(m_strJSAlias)%>(strValue) { Line 7: $("#<%Response.Write(txtShop.ClientID)%>").attr('value',strValue); Line 8: __doPostBack('frmCorpPortal_Form',''); 如果我玩的文件,并进行无意义的更改,错误消失。示例:在第4行和第5行之间添加空行。然后稍后再返回。 可能是什么原因? 解决方法
我有一个旧的应用程序在iis和从visual studio运行时的相同的问题。禁用浏览器链接在visual studio 2013似乎修复这个。这个功能注入一些javascript到您的页面,并导致这个问题为我至少。因为我禁用它现在它在IIS和Visual Studio工作。
http://techatplay.wordpress.com/2013/10/24/vs2013-asp-net-application-error-virtualpath-was-outside-the-current-application-root/ 这里有关于功能的更多细节 http://blogs.msdn.com/b/webdev/archive/2013/06/28/browser-link-feature-in-visual-studio-preview-2013.aspx 干杯,Crocked (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net – 如何从ASP Web服务的JSON响应中删除d:和__type
- ASP.NET Core中的OWASP Top 10 十大风险-SQL注入
- 带有子项的ASP.NET自定义/用户控件
- asp.net – 如何为.Net网站,Windows服务等创建安装程序?
- NPOI 导出 excel 性能测试
- 全局错误登录ASP.Net MVC 6
- CookieAuthenticationOptions,ExpireTimeSpan不起作用
- asp.net-mvc – ASP.NET MVC Beta 1:DefaultModelBinder错
- ASP.NET设计网络硬盘之删除文件夹实现代码
- 在ASP.NET C#中直接打印Crystal报表
推荐文章
站长推荐
- ASP.Net数据库配置
- asp.net – 用于Active Directory帐户的Oauth 2令
- asp.net – System.Net.Cookie和System.Web.Http
- asp.net-mvc – 如何在Ajax窗体的asp.net mvc中提
- asp.net-mvc – 如何将POST请求重定向到维护MVC中
- asp.net-mvc – 实体框架 – 选择特定列并返回强
- 单元测试 – 从TestServer测试asp.net 5 vnext中
- asp.net-mvc – ViewModel中的MVC3 RouteUrl
- ASP.NET应用程序未记录到Windows事件日志
- asp.net – ELMAH日志的独立查看器应用程序
热点阅读