WCF Metadata reference cannot be resolved

I am having an issue where I can't add a service reference in Visual Studio 2010 via a URL.

I have my HOST file setup to resolve http://mydomain.com locally, and setup my web.config file to reference this url. However when I go to add a service reference by URL I get the following error:

Metadata contains a reference that cannot be resolved: 'http://mydomain.com/myservice.svc?wsdl'.

The WSDL document contains links that could not be resolved.

There was an error downloading 'http://mydomain.com/myservice.svc?xsd=xsd0'.

The underlying connection was closed: An unexpected error occurred on a receive.

Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

An existing connection was forcibly closed by the remote host

Metadata contains a reference that cannot be resolved: 'http://mydomain.com/myservice.svc'.

There was no endpoint listening at http://mydomain.com/myservice.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

The remote server returned an error: (404) Not Found.

The other URLS work fine: http://mydomain.com/myservice.svc?wsdl and http://mydomain.com/myservice.svc

Here is my web.config file:

<?xml version="1.0"?>

    <compilation debug="true" targetFramework="4.0" />

      <!-- Note: the service name must match the configuration name for the service implementation. -->
      <service name="FuncWS.Email" behaviorConfiguration="ServiceType" >
        <!-- Add the following endpoint.  -->
        <endpoint address="myservice.svc" binding="webHttpBinding" contract="FuncWS.IEmail"></endpoint>
        <!-- Note: your service must have an http base address to add this endpoint. -->
        <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
            <add baseAddress="http://mydomain.com"/>
        <behavior name="ServiceType">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <modules runAllManagedModulesForAllRequests="true"/>


The solution to this problem is that IIS needs to have rights to the C:\Windows\Temp folder. Without this it can't generate the meta data needed.

Need Your Help

'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information


I am converting the .vcproj from VS2005 to VS2010 but after converting it is giving the below mentioned error.

How do I center floated elements?

css-float center css

I'm implementing pagination, and it needs to be centered. The problem is that the links need to be displayed as block, so they need to be floated. But then, text-align: center; doesn't work on them...