Reputation: 33924
I have deployed a WCF service that works great when the application pool runs as a particular domain user, but when I change the application pool to run as a different user, I get an XPATH error and my service doesn't even return metadata. I'm perplexed - my new user has permissions to all the service files (including config files), runs fine as an app pool identity, and database permissions don't matter because I can't even pull up a contract list.
Can anybody shed some light on this? I've attached the text of the error I get when I try to connect using the WCF Test Client. Changing the app pool to run as the first user and the test client pulls up a contract list, and I can call a method without any issues at all. Please save me!
Error: Cannot import wsdl:portTypeDetail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporterError: Schema with target namespace 'http://UsBankRtSvc.Model/2010/Service' could not be found.XPath to Error Source: //wsdl:definitions[@targetNamespace='http://UsBankRtSvc.Model/2010/Service']/wsdl:portType[@name='UsBankRealTimeServiceContract']Error: Cannot import wsdl:bindingDetail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://UsBankRtSvc.Model/2010/Service']/wsdl:portType[@name='UsBankRealTimeServiceContract']XPath to Error Source: //wsdl:definitions[@targetNamespace='http://UsBankRtSvc.Model/2010/Service']/wsdl:binding[@name='DefaultEndpoint']Error: Cannot import wsdl:portDetail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://UsBankRtSvc.Model/2010/Service']/wsdl:binding[@name='DefaultEndpoint']XPath to Error Source: //wsdl:definitions[@targetNamespace='http://UsBankRtSvc.Model/2010/Service']/wsdl:service[@name='UsBankRealTimeSvc']/wsdl:port[@name='DefaultEndpoint']Warning: No code was generated.If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or servicesor because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata documents to the tool.Warning: If you would like to generate data contracts from schemas make sure to use the /dataContractOnly option.
Upvotes: 0
Views: 1328
Reputation: 21
Had a similar issue. I fixed it by granting the IIS_WPG group full access to the c:\windows\temp folder on the server.
Upvotes: 2