我用VS.NET2003在Win2000  Server上写了一个ASP.NET  Web服务程序sporst_as,一个Windows  Form客户端程序sporst_ws,在Win2000  server上测试正常工作。但复制到XP下就不行。在XP上设置:
 
1、正确启动IIS。正确安装Microsoft.NET  Framework  1.1;  
2、SporstService.asmx  复制到inetpub\wwwroot\sporst_as下面;  
3、sporst_as.dll复制到inetpub\wwwroot\sporst_as\bin下面,同目录还有一个必须的wfgbs.mdb数据库;  
4、建立虚拟目录sporst指向inetpub\wwwroot\sporst_as目录。  
5、设置任何人可读写sporst_as目录下的任何文件。  
6、在任一目录下执行sporst_ws,出现错误信息如下:  
See  the  end  of  this  message  for  details  on  invoking    
just-in-time  (JIT)  debugging  instead  of  this  dialog  box.  
 
**************  Exception  Text  **************  
System.InvalidOperationException:  Client  found  response  content  type  of  'text/html',  but  expected  'text/xml'.  
The  request  failed  with  the  error  message:  
--  
<html>  
     <head>  
           <title>Server  Unavailable  
</title>  
     </head>  
     <body>  
           <h1><font  face=Verdana  color=#ff3300>Server  Application  Unavailable  
</font></h1>  
           <p>  
           <font  face=Verdana>  
               The  web  application  you  are  attempting  to  access  on  this  web  server  is  currently  unavailable.&nbsp;  Please  hit  the  "Refresh"  button  in  your  web  browser  to  retry  your  request.  
</p>  
     <p>  
     <b>Administrator  Note:  
</b>  An  error  message  detailing  the  cause  of  this  specific  request  failure  can  be  found  in  the  application  event  log  of  the  web  server.    Please  review  this  log  entry  to  discover  what  caused  this  error  to  occur.  
 </p>  
     </body>  
</html>  
 
...............其他信息不重要省略。在另一台XP上,安装了VS.NET2003,且新建WebApplication1能正常运行。但运行该程序,出现下面错误:System.IO.FileNotFoundException: 找不到文件或程序集名称“jwcve4_b.dll”,或找不到它的一个依赖项。
文件名: “jwcve4_b.dll”
 .......一大堆at ....省掉=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\WINDOWS\TEMP\jwcve4_b.dll
LOG: Appbase = file:///C:/Inetpub/wwwroot/sporst_as
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/WINDOWS/TEMP/jwcve4_b.dll.好象是没有应策略吧。怎么做呢?似乎这是一个Web service配置问题。求高手帮助。

解决方案 »

  1.   

    SporstService.asmx.cs的编译好的dll没复制进来?
      

  2.   

    bitsbird(一瓢 在路上...) :
    SporstService.asmx.cs的编译好的dll在bin\下面sporst_as.dll,我已经说过了。
      

  3.   

    看来,这个问题没人回答。昨晚,我试一好久,今早解决了。TNND,还是NET Framework的问题。我装过distribute版、SDK版都不行。最后没法,装VS.NET 2003自带的Framework居然成功了。当然,也将IIS也重装了。难道非要这样不可吗?什么破.NET,自已给自己加分了,别有意见。
      

  4.   

    CSDN真够可以的,还不准给自己加分,看来,还要保留这个问题。那就再这再问个,答对的朋友给100分:我现在XP上测试没问题了,我想把sporst_ws客户程序移到另一台机器上测试。估计服务器端不用配置了,客户端肯定要配置,不然找不到XP这台机器上的服务,问题是怎样配置客户端?求助中……
      

  5.   

    sporst_ws客户程序 是什么程序?
    Web服务有个地址吧,配置这个地址就行了
      

  6.   

    abiho(橡木) 别发些不着边际的东东。
    我找到了,在MSDN,远程对象配置。这里回答问题的人太少,问问题的人多。
    不来了。