下午安装WSE3.0,开发版本。
发现说明中要求在打开vs2005的情况下安装,重复安装一次。

然后安装IIS(winxp sp2)。
查看sample code readme文件,找到C:\Program Files\Microsoft WSE\v3.0\Samples目录下的setup.bat文件,在vs2005的cmd下执行。

在C:\Program Files\Microsoft WSE\v3.0\Samples\CS\QuickStart\Basic\BaseStockService目录下找到CreateSampleVdir.bat文件,执行之。自动建立了web service使用的IIS虚拟目录。

确保IIS默认站点asp.net版本2.0

访问asp.net web service:http://localhost/StockService/StockService.asmx,出现错误,根据错误提示打开http://localhost/StockService/StockService.asmx,发现以下内容:
如果您使用 ASP.Net 2.0, 您需要为 Windows 用户帐户, 授予元数据库权限运行 ASP.NET IIS 注册工具与 ga 选项 - 工具所示, 而不是命令。 例如, 以下命令行授予 Windows 用户: 帐户 <WindowsUserAccount > 权限对 IIS 元数据库
aspnet_regiis –ga <WindowsUserAccount>

使用aspnet_regiis –ga aspnet 命令在vs2005的cmd下执行后,访问http://localhost/StockService/StockService.asmx正常。

Asp.net web service运行在IIS6.0下的用户帐号:缺省情况下,winxp操作系统下为aspnet,win2003下

为NETWORK SERVICE(本地账户?)
引用原文:
Web Services Enhancements 3.0 
How to: Make X.509 Certificates Accessible to WSE 

For Web services created using ASP.NET, the account the ASP.NET worker process runs under is controlled by the <processModel> element in the Machine.config file, unless the Web service is running under Internet Information Services (IIS) version 6.0. Set the userName attribute of the <processModel> element to specify the account ASP.NET runs under. By default, the userName attribute is set to the special Machine account, which maps to the low-privileged ASPNET user account created when the .NET Framework SDK is installed. IIS 6 uses application pools to determine the process identity, and the default account a Web service runs under is Network Service. Therefore, for a Web service running under IIS 6, the default user account is Network Service; otherwise the default is the ASPNET user account.


通过更改Machine.config 中的<processModel>元素的userName属性,改变默认的用户。

posted on 2006-10-04 23:12  Lotus  阅读(1127)  评论(1编辑  收藏  举报