locked
Opening Project in VS produces reports IIS Express error. RRS feed

  • Question

  • User-1842880510 posted

    I have a project that runs on https://localhost:44306 .  Yesterday by my manager's requirement I published the project for deployment to a test machine for the customers (which also is using IIS Express and is running IIS Express from the command.  However, the IIS Express on that machine for some unknown reason is not able to be configured to use SSL.  Therefore before publishing I changed the project properties so as to run using http://localhost:51716 , and changed SSL Enabled to false.  (I've since discovered that this was not necessary as the web app would run under whatever bindings were entered in applicationHost.config for that web app no matter what it read when it was published.)

    However, once the deployment was complete I switched the project back to SSL Enable = true and to run usign https://localhost:44306 .  I had to go into the applicationHost.config to put the SSL binding back into the Web site description.  However now whenever I open the project in VS 2012 I get an error message saying:

    An error occured when applying the IIS Express settings 
    to server URL 'https://localhost:44306' for project 'projectName'. 
    You may have to manually edit the applicationHost.config file 
    and make changes for your site to run correctly.

    Since I've already done that then I am not sure what possible error IIS Express could be experiencing.  There is nothing in the IIS Express log files to indicate that an error even occurred.  Nor is there anything in the Event Viewer logs to show ANY error.  I cannot find any Visual Studio 2012 error logs. 

    While one may be attempted to recommend that this thread be posted on the IIS.Net forums, I've found over the past year that the contributors to  that forum are unconversant with IIS Express and do not bother answer queries about it.

    So to quote Star Wars;  "Help me Obi-wan Kenobi; you're my only hope."

    Thursday, September 25, 2014 8:41 AM

Answers

  • User-1842880510 posted

    Last winter we updated our IDE to VS 2015.  We had to set the

    <UseGlobalApplicationHostFile>true</UseGlobalApplicationHostFile>

    to be true to use the applicationHost file in My Documents\IISExpress.

    The we just started working with it and voila the error no longer occurred every time we opened the project.  Go Figure.

    So I don't know why the error occurred and now I no longer have a platform for diagnosing the issue.  I am marking this reply as Answer, not because I deserve any points and not because it is fixed, but because I no longer have a dog in this fight.  So there I would suggest people still having this issue start a new thread and see if you can get any answers.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 8, 2018 7:47 PM

All replies

  • User564952083 posted

    I ran into something like that some time ago actually.  In my case I closed VS and then deleted the entries for my site in the applicationhost.config.  Then I opened my project in VS and reconfigured everything before trying to run it.

    I don't know if this will work for you, just relaying my own experience.

    Thursday, September 25, 2014 12:51 PM
  • User-1842880510 posted

    OK I tried that.  However, I still got the same error message plus another one saying it could not find https://localhost:44306 .  The looking the the properties panel for the project there were error messages in the Always start when debugging and Anonymous Authentication fields saying it could not find server https://localhost:44306.  Addionally SSL enabled was set to false and I was not allowed to change it because it delivered an "Invalid entry" error.  (This kept me from making any changes to the properties and kept me from closing the project as well.  It was necessary to use Task Manager to end the task.  I put the site info back in and it opened with only the error message reported above.

    Thursday, September 25, 2014 3:25 PM
  • User564952083 posted

    Sorry to hear that.  I don't have any more ideas right now.  Hopefully someone else will stop by with a solution.

    Thursday, September 25, 2014 3:30 PM
  • User-1454326058 posted

    Hi joeller,

    First, please try to use the different port(44306)

    Secondly, please check applicationHost.config file whether it is correct.

     <site name="siteName" id="100">
                    <application path="/" applicationPool="Clr4IntegratedAppPool">
                        <virtualDirectory path="/" physicalPath="path" />
                    </application>
                    <bindings>
                        <binding protocol="http" bindingInformation="*:38013:localhost" />
                        <binding protocol="https" bindingInformation="*:44307:localhost" />
                    </bindings>
                </site>

    Best Regards

    Starain Chen

    Friday, September 26, 2014 4:10 AM
  • User-1842880510 posted

    you mean to change the port in project properties?  Do you want me to do this in concert with deleteing the previous site entry from the applicationHost file?

    BTW here is my site element for this site

                <site name="VFS_ProcurementTracking" id="25">
                    <application path="/" applicationPool="Clr4IntegratedAppPool">
                        <virtualDirectory path="/" physicalPath="C:\_D\Visual Studio 2012 Projects\VFS_ProcurementTracking" />
                    </application>
                    <bindings>
                        <binding protocol="http" bindingInformation="*:51718:localhost" />
                        <binding protocol="https" bindingInformation="*:44306:localhost" />
                    </bindings>
                </site>

    Friday, September 26, 2014 12:32 PM
  • User-1454326058 posted

    Hi joeller,

    You just need change the port in the project’s properties window. After save the setting, it will create a new virtual directory.

    Is the normal URL working? (http://localhost:51718)

    Please try to create a new project and enable SSL, then check whether it is working.

    Best Regards

    Starain Chen

    Saturday, September 27, 2014 10:40 PM
  • User-1842880510 posted

    When I reset the the project URL and the starting URL on the project property page's web tab to the http://localhost:51718/ it opens and runs normally to the point at which it requires a certificate to proceed any further at which point an execption is thrown.  When the project is closed and opened there are no error messages.

    When I changed the SSL URL from https://localhost:44306 to https://localhost:44307 the following happened when i clicked the create virtual directory button

    1.  I go the following error message.

    Configuring web https://localhost:44307 for Asp.Net 4.5 failed.  
    You must manually configure this site for Asp>Net 4.5 
    in order for the site to run correctly.  
    Could not find server https://localhost:44307 
    on the local machine make sure the local 
    IIS server has been configured 
    to support secure communications.

    2.  Then I got the a message box with the following:  "the virtual directory has been created."
    3.  Then in checking the applicationhost.config I find that the following site was automatically created:

                <site name="VFS_ProcurementTracking(1)" id="45">
                    <application path="/" applicationPool="Clr4IntegratedAppPool">
                        <virtualDirectory path="/" physicalPath="C:\_D\Visual Studio 2012 Projects\VFS_ProcurementTracking" />
                    </application>
                    <bindings>
                        <binding protocol="http" bindingInformation="*:44307:localhost" />
                    </bindings>
                </site>

    Which is obviously wrong.

    Bear in mind that the site with https://localhost:44306 RUNS just fine.  It is opening the project which yields the error message about IIS Express must be manually configure.

    What configuration are they talking about that hasn't been done already?

    Monday, September 29, 2014 12:27 PM
  • User-1454326058 posted

    Hi joeller,

    Based on the error message, it seems that the centralized SSL Certificate store has not been installed.

    Please refer to these steps below to install it:

    1. Open Turn Windows features on or Off (Client) or Add Roles and Features (server) window
    2. For client machine: Expand World Wide Web Services=>Security=>Check Centralized SSL Certificate Support. For Server machine: select Web Server (IIS), expand Web Server=>Security=> Select Centralized SSL Certificate Store.

    Best Regards

    Starain Chen

    Wednesday, October 1, 2014 3:09 AM
  • User-1842880510 posted

    Based on the error message, it seems that the centralized SSL Certificate store has not been installed.

    If that were the case, then I believe I would get the "There is a problem with this website's security certificate." window when I run in debug mode.  I do not get this window the web app runs as it is supposed to.

     

    Thursday, October 2, 2014 4:01 PM
  • User-517439207 posted

    I'm experiencing this same problem when first opening my project.

    Friday, October 24, 2014 12:34 PM
  • User-1842880510 posted

    When this happened originally I had a reason to copy the the entire project to a folder with a new name.  Then I opened the project and and set it to SSL and saved it it with a new port and created a new virtual directory and then went the applicationhost.config file and changed the original site element to show new port and the new folder name.  This worked until the next time I changed the project from https to http.  When I changed it aback the error message reappeared each time I opened the project.  However, it isn't affecting how the project is being run.  So I am ignoring it for now.

    Saturday, March 21, 2015 11:19 PM
  • User-2070465621 posted

    I received the same error message, but under different circumstances. Solution was fine when I went to bed, but in the morning one of my projects (webApi) started throwing this error upon the solution opening.

    I knew NOTHING had been changed, so did not want to modify properties or delete entries in in any config files.

    For me, right clicking the solution and selecting "Clean Solution" surprised me by resolving my issue.

    Saturday, May 16, 2015 8:57 PM
  • User-1842880510 posted

    right clicking the solution and selecting "Clean Solution" surprised me by resolving my issue.
    right clicking the solution and selecting "Clean Solution" surprised me by resolving my issue.

    Unfortunately this did not work for me.

    Wednesday, May 27, 2015 11:49 AM
  • User-782232518 posted

    It is recommended to troubleshoot SSL related settings step by step,

    • Check IIS Express testing certificate.
    • Check http.sys certificate bindings.
    • Check IIS Express site bindings.

    If you are not familiar with the command line, you might also try out Jexus Manager for IIS Express https://jexus.codeplex.com/releases/view/138373 

    Friday, October 9, 2015 6:20 AM
  • User-1842880510 posted

    If I may say without offense, this has already been done with no change in the situation.

    Monday, October 12, 2015 8:59 AM
  • User-782232518 posted

    The integration of IIS Express and Visual Studio themselves is technically difficult for outsiders to fully understand (I am working on it, but still preliminary).

    When you say "no change in the situation", do you mean that via command line or Jexus Manager you can get the site running file without any error message, or you mean even that failes?

    If we can isolate the issue to a single product, such as Visual Studio, it might be easier to tell what's up and how to fix.

    Tuesday, October 13, 2015 5:38 AM
  • User-1842880510 posted

    Sorry, I have been incommunicado for a time.  The enterprise for which I work decided to block all access to forums.asp.net for at least the last 8 months, so I was not able to get to my pending threads.  Now it is unblocked so I am trying to answer everything before it gets blocked again.

    do you mean that via command line or Jexus Manager you can get the site running file without any error message, or you mean even that failes?

    The site runs perfectly fine.  When I continue on past the error message to opening it, then the run in debug works perfectly, It reads the certificate perficately, gets the cert_subject of the certificate just fine and uses it to evaluation the user and open the site.  The issue is when opening the project in the IDE.  It always reports that error message which it didn't used to do but now does every time.

    Friday, August 26, 2016 7:54 PM
  • User496490502 posted

    I am having same problem,

    I got solution.

    i just changed machine.config file for duplicate tag.

    Location for machine.config file : C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG

    Tuesday, August 22, 2017 9:16 AM
  • User-1842880510 posted

    i just changed machine.config file for duplicate tag.

    Why did you change that file?  Where did you change that file?  There is no element called duplicate tag in my copy of the machine.config.

    Tuesday, August 22, 2017 6:27 PM
  • User-1842880510 posted

    Last winter we updated our IDE to VS 2015.  We had to set the

    <UseGlobalApplicationHostFile>true</UseGlobalApplicationHostFile>

    to be true to use the applicationHost file in My Documents\IISExpress.

    The we just started working with it and voila the error no longer occurred every time we opened the project.  Go Figure.

    So I don't know why the error occurred and now I no longer have a platform for diagnosing the issue.  I am marking this reply as Answer, not because I deserve any points and not because it is fixed, but because I no longer have a dog in this fight.  So there I would suggest people still having this issue start a new thread and see if you can get any answers.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 8, 2018 7:47 PM