문제

I have a problem where adding Application to IIS Site with network physical path.

In code:

    using Microsoft.Web.Administration;
    ...
    ServerManager serverManager = new ServerManager();
    var site = serverManager.Sites.Where(i => i.Name == "services").SingleOrDefault();
    site.Applications.Add("\\src\services\myservice", "myservice"); //exception

My application throws an exception "Invalid application path". I try to create a Virtual Directory, but I already catch this exception. Application pool and my program have a permissions to this network folder. How to fix this problem?

올바른 솔루션이 없습니다

다른 팁

Resolved. .Applications.Add() method requires slash at beginning:

site.Applications.Add("\\src\services\myservice", "/myservice");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top