When using iis express no css applied on a remote pc

后端 未结 3 786
我寻月下人不归
我寻月下人不归 2021-01-03 11:50

I came up with a necessity to work with my asp.net mvc site from a remote pc while developing. So, I configured it to use IIS Express.

At first, a problem raised wit

3条回答
  •  忘掉有多难
    2021-01-03 12:33

    The problem was connected with netsh and binding configuration in ISS Express. At first I setup it through my ip, and it resulted in confusing errors.

    While searching for anything in the web I ran across Setting up IIS Express. All the same there, but it's suggested using pc name in netsh and iis applicationhost.config.

    So, I added

    netsh http add urlacl url=http://MyPCName:MyPort/ user=everyone
    

    and

    
    

    and a miracle!! It worked.

    As for the IE, I had to turn off the "Use Windows authorization" flag to make it work. Many thanks to Internet Explorer - Enable Integrated Windows Authentication. But nevertheless IE still asks for login and password, if an ip is used in url. If pc name is used it works silently.

    Firefox either asks for login and password (and works if one enters valid credentials) or you should apply How To: Firefox and Integrated Windows Authentication (mentioned in my question) and then it works silently both with ip and pc name.

    Hope this helps someone else.

    EDIT

    One remark: I had to launch VS2010 with administrtor permissions. If not, I still get HTTP 500 error based on the bad impersonation error. So, it looks like IIS Express, launched by VS2010 without administrator permissions under Windows 7, won't be able to work correctly.

    As far as I understood, the clue is to give the appropriate permissions to IIS_IUSRS. But until that it's easier to launch VS 2010 with administrator privilages.

提交回复
热议问题