NPPYQ的学习笔记

每天进步一点点

导航

使用uddi sdk发布服务到UDDI时的安全配置

uddi sdk中的发布操作,先需要设定地址和验证方式,其中和服务的虚拟目录的安全设置和uddi角色配置等相关.

UDDI 服务的安全配置设置为 window集成验证和UDDI发布者身份验证  

Publish.AuthenticationMode 有3种:none,UddiAuthentication和windowAuthentication.

使用windowAuthentication时则以当前帐户作为凭据,使用UddiAuthentication则使用设定的用户名密码登陆.

 

1.

如果uddi虚拟服务器的安全配置 为 window集成验证或者域或者基本验证,则在用IE打开时需要输入用户名和密码.

登陆进去后能够查询,发布(根据UDDI的角色设置可能无权限发布),其能对当前用户下的服务等进行增加修改等操作.

但是使用uddi sdk无法设置其用户凭据,无法登陆.如果程序运行的用户不在服务组里面,无法设置模拟的凭据.

残念!


            Inquire.Url = ConfigurationManager.AppSettings["UDDI_InquireURL"];
            Inquire.AuthenticationMode = AuthenticationMode.WindowsAuthentication;
            Publish.Url = ConfigurationManager.AppSettings["UDDI_PublishURL"];
            Publish.AuthenticationMode = AuthenticationMode.UddiAuthentication;

            Publish.User = "user";
            Publish.Password = "Password123!";

            //Publish.AuthenticationMode = AuthenticationMode.WindowsAuthentication;

 

2.

如果uddi虚拟服务器的安全配置 为 匿名访问,则在用IE打开时能查询,但是无法发布,因为默认匿名,没有输入用户名密码步骤.

登陆进去后能够查询,无法对的服务等进行增加修改等操作.

然而使用uddi sdk 使用UddiAuthentication则使用设定的用户名密码登陆,能够进行查询发布等操作.

 

很囧~!@!$#%$@%#@%T

以下为一个哥们发帖求助的,和我说的一样,最后他"发现"只能这样了:

 

----------------------啊啊啊啊啊啊,我是分割线--------------------------

1.

hi,

I am using UDDI SDK 2.0. In my code, i am trying to publish as well as
search for businesses.

1. While publishing, I do
Publish.AuthenticationMode = AuthenticationMode.UddiAuthentication;
Also give user credentials(machine administartor) here.

2. While searching I do
Inquire.AuthenticationMode = AuthenticationMode.WindowsAuthentication;

I try to browse UDDI virtual directory, localhost/uddiit only allows me to read from UDDI repository and links for publishing are not visible. I checked the virtual dir "uddi" and it is set to allow Anonymous access. If I change it to
Integrated Windows Authentication, then I am able to browse to virtual
dir and I can add/update/delete from UDDI rep. But in this case my
code does not work.

How can i get both the code and normal browsing to work at the same time.

thanks

 

2.

Found the problem.

You need to use WindowsAuthentication for both publishing and searching. In case you use UDDI Authentication for publishing, then you need set "Enable anonymous Access" on uddi virtual directory. and then while reading if u windows authentication, then it wont work as u have set anonymous access on. so use WindowsAuthenticationMode in code for both Reading anfd publishing. Ensure that uddi vir dir is set for "Windows authentication".

 

-------------------------------啊啊啊啊啊啊,我是分割线----------------------

 

 

 

 

 

posted on 2008-12-22 19:09  NPPYQ  阅读(693)  评论(0编辑  收藏  举报