解决一个比较奇怪的NET问题的方法
2024-07-21 02:16:57
供稿:网友
最近遇到一个比较棘手的问题,在编译完一个。net项目后,遇到如下出错信息
after you compile your web application, you may receive the following error messages in
the microsoft visual studio .net task list:
could not copy temporary files to the output directory.
-and-
the file 'bin/mywebapp.dll' cannot be copied to the run directory. the process cannot
access the file because it is being used by another process.
-and-
the file 'bin/mywebapp.pdb' cannot be copied to the run directory. the process cannot
access the file because it is being used by another process.
微软对此的解释为如下,
cause
typically, this problem occurs because of a trailing backslash at the end of the path that
is set for the root web site. for example:
c:/inetpub/wwwroot/
this causes the mechanism that copies the dlls from your bin directory to the temporary
asp.net files folder to fail. when this mechanism fails, the runtime loads the dll
directly from the bin directory rather then from the temporary asp.net files folder.
this problem may also occur if any virtual directories with trailing backslashes have
child directories that are marked as web applications.
resolution
a supported fix is now available from microsoft, but it is only intended to correct the
problem described in this article and should be applied only to systems experiencing this
specific problem. this fix may receive additional testing at a later time, to further
ensure product quality. therefore, if you are not severely affected by this problem,
microsoft recommends that you wait for the next microsoft .net framework service pack that
contains this fix.
to resolve this problem immediately, contact microsoft product support services to obtain
the fix. for a complete list of microsoft product support services phone numbers and
information about support costs, please go to the following address on the world wide web:
http://support.microsoft.com/directory/overview.asp
note : in special cases, charges that are normally incurred for support calls may be
canceled, if a microsoft support professional determines that a specific update will
resolve your problem. normal support costs will apply to additional support questions and
issues that do not qualify for the specific update in question.
the english version of this fix should have the following file attributes or later:
date time version size file name
--------------------------------------------------------------
26-mar-2002 04:35 1.0.3705.213 192,512 aspnet_isapi.dll
26-mar-2002 04:30 19,332 aspnet_perf.ini
26-mar-2002 04:35 1.0.3705.213 24,576 aspnet_regiis.exe
26-mar-2002 04:35 1.0.3705.213 28,672 aspnet_wp.exe
20-mar-2002 12:31 8,709 smartnav.js
20-mar-2002 12:31 7,003 smartnavie5.js
26-mar-2002 13:34 1.0.3705.213 1,183,744 system_web.dll
note : this fix requires microsoft .net framework service pack 1.
我在看到此文前对此的解决方法是,ctrl+alt+del,将进程中的aspnet_wp.exe去掉,
再运行,一切ok,哈哈,微软的东西真怪呀