Ken*_*Ard 35 asp.net webforms visual-studio-2013 browser-link
背景:使用VB.NET后端的ASP.NET Webforms应用程序.
我刚刚从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)%>;
}
Run Code Online (Sandbox Code Playgroud)
我们现在得到了以前从未得到过的错误:
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','');
Run Code Online (Sandbox Code Playgroud)
如果我使用该文件并进行无意义的更改,则错误消失.示例:在第4行和第5行之间添加一个空行.然后它稍后返回.
可能是什么导致了这个?
Cro*_*ked 88
在iis中以及从visual studio运行时,我遇到了同样的问题.在visual studio 2013中禁用浏览器链接似乎解决了这个问题.此功能会将一些javascript注入您的页面,至少会对我造成这个问题.因为我现在禁用它它在IIS和Visual Studio中工作.
有关此功能的更多详细信息
干杯,Crocked
| 归档时间: |
|
| 查看次数: |
16853 次 |
| 最近记录: |