Visual studio 特定于用户的IIS配置

Visual studio 特定于用户的IIS配置,visual-studio,iis,Visual Studio,Iis,在MyProjectPropertiesWeb下,有一个选项“将服务器设置应用于所有用户”,该选项将IIS配置存储在MyProject.csproj.user中 然而,似乎没有办法设置默认值。这意味着克隆项目的任何人都必须自定义这些设置 使用特定于用户的IIS设置时,是否有办法设置默认值? 我尝试使用环境变量,但Visual Studio抱怨它无法为http://$(API\u主机):$(API\u端口)//创建IIS绑定需要设置什么?这是一个重要的细节。 大多数配置都可以在web.config

MyProject
Properties
Web
下,有一个选项“将服务器设置应用于所有用户”,该选项将IIS配置存储在
MyProject.csproj.user

然而,似乎没有办法设置默认值。这意味着克隆项目的任何人都必须自定义这些设置

使用特定于用户的IIS设置时,是否有办法设置默认值?


我尝试使用环境变量,但Visual Studio抱怨它无法为
http://$(API\u主机):$(API\u端口)//
创建IIS绑定需要设置什么?这是一个重要的细节。 大多数配置都可以在web.config文件中进行设置,因为该文件有一个“system.webServer”部分专门用于IIS配置

例如:

<system.webServer>
   <defaultDocument enabled="true">
      <files>
         <add value="Default.htm" />
         <add value="Index.htm" />
         <add value="Index.html" />
      </files>
   </defaultDocument>
   <directoryBrowse enabled="true" />
   <httpErrors>
      <error statusCode="404" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="my_custom_404.htm" />
   </httpErrors>
   <security>
      <authentication>
         <anonymousAuthentication enabled="true" userName="IUSR" />
         <basicAuthentication />
         <clientCertificateMappingAuthentication />
         <digestAuthentication />
         <iisClientCertificateMappingAuthentication />
         <windowsAuthentication />
      </authentication>
      <requestFiltering>
         <fileExtensions allowUnlisted="true" applyToWebDAV="true" />
         <verbs allowUnlisted="true" applyToWebDAV="true" />
         <hiddenSegments applyToWebDAV="true">
            <add segment="Web.config" />
         </hiddenSegments>
      </requestFiltering>
   </security>
   <staticContent lockAttributes="isDocFooterFileName">
      <mimeMap fileExtension=".mp3" mimeType="otect/stream" />
   </staticContent>
</system.webServer>


具体来说,我正在尝试设置
http://10.211.55.4:1228/
在用户配置中,同时保留项目配置中的默认值。这嵌套在
ProjectExtensions
下,请参阅。