‘The format of the specified network name is invalid’ – IIS Error 0x800704BE

[Origin]: http://www.therealtimeweb.com/index.cfm/2011/10/24/iis-error-0x800704BE

Oh don’t you just love cryptic error messages that could mean one hundred and one things? Yeah, me too.

So in the interest of some poor soul (maybe it’s you 😉 searching on this topic in the year 2142 I decided to point out what resolved this issue for me.

Background: I am running Windows Server 2008 R2 with IIS inside a Hyper-V instance. The VM was configured with a static IP and each IIS site was configured to bind to that IP, and that IP alone.
I transferred the VM to Amazon EC2 (using the ec2-import-instance API) since I wanted to move away from having to maintain my own physical hardware. Long story short, once transferred I was unable to start any of the IIS sites, they all failed with the error ‘The format of the specified network name is invalid – Error 0x800704BE’.

I knew that this error was likely related to IP bindings of some kind (EC2 usually expects you to use DHCP for IP address assignment since even an elastic IP can change) so I tried binding a few IIS sites to ‘all’ IPs. Still the sites would not start, but throw the above error.

I dug deeper and used the netsh utility (Windows commandline) to show which the network configuration for the machine, and in particular which IPs the HTTP service listens to:

netsh http show iplisten

This listed just one (the previous static) IP of my VM – this was now wrong. So I removed the binding with

netsh http delete iplisten ipaddress=11.22.33.44 (where 11.22.33.44 is the actual IP that needs removing)

Next set the service up to listen to all IPs:

netsh http add iplisten ipaddress=0.0.0.0

I then restarted IIS using

1iisreset

and bingo, the sites started to work.

Hope this helps someone.

Advertisements

IIS does not list a website that matches the launch url

[Origin]: https://stackoverflow.com/questions/10716956/iis-does-not-list-a-website-that-matches-the-launch-url

I need to debug the website i ‘m developing (ASP.NET MVC3, Razor, .NET 4, VS2010 SP1 (as administrator)) in IIS7 (Vista Home) and getting the error:

IIS does not list a website that matches the launch url.

To test if it has to do something with the settings of the app, i did create from scratch an empty new ASP.NET MVC3 website, set for IIS, created virtual directory, launched with F5 and i worked fine!

I again did create a second website project with the exact same settings (just to be sure) and this also launched as expected.

This leads my to think that i have some configuration problem!? But what? In the past i used IIS very rare, so my knowledge is somehow limited in this direction.

Any hints?

shareedit

I hate answering my questions: in my question i stated that i was running VS under the administrator account. This was not true!!!

So the solution (for me) was to run VS2010 as administrator (Start->In Vista menu right click-> Run as administrator)…so simple.

As a side effect: VS2010 let me also create Virtual Directories without any problems (prior to that i got error messages stating that i have to manually adjust these)

shareedit

How to remove error about glyphicons-halflings-regular.woff2 not found

[Origin]: https://stackoverflow.com/questions/32300578/how-to-remove-error-about-glyphicons-halflings-regular-woff2-not-found

This problem happens because IIS does not know about woff and woff2 file mime types.

Solution 1:

Add this lines in your web.config project:

 <system.webServer>
  ...
  </modules>
    <staticContent>
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
    </staticContent>

Solution 2:

On IIS project page:

Step 1: Go to your project IIS home page and double click on MIME Types button:

Step 1

Step 2: Click on Add button from Actions menu: Step 2

Step 3: In the middle of the screen appears a window and in this window you need to add the two lines from solution 1: Step 3

shareedit

Visual Studio 2013. You do not have sufficient privilege to access IIS web sites on your machine

[Origin]: https://stackoverflow.com/questions/20984624/visual-studio-2013-you-do-not-have-sufficient-privilege-to-access-iis-web-sites

I just installed VS2013 and turned on IIS 7 on my Windows 7 Ultimate x64 machine. When trying to open a solution I get:

Creation of the virtual directory localhost:xxxxx failed with the error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.

I tried running Visual Studio 2013 as Administrator (right click, run as administrator), still the same error. I also did aspnet_regiis -i and it didn’t help either.

shareimprove this question

Go to C:\Windows\System32\inetsrv. Click config folder. You will get a popup – “You don’t have access to this folder – Click continue to permanently get access to this folder”. Perform same for Export folder which is inside config folder. You should be able to open the solution and the web application project will be deployed on IIS.

enter image description here

shareimprove this answer


Solution to “Unable to Launch the IIS Express Web Server”

[Origin]: http://sibeeshpassion.com/solution-to-unable-to-launch-the-iis-express-web-server/

This article will help you to overcome the error Unable to Launch the IIS Express Web Server. Today I encountered the issue “Unable to launch the IIS Express Web Server” while I was running my Visual Studio 2012. So I thought of sharing how to resolve that issue. I hope it will help someone.

Unable to Launch the IIS Express Web Server

Background

In my team we have 5 to 10 members. Since we wanted to do a build for our current application, I used “Get the Latest files from the server”. (We are using TFS.) Then when I run my application I was getting this error.

The cause of this error is, someone has checked in the solution file with his port number (the port number he was using). When I took the latest, it was set in my solution file also. We must take the latest solution file only when it is required. So here I will share the remedy for the preceding issue.

Procedure to solve this issue

Step 1

Right-click on your solution and select Properties as shown in the following figure.

 

Unable to Launch the IIS Express Web Server

 

Step 2

Select “Web” from the left menu.

 

Unable to Launch the IIS Express Web Server

 

Step 3

Under “Use local IIS server” change the port number from http://localhost:58030/ to another one.

 

Unable to Launch the IIS Express Web Server

 

Step 4

Here I have changed http://localhost:58030/ to http://localhost:58031/ .

Bingo! We have done it.

 

Unable to Launch the IIS Express Web Server

 

Step 5

Now please run again your application. The issue will be solved.

Conclusion

Did I miss anything that you may think which is needed? Have you ever faced this issue? Does this solution solve your issue?I hope you liked this article. Please share me your valuable suggestions and feedback.

Your turn. What do you think?

A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I am able to.

Kindest Regards
Sibeesh Venu

Unable to launch the IIS Express Web server

[Origin]: http://stackoverflow.com/questions/15873126/unable-to-launch-the-iis-express-web-server

I had the exact same problem.
The reason – bad IIS config file.

Try deleting the automatically-created IISExpress folder, which is usually located at %userprofile%/Documents, e.g. C:\Users\[you]\Documents\IISExpress.

Don’t worry, VS should create it again – correctly, this time – once you run your solution again.


EDIT: Command line for deleting the folder:

rmdir /s /q "%userprofile%\Documents\IISExpress"

shareedit

Error in Protocol Mapping While hosting a WCF service in IIS

[Origin]: http://stackoverflow.com/questions/13123861/error-in-protocol-mapping-while-hosting-a-wcf-service-in-iis

I developed a simple WCF service with VS 2010. And i hosted in the default website in IIS by Adding Application and set the Physical Path

And i tried to browse the .svc file it gives me the following error:

The configuration section ‘protocolMapping’ cannot be read because it is missing a section declaration

Protocol Mapping Error

and I tried many solutions but it doesn’t work

I Created WCF Service Library has an App.config with this:

<?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"utf-8"</span> <span class="pun">?></span>
<span class="str"><configuration></span>

  <span class="str"><appSettings></span>
    <span class="pun"><</span><span class="pln">add key</span><span class="pun">=</span><span class="str">"aspnet:UseTaskFriendlySynchronizationContext"</span><span class="pln"> value</span><span class="pun">=</span><span class="str">"true"</span> <span class="pun">/></span>
  <span class="pun"></</span><span class="pln">appSettings</span><span class="pun">></span>
  <span class="pun"><</span><span class="pln">system</span><span class="pun">.</span><span class="pln">web</span><span class="pun">></span>
    <span class="pun"><</span><span class="pln">compilation debug</span><span class="pun">=</span><span class="str">"true"</span> <span class="pun">/></span>
  <span class="pun"></</span><span class="pln">system</span><span class="pun">.</span><span class="pln">web</span><span class="pun">></span>
  <span class="pun"><!--</span> <span class="typ">When</span><span class="pln"> deploying the service library project</span><span class="pun">,</span><span class="pln"> the content of the config file must be added to the host</span><span class="str">'</span><span class="pln">s 
  app</span><span class="pun">.</span><span class="pln">config file</span><span class="pun">.</span> <span class="typ">System</span><span class="pun">.</span><span class="typ">Configuration</span><span class="pln"> does not support config files </span><span class="kwd">for</span><span class="pln"> libraries</span><span class="pun">.</span> <span class="pun">--></span>
  <span class="pun"><</span><span class="pln">system</span><span class="pun">.</span><span class="pln">serviceModel</span><span class="pun">></span>
    <span class="str"><services></span>
      <span class="pun"><</span><span class="pln">service name</span><span class="pun">=</span><span class="str">"EvalServiceLibrary.EvalService"</span><span class="pun">></span>
        <span class="pun"><</span><span class="pln">clear </span><span class="pun">/></span>
        <span class="pun"><</span><span class="pln">endpoint address</span><span class="pun">=</span><span class="str">"basic"</span><span class="pln"> binding</span><span class="pun">=</span><span class="str">"basicHttpBinding"</span><span class="pln"> contract</span><span class="pun">=</span><span class="str">"EvalServiceLibrary.IEvalService"</span><span class="pln">
          listenUriMode</span><span class="pun">=</span><span class="str">"Explicit"</span><span class="pun">></span>
          <span class="str"><identity></span>
            <span class="pun"><</span><span class="pln">dns value</span><span class="pun">=</span><span class="str">"localhost"</span> <span class="pun">/></span>
            <span class="pun"><</span><span class="pln">certificateReference storeName</span><span class="pun">=</span><span class="str">"My"</span><span class="pln"> storeLocation</span><span class="pun">=</span><span class="str">"LocalMachine"</span><span class="pln">
              x509FindType</span><span class="pun">=</span><span class="str">"FindBySubjectDistinguishedName"</span> <span class="pun">/></span>
          <span class="pun"></</span><span class="pln">identity</span><span class="pun">></span>
        <span class="pun"></</span><span class="pln">endpoint</span><span class="pun">></span>
        <span class="pun"><</span><span class="pln">endpoint address</span><span class="pun">=</span><span class="str">"mex"</span><span class="pln"> binding</span><span class="pun">=</span><span class="str">"mexHttpBinding"</span><span class="pln"> contract</span><span class="pun">=</span><span class="str">"IMetadataExchange"</span><span class="pln">
          listenUriMode</span><span class="pun">=</span><span class="str">"Explicit"</span><span class="pun">></span>
          <span class="str"><identity></span>
            <span class="pun"><</span><span class="pln">dns value</span><span class="pun">=</span><span class="str">"localhost"</span> <span class="pun">/></span>
            <span class="pun"><</span><span class="pln">certificateReference storeName</span><span class="pun">=</span><span class="str">"My"</span><span class="pln"> storeLocation</span><span class="pun">=</span><span class="str">"LocalMachine"</span><span class="pln">
              x509FindType</span><span class="pun">=</span><span class="str">"FindBySubjectDistinguishedName"</span> <span class="pun">/></span>
          <span class="pun"></</span><span class="pln">identity</span><span class="pun">></span>
        <span class="pun"></</span><span class="pln">endpoint</span><span class="pun">></span>
        <span class="pun"><</span><span class="pln">endpoint address</span><span class="pun">=</span><span class="str">"ws"</span><span class="pln"> binding</span><span class="pun">=</span><span class="str">"wsHttpBinding"</span><span class="pln"> contract</span><span class="pun">=</span><span class="str">"EvalServiceLibrary.IEvalService"</span><span class="pln">
          listenUriMode</span><span class="pun">=</span><span class="str">"Explicit"</span><span class="pun">></span>
          <span class="str"><identity></span>
            <span class="pun"><</span><span class="pln">dns value</span><span class="pun">=</span><span class="str">"localhost"</span> <span class="pun">/></span>
            <span class="pun"><</span><span class="pln">certificateReference storeName</span><span class="pun">=</span><span class="str">"My"</span><span class="pln"> storeLocation</span><span class="pun">=</span><span class="str">"LocalMachine"</span><span class="pln">
              x509FindType</span><span class="pun">=</span><span class="str">"FindBySubjectDistinguishedName"</span> <span class="pun">/></span>
          <span class="pun"></</span><span class="pln">identity</span><span class="pun">></span>
        <span class="pun"></</span><span class="pln">endpoint</span><span class="pun">></span>
        <span class="pun"><</span><span class="pln">endpoint address</span><span class="pun">=</span><span class="str">"net.tcp://localhost:8888/evalservice"</span><span class="pln"> binding</span><span class="pun">=</span><span class="str">"netTcpBinding"</span><span class="pln">
          contract</span><span class="pun">=</span><span class="str">"EvalServiceLibrary.IEvalService"</span><span class="pln"> listenUriMode</span><span class="pun">=</span><span class="str">"Explicit"</span><span class="pun">></span>
          <span class="str"><identity></span>
            <span class="pun"><</span><span class="pln">dns value</span><span class="pun">=</span><span class="str">"localhost"</span> <span class="pun">/></span>
            <span class="pun"><</span><span class="pln">certificateReference storeName</span><span class="pun">=</span><span class="str">"My"</span><span class="pln"> storeLocation</span><span class="pun">=</span><span class="str">"LocalMachine"</span><span class="pln">
              x509FindType</span><span class="pun">=</span><span class="str">"FindBySubjectDistinguishedName"</span> <span class="pun">/></span>
          <span class="pun"></</span><span class="pln">identity</span><span class="pun">></span>
        <span class="pun"></</span><span class="pln">endpoint</span><span class="pun">></span>
        <span class="pun"><</span><span class="pln">endpoint address</span><span class="pun">=</span><span class="str">"net.pipe://localhost/evalservice"</span><span class="pln"> binding</span><span class="pun">=</span><span class="str">"netNamedPipeBinding"</span><span class="pln">
          bindingConfiguration</span><span class="pun">=</span><span class="str">""</span><span class="pln"> contract</span><span class="pun">=</span><span class="str">"EvalServiceLibrary.IEvalService"</span> <span class="pun">/></span>
        <span class="str"><host></span>
          <span class="str"><baseAddresses></span>
            <span class="pun"><</span><span class="pln">add baseAddress</span><span class="pun">=</span><span class="str">"http://localhost:8080/evalservice"</span> <span class="pun">/></span>
          <span class="pun"></</span><span class="pln">baseAddresses</span><span class="pun">></span>
        <span class="pun"></</span><span class="pln">host</span><span class="pun">></span>
      <span class="pun"></</span><span class="pln">service</span><span class="pun">></span>
    <span class="pun"></</span><span class="pln">services</span><span class="pun">></span>
    <span class="str"><behaviors></span>
      <span class="str"><serviceBehaviors></span>
        <span class="str"><behavior></span>
          <span class="pun"><!--</span> <span class="typ">To</span><span class="pln"> avoid disclosing metadata information</span><span class="pun">,</span> 
          <span class="typ">set</span><span class="pln"> the values below to </span><span class="kwd">false</span><span class="pln"> before deployment </span><span class="pun">--></span>
          <span class="pun"><</span><span class="pln">serviceMetadata httpGetEnabled</span><span class="pun">=</span><span class="str">"True"</span><span class="pln"> httpsGetEnabled</span><span class="pun">=</span><span class="str">"True"</span><span class="pun">/></span>
          <span class="pun"><!--</span> <span class="typ">To</span><span class="pln"> receive exception details </span><span class="kwd">in</span><span class="pln"> faults </span><span class="kwd">for</span><span class="pln"> debugging purposes</span><span class="pun">,</span> 
          <span class="typ">set</span><span class="pln"> the value below to </span><span class="kwd">true</span><span class="pun">.</span>  <span class="typ">Set</span><span class="pln"> to </span><span class="kwd">false</span><span class="pln"> before deployment 
          to avoid disclosing exception information </span><span class="pun">--></span>
          <span class="pun"><</span><span class="pln">serviceDebug includeExceptionDetailInFaults</span><span class="pun">=</span><span class="str">"False"</span> <span class="pun">/></span>
        <span class="pun"></</span><span class="pln">behavior</span><span class="pun">></span>
      <span class="pun"></</span><span class="pln">serviceBehaviors</span><span class="pun">></span>
    <span class="pun"></</span><span class="pln">behaviors</span><span class="pun">></span>
  <span class="pun"></</span><span class="pln">system</span><span class="pun">.</span><span class="pln">serviceModel</span><span class="pun">></span>
<span class="pun"></</span><span class="pln">configuration</span><span class="pun">>

and i Hosted the WCF Service Library application in WCF website (My Client) has an Web.config with this:

<?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pun">?></span>
<span class="str"><configuration></span>

  <span class="str"><appSettings></span>
    <span class="pun"><</span><span class="pln">add key</span><span class="pun">=</span><span class="str">"aspnet:UseTaskFriendlySynchronizationContext"</span><span class="pln"> value</span><span class="pun">=</span><span class="str">"true"</span> <span class="pun">/></span>
  <span class="pun"></</span><span class="pln">appSettings</span><span class="pun">></span>
  <span class="pun"><</span><span class="pln">system</span><span class="pun">.</span><span class="pln">web</span><span class="pun">></span>
    <span class="pun"><</span><span class="pln">compilation debug</span><span class="pun">=</span><span class="str">"false"</span><span class="pln"> targetFramework</span><span class="pun">=</span><span class="str">"4.5"</span> <span class="pun">/></span>
    <span class="pun"><</span><span class="pln">httpRuntime targetFramework</span><span class="pun">=</span><span class="str">"4.5"</span><span class="pun">/></span>
  <span class="pun"></</span><span class="pln">system</span><span class="pun">.</span><span class="pln">web</span><span class="pun">></span>
  <span class="pun"><</span><span class="pln">system</span><span class="pun">.</span><span class="pln">serviceModel</span><span class="pun">></span>
    <span class="str"><services></span>
      <span class="pun"><</span><span class="pln">service name</span><span class="pun">=</span><span class="str">"EvalServiceLibrary.EvalService"</span><span class="pun">></span>
        <span class="pun"><</span><span class="pln">endpoint address</span><span class="pun">=</span><span class="str">""</span><span class="pln"> binding</span><span class="pun">=</span><span class="str">"wsHttpBinding"</span><span class="pln"> bindingConfiguration</span><span class="pun">=</span><span class="str">""</span><span class="pln"> contract</span><span class="pun">=</span><span class="str">"EvalServiceLibrary.IEvalService"</span> <span class="pun">/></span>
        <span class="pun"><</span><span class="pln">endpoint address</span><span class="pun">=</span><span class="str">"mex"</span><span class="pln"> binding</span><span class="pun">=</span><span class="str">"mexHttpBinding"</span><span class="pln"> bindingConfiguration</span><span class="pun">=</span><span class="str">""</span><span class="pln"> contract</span><span class="pun">=</span><span class="str">"IMetadataExchange"</span> <span class="pun">/></span>
        <span class="pun"><</span><span class="pln">endpoint address</span><span class="pun">=</span><span class="str">"basic"</span><span class="pln"> binding</span><span class="pun">=</span><span class="str">"basicHttpBinding"</span><span class="pln"> bindingConfiguration</span><span class="pun">=</span><span class="str">""</span><span class="pln"> contract</span><span class="pun">=</span><span class="str">"EvalServiceLibrary.IEvalService"</span> <span class="pun">/></span>
      <span class="pun"></</span><span class="pln">service</span><span class="pun">></span>
    <span class="pun"></</span><span class="pln">services</span><span class="pun">></span>
    <span class="str"><behaviors></span>
      <span class="str"><serviceBehaviors></span>
        <span class="str"><behavior></span>
          <span class="pun"><!--</span> <span class="typ">To</span><span class="pln"> avoid disclosing metadata information</span><span class="pun">,</span> <span class="typ">set</span><span class="pln"> the values below to </span><span class="kwd">false</span><span class="pln"> before deployment </span><span class="pun">--></span>
          <span class="pun"><</span><span class="pln">serviceMetadata httpGetEnabled</span><span class="pun">=</span><span class="str">"true"</span><span class="pln"> httpsGetEnabled</span><span class="pun">=</span><span class="str">"true"</span><span class="pun">/></span>
          <span class="pun"><!--</span> <span class="typ">To</span><span class="pln"> receive exception details </span><span class="kwd">in</span><span class="pln"> faults </span><span class="kwd">for</span><span class="pln"> debugging purposes</span><span class="pun">,</span> <span class="typ">set</span><span class="pln"> the value below to </span><span class="kwd">true</span><span class="pun">.</span>  <span class="typ">Set</span><span class="pln"> to </span><span class="kwd">false</span><span class="pln"> before deployment to avoid disclosing exception information </span><span class="pun">--></span>
          <span class="pun"><</span><span class="pln">serviceDebug includeExceptionDetailInFaults</span><span class="pun">=</span><span class="str">"false"</span><span class="pun">/></span>
        <span class="pun"></</span><span class="pln">behavior</span><span class="pun">></span>
      <span class="pun"></</span><span class="pln">serviceBehaviors</span><span class="pun">></span>
    <span class="pun"></</span><span class="pln">behaviors</span><span class="pun">></span>
    <span class="str"><protocolMapping></span>
      <span class="pun"><</span><span class="pln">add binding</span><span class="pun">=</span><span class="str">"basicHttpsBinding"</span><span class="pln"> scheme</span><span class="pun">=</span><span class="str">"https"</span> <span class="pun">/></span>
    <span class="pun"></</span><span class="pln">protocolMapping</span><span class="pun">></span>
    <span class="pun"><</span><span class="pln">serviceHostingEnvironment aspNetCompatibilityEnabled</span><span class="pun">=</span><span class="str">"true"</span><span class="pln"> multipleSiteBindingsEnabled</span><span class="pun">=</span><span class="str">"true"</span> <span class="pun">/></span>
  <span class="pun"></</span><span class="pln">system</span><span class="pun">.</span><span class="pln">serviceModel</span><span class="pun">></span>
  <span class="pun"><</span><span class="pln">system</span><span class="pun">.</span><span class="pln">webServer</span><span class="pun">></span>
    <span class="pun"><</span><span class="pln">modules runAllManagedModulesForAllRequests</span><span class="pun">=</span><span class="str">"true"</span><span class="pun">/></span>
    <span class="pun"><!--</span>
        <span class="typ">To</span><span class="pln"> browse web app root directory during debugging</span><span class="pun">,</span> <span class="typ">set</span><span class="pln"> the value below to </span><span class="kwd">true</span><span class="pun">.</span>
        <span class="typ">Set</span><span class="pln"> to </span><span class="kwd">false</span><span class="pln"> before deployment to avoid disclosing web app folder information</span><span class="pun">.</span>
      <span class="pun">--></span>
    <span class="pun"><</span><span class="pln">directoryBrowse enabled</span><span class="pun">=</span><span class="str">"true"</span><span class="pun">/></span>
  <span class="pun"></</span><span class="pln">system</span><span class="pun">.</span><span class="pln">webServer</span><span class="pun">></span>
<span class="pun"></</span><span class="pln">configuration</span><span class="pun">>
shareedit

Amr,

This sounds like you may have permission issues in the folder you .svc is running from, please can you check and see if the following permissions are there:

  • \IIS_IUSERS
  • \IIS_IUSR —If running webservice in Anonymous Mode

For the issue with protocol Mapping, please ensure that the app Pool you are using for the IIS site is setup to use .net 4, as from what I understand protocol mapping is only available in .net 4.

Hope this helps

shareedit