Arka plan: VB.NET arka uçlu ASP.NET Webforms Uygulaması.VirtualPath, geçerli uygulama kökünün dışındaydı
Kısa bir süre önce Visual Studio 2010'dan Visual Studio 2013 ve .NET 4.5.1'e yükselttim. Bu kod, Visual Studio 2005 ve .NET 2.0'da bulunduğundan beri çalışıyordu. Ama yükseltme beri bu hatayı alıyorum.
ASCX Kullanıcı Denetimi.
<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)%>;
}
önce biz şimdi elimizdeki asla bu hatayı alıyorum:
Ben dosya ile oynamak ve bir saçma değişiklik yaparsanızVirtualPath 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','');
, hata kaybolur. Örnek: Satır 4 ve 5 arasında boş bir satır ekleyin. Daha sonra geri gelir.
Buna neden olabilir?
bu çünkü eski Okulu
dgarbacz