문제

I recently used the App Cmd to add a website automatically to my IIS server. The script I used was similar to : site name="Site1 bindings="http/*:80site" id="1%%l"

This was created inside a batch script that generates XML for use in AppCmd Add Sites

The site was added correctly, however it assigned the same Site ID as an already existing Site.

The simple fix for this seems to be to delete the site and inside the ApplicationHost.config file remove the site from there (or change its site ID).

The problem however is that the file always is in use so I cannot save any changes. I have tried restarting the server and going right to that file however the same error occurs.

Is there a way to shut down IIS on startup so that this file is not in use? Or are there other solutions to this so that I can access my sites again.

Thanks

도움이 되었습니까?

해결책

Found a solution to my problem.

Since the file (ApplicationHost.config) is always in use, I found a previous backup (/inetpub/history/) and copy/pasted. This is not a solution for everyone as it does remove any new config changes, however in my case I did not lose any data.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top