WNetAddConnection2在Windows 2008 R2中不起作用 [英] WNetAddConnection2 does not work from Windows 2008 R2
问题描述
我正在尝试使用WNetAddConnection2通过ASP.NET Web应用程序连接到网络位置.当我使用随VS2010一起提供的ASP.NET开发服务器进行调试时,一切都可以正常工作.但是,当我在Windows Server 2008 R2中部署代码时,它不会放置文件并抛出Win32异常,错误代码为0X80004005.该应用程序池标识是网络服务,我正在使用域用户帐户进行注入.
I am trying to connect to a network location through my ASP.NET web application using WNetAddConnection2. Every thing works perfectly when I debug it using the ASP.NET Development Server provided along with VS2010. But when I deploy the code in a Windows Server 2008 R2 it does not place the file and throws a Win32 exception with error code 0X80004005. The application pool identity is network service and i am using a domain user account for imparsanation.
我已经使用命令检查了连接性和用户名密码的有效性,并且可以从服务器运行方式/netonly/user:DOMAIN \ User"explorer.exe \ Path"正常运行
I have checked the connectivity and user name password validity using the command and it works pefectly from the server runas /netonly /user:DOMAIN\User "explorer.exe \Path"
还请注意,我的防火墙已关闭,并且Windows Server 2008上没有运行防病毒软件.
Please also note my firewall is switched off and i dont have an antivirus running on the Windows Server 2008.
我们非常感谢您的帮助.
Any help is really appreciated.