1
我创建了一个wcf(C#Visual Studio 2010),并将该wsp安装在SharePoint 2010 Server(不在同一台计算机上)上。在der Studio-Project中,svc和config文件位于映射的ISAPI文件夹的子文件夹中。在SharePoint中的部署工作良好,IIS7.5上虚拟_vti_bin文件夹中的svc文件是可浏览的。在测试客户端中,我可以设置对该服务的引用。当我打电话给我一个“Hello World”的方法时没问题。但是,当我尝试读取从SharePoint值,然后我拿到永诺以下情况除外:对于部署为SharePoint 2010解决方案的wcf,“访问被拒绝”
System.ServiceModel.Security.SecurityAccessDeniedException was unhandled
Message=Access is denied.
Source=mscorlib
StackTrace:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at mgbahn.sharepoint.test.forms.SharePointService_Share.ISharePointService.GetDocumentTitles()
at mgbahn.sharepoint.test.forms.SharePointService_Share.SharePointServiceClient.GetDocumentTitles() in D:\MGBScratch\src\sharepoint\mgbahn.sharepoint.test.forms\Service References\SharePointService_Share\Reference.cs:line 57
at mgbahn.sharepoint.test.forms.TestFormWCF..ctor() in D:\MGBScratch\src\sharepoint\mgbahn.sharepoint.test.forms\TestFormWCF.cs:line 23
at mgbahn.sharepoint.test.forms.Program.Main() in D:\MGBScratch\src\sharepoint\mgbahn.sharepoint.test.forms\Program.cs:line 15
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
这没有什么区别,什么样的信息,我尝试从SharePoint读取,错误总是相同的。
我真的很新的wcf和我在IIS知识非常小。
测试客户端是否是任何机会的控制台应用程序? – Truezplaya
testclient是一个winform应用程序 – bruxlee
您是否设置了代理类? – Truezplaya