谢谢,Russ 解决方案 你好Russ, 欢迎光临MSDN新闻组。 根据您的描述,您有一个c ++构建的Webservcie,它将访问本地域服务器上的 远程文件。在/ b win2k服务器上进行部署时效果很好,但是在将其移动到winxp框后,您在执行文件访问时发现 webservice失败并出现权限错误/> 操作,是吗? VC ++ webservice的AS是否在IIS中管理,你是如何创建的? 并部署它?一般来说,权限问题可能是由 webservice的进程标识引起的。对于大多数服务应用程序,他们是在一个非交互式帐户(本地帐户)下运行的b 远程可用。因此,当访问远程机器上的资源时,这样的本地 服务accont将被识别为NULL会话。对于windows explorer 或其他标准Windows应用程序,它们在 交互式登录用户的帐户下运行,并且当交互式用户是域时 用户,它肯定对远程机器有效。 所以请检查一下,如果你有任何问题,请随时在这里发布 进一步查找或提问。 Steven Cheng Microsoft在线支持 安全! www.microsoft.com/security (此帖子按原样提供,不作任何保证,并且不授予 权利。) -------- ------------ | NNTP-Posting-Date:2005年10月16日星期日15:23:11 -0500 |来自:Russ< ru **** @ eticomm.net> |新闻组:microsoft.public.dotnet.general |主题:权限错误 |日期:2005年10月16日星期日16:23:08 -0400 |消息ID:< th ******************************** @ 4ax.com> | X-Newsreader:Forte Agent 3.0 / 32.763 | MIME版本:1.0 |内容类型:text / plain; charset = us-ascii |内容传输编码:7位 |行数:19 | NNTP-Posting-Host:68.37.155.53 | X-跟踪:! SV3-WvRc + U + MgszlORlfxxo / gw1CB4QeCMbRWge6uJZfqu1poXRF9nyjO4sbT2RrSqItP0zWFP 0F ICfXpfc IGA9Jyv54ErQe3Cjgk8eO4N7M2LAayvzLbN87cmpOB 8GJxt0WNYj77Zlz6C4uKfEoYW8 EeDeRHbG 47Nts75I | X-Complaints-To: ab***@comcast.net | X-DMCA-Complaints-To: dm**@comcast.net | X-Abuse-and-DMCA-Info:请务必转发所有标题的副本 | X-Abuse-and-DMCA-Info:否则我们将无法正确处理您的 投诉 | X-Postfilter:1.3.32 |路径: TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornad o.fastwebnet.it!tiscali!ne wsfeed1.ip.tiscali.net!news。 glorb.com!postnews.goo gle.com!news4.google.com!b order1.nntp.dca.giganews.com!nntp.giganews.com!loc al01.nntp.dca.giganews .com !nntp.comcast.com!news.comcast.com.POSTED!not-for-mail |外部参照:TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:52108 | X-Tomcat-NG:microsoft.public.dotnet.general | | |你好。我的新开发机器正在运行XP专业版。在过去所有 |设备只使用了Windows 2000.我遇到了很多问题 |让我的项目在新机器上启动并运行。目前 |一个是权限错误。 | |该项目是VC ++ Web服务。当服务是 |时,它工作正常托管在旧的W2K开发机器上,但在新的XP机器上我得到了一个 |服务尝试在 |上打开文本文件时出现权限错误Windows 2000域服务器。这是一个跨越 |的标准fopen电话LAN。我从Windows资源管理器打开文件没有问题,或者 |从XP机器上的标准Windows程序,但与Web |服务,当在XP机器上运行时,fopen调用返回NULL |和GetNextError返回5 - 权限错误。 | |我找不到任何理由 - 任何帮助? | |谢谢,Russ | | 2005年10月17日星期一03:18: 00 GMT, st*****@online.microsoft.com (史蒂文 Cheng [MSFT])写道: 你好Russ, 欢迎来到MSDN新闻组。根据你的描述,你有一个c ++构建的Webservcie将访问本地域服务器上的远程文件。这在部署在win2k服务器上时运行良好,但是在将其移动到winxp框后,在执行文件访问操作时,您发现 webservice失败并出现权限错误,是吗? 不完全是。 Web服务正在开发工作站上运行,在XP下运行。它访问W2K服务器上的文件。当我在XP工作站运行或调试它是b $ b时,它是否失败。当我在W2K Pro工作站上构建和测试 相同的源代码时,没有失败。 另外,如果我在W2K上部署Web服务服务器,它工作正常。所以 问题就在于XP工作站。 VC ++ webservice的AS是在IIS中使用的,你是如何创建它并部署它的? 我认为你的意思是托管,而不是软管?我同意 声明,哈哈。 它是使用Visual Studio使用托管C ++创建的。它调用 一个非托管库,这个库调用 打开服务器文件。我已经尝试了各种方法来部署它。 VC ++在本地计算机上自动部署它,但我还建立了一个部署项目并使用它来部署当地的 机器。另外,我尝试通过IIS手动创建一个虚拟的 目录。 一般来说,权限问题可能是由于web服务的进程识别引起的。对于大多数服务应用程序,它们是在非交互式帐户(本地帐户)下运行的,这些帐户不会被远程访问。因此,当访问远程计算机上的资源时,这样的本地服务accont将被识别为NULL会话。对于Windows资源管理器或其他标准的Windows应用程序,它们在交互式登录用户的帐户下运行,当交互式用户是域用户时,它'肯定对远程机器有效。 在web.config文件中,我有: < identity impersonate =" true" userName =" xps.PrsNj.local \Russ" password =" xxx" /> 这是否允许Web服务在XP机器上获得 用户帐户的权限? (XPS是机器名称。) 所以请检查一下,如果您有任何进一步的发现或问题,请随时在此发布。 我确定这是问题的症结所在,但我该怎么办呢?检查并治愈它?为什么它在XP下失败但在W2K Pro下没有?b $ b?我确实发现对于XP,在我的冒充 语句中我必须使用XPS机器的完整域名, xps.PrsNj.local,而在W2K中我需要的是xps.russ。 谢谢你。 Russ Steven Cheng 微软在线支持 获得安全! www.microsoft.com/security (此帖已提供按原样,没有任何保证,也没有赋予权利。) -------------------- | NNTP-Posting-Date:2005年10月16日星期日15:23:11 -0500 |来自:Russ< ru **** @ eticomm.net> |新闻组:microsoft.public.dotnet.general |主题:许可错误 |日期:2005年10月16日星期日16:23:08 -0400 |消息ID:< th ******************************** @ 4ax.com> | X-Newsreader:Forte Agent 3.0 / 32.763 | MIME版本:1.0 |内容类型:text / plain; charset = us-ascii | Content-Transfer-Encoding:7bit |行:19 | NNTP-Posting-Host:68.37.155.53 | X-跟踪: SV3-WvRc + U + MgszlORlfxxo / gw1CB4QeCMbRWge6uJZfqu1poXRF9nyjO4sbT2RrSqItP0zWFP 0F ICfXpfc IGA9Jyv54ErQe3Cjgk8eO4N7M2LAayvzLbN87cmpO B8GJxt0WNYj77Zlz6C4uKfEoYW8 EeDeRHbG 47Nts75I |! X-Complaints-To: ab***@comcast.net | X-DMCA-Complaints-To: dm**@comcast.net | X-Abuse-and-DMCA-Info:请务必转发所有标题的副本 | X-Abuse-and-DMCA-Info:否则我们将无法正确处理您的投诉 | X-Postfilter:1.3.32 |路径: TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!torna do.fastwebnet.it!tiscali!ne wsfeed1.ip.tiscali.net!news.glorb.com!postnews.go ogle .com!news4.google.com!b order1.nntp.dca.giganews.com!nntp.giganews.com!lo cal01.nntp.dca.giganews.com !nntp.comcast.com !news.comcast.com.POSTED!不用于邮件 |外部参照:TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:52108 | X-Tomcat-NG:microsoft.public.dotnet.general | | |你好。我的新开发机器正在运行XP专业版。在过去所有 |设备只使用了Windows 2000.我遇到了很多问题 |让我的项目在新机器上启动并运行。目前 |一个是权限错误。 | |该项目是VC ++ Web服务。当服务是 |时,它工作正常托管在旧的W2K开发机器上,但在新的XP机器上我得到了一个 |服务尝试在 |上打开文本文件时出现权限错误Windows 2000域服务器。这是一个跨越 |的标准fopen电话LAN。从Windows资源管理器打开文件没问题,或者 |从XP机器上的标准Windows程序,但与Web |服务,当在XP机器上运行时,fopen调用返回NULL |和GetNextError返回5 - 权限错误。 | |我找不到任何理由 - 有什么帮助吗? | |谢谢,Russ | | 你好Russ, 谢谢你回复。 如你所说,你在web.config中使用了以下配置 < identity impersonate =" true" userName =" xps.PrsNj.local \Russ" password =" xxx" /> 表示网络服务将在模仿标识下运行。 此外,xps.PrsNj.local \Russ"是XP机器上的本地帐户,是吗? 如果是这样,它不能远程到其他远程机器。是一个域中的xp客户端 机器和win2k盒子 环境?如果是这样,您可以尝试将webservice配置为在 a域帐户下运行,以便可以在win2k服务器计算机上进行验证。 此外,是win2k盒子上有SQLserver吗?如果是这样,您可以尝试让web服务连接到sqlserver,以便您可以在服务器上查看哪个 cilent帐户(通过SQLserver探查器)。如果没有可用的sqlserver,你可以尝试在2k服务器机器上打开共享文件夹的上的NTFS安全审核。因此,我们也可以查看审核日志 来检查客户帐户。 谢谢, Steven Cheng Microsoft在线支持 安全! www.microsoft.com/security (此帖子按原样提供,不作任何保证,并且不授予 权利。) ------------ -------- | NNTP-Posting-Date:Mon,2005年10月17日08:42:39 -0500 |来自:Russ< ru **** @ eticomm.net> |新闻组:microsoft.public.dotnet.general |主题:回复:权限错误 |日期:星期一,2005年10月17日09:42:38 -0400 |消息ID:< d4 ******************************** @ 4ax.com> |参考文献:< th ******************************** @ 4ax.com> < yI ************** @ TK2MSFTNGXA01.phx.gbl> | X-Newsreader:Forte Agent 3.0 / 32.763 | MIME版本:1.0 |内容类型:text / plain; charset = us-ascii |内容传输编码:7位 |行数:126 | NNTP-Posting-Host:68.37.155.53 | X-跟踪:! SV3-gDWyCGpEupEX0j1fSbjlcEQCmafJ9o78ImvcZFRYgzuTJrUVBX NwSDFvEjXU0WYIV5S0Sj4x XAEYD4F + gD1O9UCRQPn / fWaZqe5gZu0a + kJQob50YgYeH4Vz0b8yN5CDADz5iCAiAyr6i + J26IP 8Kdp9Ub8 SFDYpnTo | X-Complaints-To: ab***@comcast.net | X-DMCA-Complaints-To: dm**@comcast.net | X-Abuse-and-DMCA-Info:请务必转发所有标题的副本 | X-Abuse-and-DMCA-Info:否则我们将无法正确处理您的 投诉 | X-Postfilter:1.3.32 |路径: TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornad o.fastwebnet.it!tiscali!ne wsfeed1.ip.tiscali.net!proxad。 net!216.239.36.134.M ISMATCH!postnews.google.co m!news4.google.com!border1.nntp.dca.giganews.com!n ntp.giganews.com!local01.n ntp.dca.giganews.com!nntp.comcast.com!news.comcast .com.POSTED!not-for-mail |外翻:TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:52146 | X-Tomcat-NG:microsoft.public.dotnet.general | | 2005年10月17日星期一03:18:00 GMT, st*****@online.microsoft.com (Steven | Cheng [MSFT])写道: | | >嗨拉斯, | > | >欢迎来到MSDN新闻组。 | >根据您的描述,您有一个c ++构建的Webservcie将访问 a | >本地域服务器上的远程文件。在部署 a |时,这很有效> win2k服务器,但是在将它移动到winxp框后,你找到了 | > webservice在执行文件访问时因权限错误而失败 | >操作,是吗? | |不完全是。 Web服务正在开发站运行 |在XP下。它访问W2K服务器上的文件。当我运行或调试 |它在XP站上,是它失败的时候。当我构建并测试 |时W2K Pro工作站上的相同源代码没有失败。 | |此外,如果我在W2K服务器上部署Web服务,它可以正常工作。所以 |问题出在XP工作站上。 | | > | >用于VC ++ webservice的AS是在IIS中使用的,你是如何创建 的那样 | >并部署它? | |我认为你的意思是托管,而不是软管?我同意 |声明,哈哈。 | |它是使用Visual Studio使用托管C ++创建的。它打电话给 |一个非托管库,这个库调用了 |打开服务器文件。我尝试了各种方法来部署它。 | VC ++在本地机器上自动部署它,但我还有 |构建了一个部署项目并用它来部署在本地 |机。另外我尝试手动创建虚拟 |目录通过IIS。 | | >一般来说,许可问题可能是由 |引起的> webservice'的流程标识。对于大多数服务应用程序,他们是 | >在非互动帐户(本地帐户)下运行,这不会是 | >远程的。所以当访问远程机器上的资源时,这样的本地 | > service accont将被识别为NULL会话。对于windows explorer | >或其他标准的Windows应用程序,它们在 |下运行>交互式登录用户的帐户以及当交互式用户是 域名时 | >用户,它肯定对远程机器有效。 | |在web.config文件中,我有: | | < identity impersonate =" true" userName =" xps.PrsNj.local \Russ" |密码= QUOT; XXX" /> | |这不允许Web服务承担 |的权限XP机器上的用户帐户? (XPS是机器名称。) | | > | >所以请检查一下,如果你有任何价值,可以随时在这里发布 any | >进一步查找或提问。 | |我确定这是问题的症结所在,但我该如何处理 |检查出来并治愈它?为什么它在XP下失败但不是 |在W2K Pro下?我确实发现对于XP,在我的冒充中 |声明我必须使用XPS机器的完整域名, | xps.PrsNj.local,而在W2K中,我需要的只是xps.russ。 | |谢谢。 Russ | | > | > Steven Cheng | > Microsoft在线支持 | > | >安全! www.microsoft.com/security | >(此帖子按原样提供,不作任何保证,并且不授予 |>权利。) | > | > | > | > | > -------------------- | > | NNTP-Posting-Date:2005年10月16日星期日15:23:11 -0500 | > |来自:Russ< ru **** @ eticomm.net> | > |新闻组:microsoft.public.dotnet.general | > |主题:权限错误 | > |日期:2005年10月16日星期日16:23:08 -0400 | > |消息ID:< th ******************************** @ 4ax.com> | > | X-Newsreader:Forte Agent 3.0 / 32.763 | > | MIME版本:1.0 | > |内容类型:text / plain; charset = us-ascii | > |内容传输编码:7位 | > |行数:19 | > | NNTP-Posting-Host:68.37.155.53 | > | X-跟踪: | SV3-WvRc + U + MgszlORlfxxo / gw1CB4QeCMbRWge6uJZfqu1poXRF9nyjO4sbT2RrSqItP0zWFP 0 ˚F | ICfXpfc IGA9Jyv54ErQe3Cjgk8eO4N7M2LAayvzLbN87cmpO B8GJxt0WNYj77Zlz6C4uKfEoYW $! b $ b 8 | > EeDeRHbG!47Nts75I | > | X-Complaints-To: ab***@comcast.net | > | X-DMCA-Complaints-To: dm**@comcast.net | > | X-Abuse-and-DMCA-Info:请务必转发所有标题的副本 | > | X-Abuse-and-DMCA-Info:否则我们将无法处理您的 | >正确投诉 | > | X-Postfilter:1.3.32 | > |路径: | TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!torna do.fastwebnet.it!tiscali!n e | wsfeed1.ip。 tiscali.net!news.glorb.com!postnews.go ogle.com!news4.google.com! b | order1.nntp.dca.giganews.com!nntp.giganews.com!lo cal01.nntp.dca.giganews.co m | >!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail | > |外部参照:TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:52108 | > | X-Tomcat-NG:microsoft.public.dotnet.general | > | | > | | > |你好。我的新开发机器正在运行XP专业版。在过去所有 | > |设备只使用了Windows 2000.我遇到了很多问题 | > |让我的项目在新机器上启动并运行。目前 | > |一个是权限错误。 | > | | > |该项目是VC ++ Web服务。当服务是 |时,它工作正常> |托管在旧的W2K开发机器上,但在新的XP机器上我得到了一个 | > |服务尝试在 |上打开文本文件时出现权限错误> | Windows 2000域服务器。这是一个跨越 |的标准fopen电话> | LAN。我从Windows资源管理器打开文件没有问题,或者 | > |从XP机器上的标准Windows程序,但与Web | > |服务,当在XP机器上运行时,fopen调用返回NULL | > |和GetNextError返回5 - 权限错误。 | > | | > |我找不到任何理由 - 任何帮助? | > | | > |谢谢,Russ | > | | > | | Hello. My new dev machine is running XP Pro. In the past allequipment has only used Windows 2000. I have had a lot of problemsgetting my projects up and running on the new machine. The currentone is a permission error. The project is a VC++ Web Service. It works fine when the service ishosted on the old W2K dev machine, but on the new XP machine I get apermission error when the service tries to open a text file on theWindows 2000 domain server. It is a standard fopen call across theLAN. I have no problem opening the file from Windows Explorer, orfrom a standard windows program on the XP machine, but with the WebService, when running on the XP machine, the fopen call returns NULLand GetNextError returns 5 - permission error. I cannot find any reason - any help? Thanks, Russ 解决方案 Hi Russ, Welcome to MSDN newsgroup.From your description, you have a c++ built Webservcie which will access aremote file on a local domain server. This works well when deploying on awin2k server , however after move it to a winxp box, you found thewebservice failed with permission error when perform the file accessingoperation, yes? AS for the VC++ webservice is it hosed in IIS and how did you creating itand deploying it? Generally the permission problem is likely caused by thewebservice''s process idenitity. For most service applications they''rerunning under a non-interactive account(local account ) which won''t beremotable. So when accessing resources on remote machine, such localservice accont will be recoginzed as NULL session. For "windows explorer"or other standard windows applications, they''re running under theinterative logon user''s account and when the interactive user is a domainuser, it''ll surely be valid to remote machine. So please have a check on this and feel free to post here if you have anyfurther finding or questions. Steven ChengMicrosoft Online Support Get Secure! www.microsoft.com/security(This posting is provided "AS IS", with no warranties, and confers norights.) --------------------| NNTP-Posting-Date: Sun, 16 Oct 2005 15:23:11 -0500| From: Russ <ru****@eticomm.net>| Newsgroups: microsoft.public.dotnet.general| Subject: Permission Errors| Date: Sun, 16 Oct 2005 16:23:08 -0400| Message-ID: <th********************************@4ax.com>| X-Newsreader: Forte Agent 3.0/32.763| MIME-Version: 1.0| Content-Type: text/plain; charset=us-ascii| Content-Transfer-Encoding: 7bit| Lines: 19| NNTP-Posting-Host: 68.37.155.53| X-Trace:sv3-WvRc+U+MgszlORlfxxo/gw1CB4QeCMbRWge6uJZfqu1poXRF9nyjO4sbT2RrSqItP0zWFP 0FICfXpfc!IGA9Jyv54ErQe3Cjgk8eO4N7M2LAayvzLbN87cmpOB 8GJxt0WNYj77Zlz6C4uKfEoYW8EeDeRHbG!47Nts75I| X-Complaints-To: ab***@comcast.net| X-DMCA-Complaints-To: dm**@comcast.net| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process yourcomplaint properly| X-Postfilter: 1.3.32| Path:TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornad o.fastwebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!postnews.goo gle.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!loc al01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:52108| X-Tomcat-NG: microsoft.public.dotnet.general||| Hello. My new dev machine is running XP Pro. In the past all| equipment has only used Windows 2000. I have had a lot of problems| getting my projects up and running on the new machine. The current| one is a permission error.|| The project is a VC++ Web Service. It works fine when the service is| hosted on the old W2K dev machine, but on the new XP machine I get a| permission error when the service tries to open a text file on the| Windows 2000 domain server. It is a standard fopen call across the| LAN. I have no problem opening the file from Windows Explorer, or| from a standard windows program on the XP machine, but with the Web| Service, when running on the XP machine, the fopen call returns NULL| and GetNextError returns 5 - permission error.|| I cannot find any reason - any help?|| Thanks, Russ|| On Mon, 17 Oct 2005 03:18:00 GMT, st*****@online.microsoft.com (StevenCheng[MSFT]) wrote: Hi Russ,Welcome to MSDN newsgroup.From your description, you have a c++ built Webservcie which will access aremote file on a local domain server. This works well when deploying on awin2k server , however after move it to a winxp box, you found thewebservice failed with permission error when perform the file accessingoperation, yes?Not exactly. The web service is being built on the dev station runningunder XP. It accesses a file on the W2K server. When I run or debugit on the XP station, is when it fails. When I build and test thesame source code on a W2K Pro workstation there is no failure. Also, if I deploy the web service on the W2K server, it works ok. Sothe problem is just with the XP workstation. AS for the VC++ webservice is it hosed in IIS and how did you creating itand deploying it?I presume you mean hosted, not hosed? I would agree with eitherstatement, ha ha. It is created with Visual Studio using managed C++. It makes calls toan unmanaged library and it is this library that makes the call toopen the server file. I have tried a variety of methods to deploy it.VC++ deploys it automatically on the local machine, but I have alsobuilt a deployment project and used that to deploy on the localmachine. Additionally I have tried manually creating a virtualdirectory via IIS. Generally the permission problem is likely caused by thewebservice''s process idenitity. For most service applications they''rerunning under a non-interactive account(local account ) which won''t beremotable. So when accessing resources on remote machine, such localservice accont will be recoginzed as NULL session. For "windows explorer"or other standard windows applications, they''re running under theinterative logon user''s account and when the interactive user is a domainuser, it''ll surely be valid to remote machine.In the web.config file, I have: <identity impersonate="true" userName="xps.PrsNj.local\Russ"password="xxx" /> Does not this allow the web service to take on the permissions of theuser account on the XP machine? (XPS is the machine name.) So please have a check on this and feel free to post here if you have anyfurther finding or questions.I''m sure this is the crux of the problem, but how do I go aboutchecking it out and curing it? And why does it fail under XP but notunder W2K Pro? I did discover that for XP, in my impersonatestatement I had to use the full domain name of the XPS machine,xps.PrsNj.local, whereas in W2K all I needed was xps.russ. Thanks you. Russ Steven ChengMicrosoft Online SupportGet Secure! www.microsoft.com/security(This posting is provided "AS IS", with no warranties, and confers norights.) --------------------| NNTP-Posting-Date: Sun, 16 Oct 2005 15:23:11 -0500| From: Russ <ru****@eticomm.net>| Newsgroups: microsoft.public.dotnet.general| Subject: Permission Errors| Date: Sun, 16 Oct 2005 16:23:08 -0400| Message-ID: <th********************************@4ax.com>| X-Newsreader: Forte Agent 3.0/32.763| MIME-Version: 1.0| Content-Type: text/plain; charset=us-ascii| Content-Transfer-Encoding: 7bit| Lines: 19| NNTP-Posting-Host: 68.37.155.53| X-Trace:sv3-WvRc+U+MgszlORlfxxo/gw1CB4QeCMbRWge6uJZfqu1poXRF9nyjO4sbT2RrSqItP0zWFP 0FICfXpfc!IGA9Jyv54ErQe3Cjgk8eO4N7M2LAayvzLbN87cmpO B8GJxt0WNYj77Zlz6C4uKfEoYW8EeDeRHbG!47Nts75I| X-Complaints-To: ab***@comcast.net| X-DMCA-Complaints-To: dm**@comcast.net| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process yourcomplaint properly| X-Postfilter: 1.3.32| Path:TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!torna do.fastwebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!postnews.go ogle.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!lo cal01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:52108| X-Tomcat-NG: microsoft.public.dotnet.general||| Hello. My new dev machine is running XP Pro. In the past all| equipment has only used Windows 2000. I have had a lot of problems| getting my projects up and running on the new machine. The current| one is a permission error.|| The project is a VC++ Web Service. It works fine when the service is| hosted on the old W2K dev machine, but on the new XP machine I get a| permission error when the service tries to open a text file on the| Windows 2000 domain server. It is a standard fopen call across the| LAN. I have no problem opening the file from Windows Explorer, or| from a standard windows program on the XP machine, but with the Web| Service, when running on the XP machine, the fopen call returns NULL| and GetNextError returns 5 - permission error.|| I cannot find any reason - any help?|| Thanks, Russ||Hi Russ, Thanks for your response.As you mentioned that you''ve use the following configuration in web.config<identity impersonate="true" userName="xps.PrsNj.local\Russ"password="xxx" /> that means the webservice will running under the impersonate idenitity.Also, the "xps.PrsNj.local\Russ" is a local account on the XP machine, yes?If so, it is not remotable to other remote machines. Are the xp clientmachine and win2k box in a domainenvironment? If so , you can try configured the webservice to running undera domain account so that it can be validated on the win2k server machine. In addition, is there SQLserver on the win2k box? If so, you can try letthe webservice make connection to sqlserver so that you can watch whichcilent account is logon at the server (through the SQLserver profiler). Ifno sqlserver available, you can try turning on the NTFS security audit onthat shared folder at the 2k server machine. Thus , we can watch audit logto check the client account also. Thanks, Steven ChengMicrosoft Online Support Get Secure! www.microsoft.com/security(This posting is provided "AS IS", with no warranties, and confers norights.) --------------------| NNTP-Posting-Date: Mon, 17 Oct 2005 08:42:39 -0500| From: Russ <ru****@eticomm.net>| Newsgroups: microsoft.public.dotnet.general| Subject: Re: Permission Errors| Date: Mon, 17 Oct 2005 09:42:38 -0400| Message-ID: <d4********************************@4ax.com>| References: <th********************************@4ax.com><yI**************@TK2MSFTNGXA01.phx.gbl>| X-Newsreader: Forte Agent 3.0/32.763| MIME-Version: 1.0| Content-Type: text/plain; charset=us-ascii| Content-Transfer-Encoding: 7bit| Lines: 126| NNTP-Posting-Host: 68.37.155.53| X-Trace:sv3-gDWyCGpEupEX0j1fSbjlcEQCmafJ9o78ImvcZFRYgzuTJrUVBX NwSDFvEjXU0WYIV5S0Sj4xXAEYD4F!+gD1O9UCRQPn/fWaZqe5gZu0a+kJQob50YgYeH4Vz0b8yN5CDADz5iCAiAyr6i+ J26IP8Kdp9Ub8!SFDYpnTo| X-Complaints-To: ab***@comcast.net| X-DMCA-Complaints-To: dm**@comcast.net| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process yourcomplaint properly| X-Postfilter: 1.3.32| Path:TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornad o.fastwebnet.it!tiscali!newsfeed1.ip.tiscali.net!proxad.net!216.239.36.134.M ISMATCH!postnews.google.com!news4.google.com!border1.nntp.dca.giganews.com!n ntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast .com.POSTED!not-for-mail| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:52146| X-Tomcat-NG: microsoft.public.dotnet.general|| On Mon, 17 Oct 2005 03:18:00 GMT, st*****@online.microsoft.com (Steven| Cheng[MSFT]) wrote:|| >Hi Russ,| >| >Welcome to MSDN newsgroup.| >From your description, you have a c++ built Webservcie which will accessa| >remote file on a local domain server. This works well when deploying ona| >win2k server , however after move it to a winxp box, you found the| >webservice failed with permission error when perform the file accessing| >operation, yes?|| Not exactly. The web service is being built on the dev station running| under XP. It accesses a file on the W2K server. When I run or debug| it on the XP station, is when it fails. When I build and test the| same source code on a W2K Pro workstation there is no failure.|| Also, if I deploy the web service on the W2K server, it works ok. So| the problem is just with the XP workstation.|| >| >AS for the VC++ webservice is it hosed in IIS and how did you creatingit| >and deploying it?|| I presume you mean hosted, not hosed? I would agree with either| statement, ha ha.|| It is created with Visual Studio using managed C++. It makes calls to| an unmanaged library and it is this library that makes the call to| open the server file. I have tried a variety of methods to deploy it.| VC++ deploys it automatically on the local machine, but I have also| built a deployment project and used that to deploy on the local| machine. Additionally I have tried manually creating a virtual| directory via IIS.|| > Generally the permission problem is likely caused by the| >webservice''s process idenitity. For most service applications they''re| >running under a non-interactive account(local account ) which won''t be| >remotable. So when accessing resources on remote machine, such local| >service accont will be recoginzed as NULL session. For "windowsexplorer"| >or other standard windows applications, they''re running under the| >interative logon user''s account and when the interactive user is adomain| >user, it''ll surely be valid to remote machine.|| In the web.config file, I have:|| <identity impersonate="true" userName="xps.PrsNj.local\Russ"| password="xxx" />|| Does not this allow the web service to take on the permissions of the| user account on the XP machine? (XPS is the machine name.)|| >| >So please have a check on this and feel free to post here if you haveany| >further finding or questions.|| I''m sure this is the crux of the problem, but how do I go about| checking it out and curing it? And why does it fail under XP but not| under W2K Pro? I did discover that for XP, in my impersonate| statement I had to use the full domain name of the XPS machine,| xps.PrsNj.local, whereas in W2K all I needed was xps.russ.|| Thanks you. Russ|| >| >Steven Cheng| >Microsoft Online Support| >| >Get Secure! www.microsoft.com/security| >(This posting is provided "AS IS", with no warranties, and confers no| >rights.)| >| >| >| >| >--------------------| >| NNTP-Posting-Date: Sun, 16 Oct 2005 15:23:11 -0500| >| From: Russ <ru****@eticomm.net>| >| Newsgroups: microsoft.public.dotnet.general| >| Subject: Permission Errors| >| Date: Sun, 16 Oct 2005 16:23:08 -0400| >| Message-ID: <th********************************@4ax.com>| >| X-Newsreader: Forte Agent 3.0/32.763| >| MIME-Version: 1.0| >| Content-Type: text/plain; charset=us-ascii| >| Content-Transfer-Encoding: 7bit| >| Lines: 19| >| NNTP-Posting-Host: 68.37.155.53| >| X-Trace:|sv3-WvRc+U+MgszlORlfxxo/gw1CB4QeCMbRWge6uJZfqu1poXRF9nyjO4sbT2RrSqItP0zWFP 0F|ICfXpfc!IGA9Jyv54ErQe3Cjgk8eO4N7M2LAayvzLbN87cmpO B8GJxt0WNYj77Zlz6C4uKfEoYW8| >EeDeRHbG!47Nts75I| >| X-Complaints-To: ab***@comcast.net| >| X-DMCA-Complaints-To: dm**@comcast.net| >| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers| >| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your| >complaint properly| >| X-Postfilter: 1.3.32| >| Path:|TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!torna do.fastwebnet.it!tiscali!ne|wsfeed1.ip.tiscali.net!news.glorb.com!postnews.go ogle.com!news4.google.com!b|order1.nntp.dca.giganews.com!nntp.giganews.com!lo cal01.nntp.dca.giganews.com| >!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail| >| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:52108| >| X-Tomcat-NG: microsoft.public.dotnet.general| >|| >|| >| Hello. My new dev machine is running XP Pro. In the past all| >| equipment has only used Windows 2000. I have had a lot of problems| >| getting my projects up and running on the new machine. The current| >| one is a permission error.| >|| >| The project is a VC++ Web Service. It works fine when the service is| >| hosted on the old W2K dev machine, but on the new XP machine I get a| >| permission error when the service tries to open a text file on the| >| Windows 2000 domain server. It is a standard fopen call across the| >| LAN. I have no problem opening the file from Windows Explorer, or| >| from a standard windows program on the XP machine, but with the Web| >| Service, when running on the XP machine, the fopen call returns NULL| >| and GetNextError returns 5 - permission error.| >|| >| I cannot find any reason - any help?| >|| >| Thanks, Russ| >|| >|| 这篇关于权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-10 05:02