locked
iis express vs dev engine server RRS feed

  • Question

  • User-745244032 posted

    Hi all...

    Disclaimer: Some may argue that this belongs over at iis.net or msdn or technet... or even stack overflow... but I mostly hang out here so... ;)

    I did actually pose this question many moons ago, possibly not here tho... it may have been directly to scottgu/scottha but I can't remember now... but the question went something like "IIS Express sounds amazing why would I ever want to use the dev engine again?" and the response went something like "No reason really, its IIS but running locally. In the future this (IIS Express) will probably be the default server for VS version next."

    And so here I am today working on a site, creating web based projects and sure enough IIS express is the default for new projects, however I've just discovered something annoying...

    I cannot run IIS Express getting "Cannot access the IIS metabase" for seems to imply policy/permission reasons... but only when I'm not connected to the domain?!
    Connected to the domain network, its perfectly happy to let me connect to IIS Express and work using that?!.

    Aside from the fact that you can't do SSL stuff on dev environment(OOTB at least) its not a deal breaker, but it is annoying and surprising (also you can't fix this without going into the actual PROJ file and removing "Use IIS" from the top and bottom of the file and then "Reload" the project.

    • Anyone else experience this?
    • Anyone got thoughts as to why this might be happening and/or what I could say to our sysadmins/security types to relax things so that this doesn't happen?
    • I wouldn't ask other than I remember the original speil of the IIS Express was that the permissions required were not high like those of "full" IIS.
    Tuesday, November 19, 2013 6:10 PM

Answers

  • User-745244032 posted

    Hmm... none of these things appear to be helping.

    I'm also concerned that IIS EXPRESS is not generating Log files... I'd post to iis.net somewhere but anytime I try to login over the I get an invalid SSL certificate error...

    using procmon I can see the following:

    • it always accesses \\central\users$\myuserid and NEVER C:\users\myuserid\... which is what "%userprofile%" says it resolves to when queried in command prompt window... this could be an artifact of the tools/name resolution implicit...
    • it appears to do this even if I use the info in "run iisexpress from the command line"... eg: iisexpress /config:c:\temp\iisexpress
    • unless I'm doing sopmething wacky with filtering in procmon iisexpress NEVER tries to even access the "IISExpress\Logs\*" folder - as if its turned off...?!? Only "TraceLogFiles" are written (to the network share) successfully... there are C:\Users\myuserid\AppData\Local\Temp\iisexpress\*.log files, which have content like this:
    Request started: "POST" http://localhost:1226/OrderService.svc
    Request ended: http://localhost:1226/OrderService.svc with HTTP status 500.0
    Request started: "POST" http://localhost:1226/OrderService.svc
    Request ended: http://localhost:1226/OrderService.svc with HTTP status 200.0
    


    Probably need to switch back to vs2012 and use the dev server... :(

    UPDATE: Yep, looks like you can either use dev server or go through the "minor" of DIY launching of IISExpress becuase as outlined here - http://blogs.msdn.com/b/acoat/archive/2013/04/23/iisexpress-configuration-file-is-not-well-formed-xml.aspx - You can't allow VS to launch IISExpress for you because it takes params from somewhere else (possibly "MyDocuemnts" in registry) to ALWAYS make IISExpress run using that appconfig - which isn't there when I'm offline... :\

    For whatever reason I am still not getting IIS logging whether I'm "offline" or not, the last logging filedate is 25/1/2014... this year... not sure why it isnt' doing it anymore, I can't see any activity for the logging directory in procmon... - I DO have "TraceLogFiles" being logged so maybe its an "one or the other" thing...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 2, 2014 12:51 AM

All replies

  • User753101303 posted

    Hi,

    What is the version you are using ? With VS 2013/IIS 8 it runs without any problem (and it does support SSL just fine as far as I know)...

    Do you use "run as an admin" when launching VS ? You used this same account when connected to the domain ? Sometimes I take a portable home and it works just fine with my usual domain account (even if the portable is not connected to the domain).

    Monday, November 25, 2013 10:40 AM
  • User-745244032 posted

    Hi thanks for your response, sorry I didn't get back to this sooner.

    Essentially I think the problem might be something to do with my roaming profile, which I probably can't fix myself... :(

    I generally use 2012 and 2013.

    I prefer to use IIS/Dev because of the manual pain of "attaching to local IIS" - I use run as administrator, (sometmies I need to run as a separate user to do that though, because we have "standard and "_admin" accounts - which is occasionally problematic because our _admin accounts don't have internet access...) but it doesn't have any effect on this issue.

    I think the problem appears to be that when disconnected from teh network, the roaming profile isn't setup properly, and so "\users\uname\documents" can't be accessed... not sure how to prove or fix that, and its just a hunch, based on other software occasionally complaining about not being able to save settings files (eg: SQL Manager).

    Thursday, April 24, 2014 2:46 AM
  • User753101303 posted

    Don't have seen this either (using Windows8/VS 2013). To clarify you do log with your usual account even when your machine is not connected to the domain ? A tool such as http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx could perhaps allows to better track this...

     

    Thursday, April 24, 2014 4:33 AM
  • User-745244032 posted

    No same account, just "offline".

    SI tool... Cool, but what do you want me to do with it?

    For the record, the more I think about it the more I think its got SOMETHING to do with roaming profile or the the "home" directory being on a network share...

    for example when I'm on the domain I can get IISExpress running and if you look at the util (right click IIS Express icon in "tray") and Show All Applications, then you get "IIS Express Running Applications" nad if you click one of the entries, I get this:

    Parent: devenv(6344)
    Runtime: v4.0
    Path: C:\workspace\demoapp
    Config: \\central\user$\usrid\IISExpress\config\applicationhost.config

    \\central\user$ is not accessable when I'm offline - because I'm disconnected from the network...

    Is there a problem here? If so what to tell my network admins about this setup?

     

     

     

    Monday, April 28, 2014 4:40 AM
  • User-745244032 posted

    I am not certain, but I think the issue is either something to do with %UserProfile% being a \\shareserver\something$\uname based folder... and a problem in network settings, roaming profiles or simply something inherent in the IIS Express being setup with no apparent configurability for where the applicationhost.config file is supposed to go...

    eg: if this is correct http://stackoverflow.com/questions/6098374/iis-express-path-to-applicationhost-config-in-visual-studio-2010

    Then you cant' do much about it... Which is very annoying... so when I'm offline, I have no choice but to switch to IIS proper locally installed?

    This http://stackoverflow.com/questions/8914461/specify-template-applicationhost-config-when-launching-iis-express

    implies that you can change it "manually", but when VS is incontrol of launching/managing it, then again I'm stuffed? (I searched around, I couldn't see anywehre you can add a parameter in VS2012/13 to add params to IISExpress launch... perhaps there is...??

    Is this something I need to request of the infrastructure folks to change/fix?

    Tuesday, April 29, 2014 3:42 AM
  • User753101303 posted

    Don't know. I usually just use self contained projects with possibly a local db so it does work without any network access.

    If your project uses a network config for your IIS, it seems expected that it won't work when disconnected. Either you have an option such as "made available offline" on this network share (http://technet.microsoft.com/en-us/library/cc738531(v=WS.10).aspx) . Or you could use a VPN ? Or depending on why you are using a config file hosted on a network share just use local files instead ? See also what else you could use (network db or whatever)

    Is this an intent or does it just happen to be that way ? What if you try to create a local IIS Express based test app ? It should just work.

    Tuesday, April 29, 2014 4:37 AM
  • User-745244032 posted

    Well, I don't really know much about roaming profiles and why my "C:\User\myuserid" is actually mapped to \\central\users$\myuserid, but I assume its an infrastructure thing...

    We have lots of restrictions on us here, we need to manually create projects on "C:\workspace" as its the only writable directory on local machines and that kind of thing.

     I've also noticed that although my IIS Express seems to be functional when I am connected to the domain, its not writing log files...                 <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" /> is set in the Applicationhost.config file, but any hit to a site page doesn't generate anything in this directory...

    Its not a DEVELOPER intent, its causing me pain, but are you suggesting that I can install IIS Express in some special way? Can you clarify/elaborate what you mean by "create a local IIS Express based test app"?

    Hmm... actually just looking at this I can see that there is in fact what looks to be a copy of all/most of the stuff that is in the \\central\users$\myuserid\ in the c:\users\myuserid including the "\Documents\IISExpress\" stuff... including the applicationhost.config file... but whenever I'm disconnected I get errors about the network locations being unavailable... does this mean there is a problem with my profile or the setup of roaming on the network or something I need to change in IIS Express setup to point to "%user profile%" rather than \\central\users$\myuserid... or is this an infrastructure thing?

    Hmm... and further to this if I open an console/command terminal and type "dir %userprfile%" it does indeed give me the "C:\Users\myuserid" contents, and NOT the network location... WTH is going on...!?

    Any insight/advice appreciated!

     

    Thursday, May 1, 2014 2:03 AM
  • User-745244032 posted

    I suspect the problem is something along these lines:

    • roaming profile on domain
    • for "best practice" reasons "documents, pictures, music, video" are "redirected" to network shares, so as to not make roaming profiles too large.
    • for security reasons, "offline folders" is disabled - therefore documents/pictures/music/video aren't available offline...

    not sure why there is a valid "c:\users\myuserid" (perhpas this is created by roaming profiles - but it is NOT synched with my network copy of things, and thus doesn't have much in it (documents, music, etc are mostly empty - but (windows 7) "My Documents/My Pictures/etc" is missing when I disconnect "public folders" are in the Libraries but no "user" entries.

    reading these:

    http://stackoverflow.com/questions/5862877/iis-express-7-5-roaming-profile-visual-studio-2010-sp1
    http://www.iis.net/learn/extensions/using-iis-express/running-iis-express-from-the-command-line

    I think I am out of luck... it would be nice if VS or some tool allowed you to control IIS Express commandline params... however this "userhome" setting in one of these examples might be worth a shot:

    http://connect.microsoft.com/VisualStudio/feedback/details/804978/vs2013rc-will-not-load-any-projects-using-iisexpress-when-mydocuments-folder-is-mapped-to-skydrive-on-windows-8-1rtm

    Anyway, I think that perhaps the answer is in "HKCU\Volatile Environment\HOMESHARE" but I'm not so sure about what all these Reg Keys do/mean...

    Guessing my (poor) solution is either to run IIS express manually (not relying on VS to do it), or switch back to "local full version of IIS"... making debugging a little more tedious.

    :(

    Thursday, May 1, 2014 10:37 AM
  • User-745244032 posted

    Hmm... none of these things appear to be helping.

    I'm also concerned that IIS EXPRESS is not generating Log files... I'd post to iis.net somewhere but anytime I try to login over the I get an invalid SSL certificate error...

    using procmon I can see the following:

    • it always accesses \\central\users$\myuserid and NEVER C:\users\myuserid\... which is what "%userprofile%" says it resolves to when queried in command prompt window... this could be an artifact of the tools/name resolution implicit...
    • it appears to do this even if I use the info in "run iisexpress from the command line"... eg: iisexpress /config:c:\temp\iisexpress
    • unless I'm doing sopmething wacky with filtering in procmon iisexpress NEVER tries to even access the "IISExpress\Logs\*" folder - as if its turned off...?!? Only "TraceLogFiles" are written (to the network share) successfully... there are C:\Users\myuserid\AppData\Local\Temp\iisexpress\*.log files, which have content like this:
    Request started: "POST" http://localhost:1226/OrderService.svc
    Request ended: http://localhost:1226/OrderService.svc with HTTP status 500.0
    Request started: "POST" http://localhost:1226/OrderService.svc
    Request ended: http://localhost:1226/OrderService.svc with HTTP status 200.0
    


    Probably need to switch back to vs2012 and use the dev server... :(

    UPDATE: Yep, looks like you can either use dev server or go through the "minor" of DIY launching of IISExpress becuase as outlined here - http://blogs.msdn.com/b/acoat/archive/2013/04/23/iisexpress-configuration-file-is-not-well-formed-xml.aspx - You can't allow VS to launch IISExpress for you because it takes params from somewhere else (possibly "MyDocuemnts" in registry) to ALWAYS make IISExpress run using that appconfig - which isn't there when I'm offline... :\

    For whatever reason I am still not getting IIS logging whether I'm "offline" or not, the last logging filedate is 25/1/2014... this year... not sure why it isnt' doing it anymore, I can't see any activity for the logging directory in procmon... - I DO have "TraceLogFiles" being logged so maybe its an "one or the other" thing...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 2, 2014 12:51 AM