1
我有一個使用Forms身份驗證的ASP.Net webforms應用程序。它需要對使用Windows身份驗證(+模擬)的web服務進行身份驗證。ASP.Net Webforms應用程序和ASP.Net webservice之間的身份驗證問題
我試過(除其他事項外)通過提供憑據:
service.Credentials = new NetworkCredential(myUserName, thePassword, theDomain)
的問題是,我得到401從WebService不管我怎麼努力。
您在IIS中爲webforms應用程序和webservice激活了哪些身份驗證方法?你正在運行哪個IIS版本? – jgauffin 2011-03-04 11:34:52
Web服務託管在IIS7上,Authentication = Basic和Impersonation = true。 Web應用程序在另一個也是IIS7的服務器上運行,並且需要Windows身份驗證。 – 2011-03-04 14:30:38