简体   繁体   English

Web服务IIS和权限401错误

[英]Webservice IIS and permissions 401 Error

I have an issue I do not understand 我有一个我不明白的问题

I have a Webservices (not WCF) in two different locations, my localhost and our development server. 我在两个不同的位置(本地主机和开发服务器)有一个Web服务(不是WCF)。

My localhost is running 我的本地主机正在运行

XP SP3 IIS 5.1 XP SP3 IIS 5.1

Dev Server is running 开发服务器正在运行

Windows Server 2003 SP 2 IIS 6.0 Windows Server 2003 SP 2 IIS 6.0

Directory Security in IIS for Both is Anonymous Access and Integrated Windows authentication 两者中的IIS中的目录安全性都是匿名访问和集成Windows身份验证

My issue is when I run the following code from inside VS2010 我的问题是当我从VS2010内部运行以下代码时

Dim ws As RunExternalProcess.ProcessExecution = New RunExternalProcess.ProcessExecution
ws.Timeout = Convert.ToInt32(ConfigurationManager.GetConfigurationValue(KEY_VALUE_PROCESS_TIMEOUT_MILLISECONDS))
ws.ExecuteProcess (BusinessClasses.RunExternalProcess.enuProcessType.EFTCreateFile, PROC_POST, strParameters)

When the webservice is pointed to the Dev server it runs fine. 当Web服务指向Dev服务器时,它运行良好。 When pointed to my local I get a HTTP 401 error 当指向我的本地计算机时,出现HTTP 401错误

if I add the line 如果我添加线

 ws.Credentials = System.Net.CredentialCache.DefaultCredentials

it works fine for my local. 对我的本地用户来说效果很好。 The question I need to answer before I deploy it is why do I need the credentials line if it works fine accessing the dev web service today. 在部署之前,我需要回答的问题是,如果今天可以很好地访问开发Web服务,为什么我需要凭据行。 And what is different about my local? 我的本地人又有什么不同呢?

Any Ideas? 有任何想法吗?

You're probably not allowing anonymous access for your local server. 您可能不允许本地服务器的匿名访问

By default the client side copies the credentials/proxy settings of your Internet Explorer so you might want to check those too. 默认情况下,客户端会复制Internet Explorer的凭据/代理设置,因此您可能也要检查它们。

我还看到URL扫描也做一些奇怪的事情,如果您正在运行URL扫描,请检查这些设置是否阻止了它的访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM