How to create Service Model metadata without rebooting

I have a simple WCF service application (based on this guide: Getting started ). My problem is that when I add a function to my application and want to regenerate the Proxy.cs file using the following command:

C:\kod>svcutil.exe /language:cs /out:Proxy.cs /config:app.config http://localhos t:8000/PBMB

I get the following result. The only solution I know for re-creating these files is to reboot my computer. But every time I change something, it is frustrating. Who can help?

Result:

Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, version 4.0.30319.1] Copyright (c) Microsoft Corporation. All rights reserved.

Trying to download metadata from ' http: // localhost: 8000 / PBMB ' using WS-Metad ata Exchange or DISCO. Error: Cannot import wsdl: portType Detail: an exception was thrown at startup WSDL import extension: System.Se rviceModel.Description.DataContractSerializerMessageContractImporter Error: The scheme with the target namespace ' http: // PBMB ' could not be found. XPath to Error Source: // wsdl: definitions [@targetNamespace = ' http: // PBMB '] / wsdl: p ortType [@ name = 'IService']

Error: cannot import wsdl: binding Detail: an import error occurred wsdl: portType, which wsdl: binding depends on. XPath to wsdl: portType: // wsdl: definitions [@targetNamespace = ' http: // PBMB '] / wsdl: portType [@ name = 'IService'] XPath for Error source: // wsdl: definitions [@targetNamespace = ' http://tempuri.org/ '] / WSDL: binding [@ name =' WSHttpBinding_IService ']

Error: Failed to import wsdl: port Detail: Import error wsdl: binding that wsdl: port depends on. XPath to wsdl: binding: // wsdl: definitions [@targetNamespace = ' http://tempuri.org/ '] / WSDL: binding [@ name = 'WSHttpBinding_IService'] XPath to Error Source: // wsdl: definitions [@ targetNamespace = ' http://tempuri.org/ '] / WSDL: service [@ name = 'PBMBService'] / WSDL: port [@ name = 'WSHttpBinding_IService']

File generation ... Warning: no code has been generated. If you tried to generate a client, this may be because the metadata documents do not contain valid contracts or services, or because all contracts / services were found to exist in / reference assemblies. Be sure to transfer all metadata to the tool.

A warning. If you want to create data contracts from schemas make sure to use the / dataContractOnly option.

+7
source share
1 answer

(Disclaimer, I am by no means an expert in this field, but I was intrigued and ruined a little)

Is it possible that the account under which the service is running will change when you make changes to your service and restart it? For example, it works by default under IIS when you start the computer, but when you change it, do you start it under Cassini or something like that?

The reason I ask is because according to this blog post , the WCF service should have write access to the temp folder, because it does some dynamic code generation and needs some space to store it.

Just worth considering.

More details:

+3
source

All Articles