首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Visual Studio 2013和ASP.NET网站配置工具

Visual Studio 2013和ASP.NET网站配置工具
EN

Stack Overflow用户
提问于 2013-12-12 19:00:50
回答 2查看 93.9K关注 0票数 53

我使用的是Visual Studio2013,你可能知道这里没有ASP.NET网络配置工具。我想一如既往地创建快速角色等。我试着使用这篇文章来实现它:http://blogs.msdn.com/b/webdev/archive/2013/08/19/asp-net-web-configuration-tool-missing-in-visual-studio-2013.aspx?PageIndex=2#comments。但是我得到了“无效的应用程序路径”错误。对此错误有什么解决方案或变通方法吗?

EN

回答 2

Stack Overflow用户

发布于 2014-12-04 00:52:13

在创建安全角色和用户之前,这确实对我有效,但是当我尝试运行我的网站时,收到以下消息HTTP Error 403.14 - Forbidden

Web服务器配置为不列出此目录的内容。最可能的原因是:·没有为请求的URL配置默认文档,并且服务器上没有启用目录浏览。

您可以尝试的内容:·如果您不想启用目录浏览,请确保配置了默认文档并且文件存在。·启用目录浏览。1.转到IIS Express安装目录。2.运行appcmd set config /section:system.webServer/directoryBrowse /enabled:true以在服务器级别启用目录浏览。3.运行appcmd set config "SITE_NAME“/section:system.webServer/directoryBrowse /enabled:true以在站点级别启用目录浏览。

·验证站点或应用程序配置文件中的configuration/system.webServer/directoryBrowse@enabled属性是否设置为true。

票数 0
EN

Stack Overflow用户

发布于 2015-04-04 18:11:52

我从here下载了一个开源的实用工具,叫做“WCF的凭证管理器”。它需要以下配置才能工作。

对于配置,您需要编辑工程CredentialServiceHost的配置文件,如下所示:

代码语言:javascript
复制
    *<?xml version="1.0"?>
<configuration>
    <connectionStrings>
    <clear />
        <add name="AspNetDbConnectionString" connectionString="[Your data base connection string]" providerName="System.Data.SqlClient"/>
    <add name="LocalSqlServer" connectionString="[Your data base connection string]" providerName="System.Data.SqlClient"/>


  </connectionStrings>
    <system.web>
        <authentication mode="None"/>
  <roleManager enabled="true"/>
    </system.web>
    <system.serviceModel>
        <services>
            <service name="AspNetSqlProviderService" behaviorConfiguration="MEX Enabled">
                <endpoint address="" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IApplicationManager"/>
                <endpoint address="" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IMembershipManager"/>
                <endpoint address="" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IPasswordManager"/>
                <endpoint address="" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IRoleManager"/>
                <endpoint address="" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IUserManager"/>
            </service>
        </services>
        <bindings>
            <wsHttpBinding>
                <binding name="TransactionalWS" transactionFlow="true">
                    <reliableSession enabled="True"/>
                </binding>
            </wsHttpBinding>
        </bindings>
      <behaviors>
         <serviceBehaviors>
            <behavior name="MEX Enabled">
               <serviceMetadata httpGetEnabled="true"/>
            </behavior>
         </serviceBehaviors>
      </behaviors>
    </system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

对于"CredentialsManager“项目,您应该使用以下配置:

代码语言:javascript
复制
<?xml version="1.0"?>
<configuration>
   <configSections>
      <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
         <section name="CredentialsManagerClient.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
      </sectionGroup>
   </configSections>
   <applicationSettings>
      <CredentialsManagerClient.Properties.Settings>
         <setting name="AspNetSqlProviderService" serializeAs="String">
            <value>http://localhost:8000</value>
         </setting>
      </CredentialsManagerClient.Properties.Settings>
   </applicationSettings>
   <system.serviceModel>
      <client>
         <endpoint address="http://localhost:8000/" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IApplicationManager"/>
         <endpoint address="http://localhost:8000/" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IMembershipManager"/>
         <endpoint address="http://localhost:8000/" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IPasswordManager"/>
         <endpoint address="http://localhost:8000/" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IRoleManager"/>
         <endpoint address="http://localhost:8000/" binding="wsHttpBinding" bindingConfiguration="TransactionalWS" contract="IUserManager"/>
      </client>
      <bindings>
         <wsHttpBinding>
            <binding name="TransactionalWS" transactionFlow="true">
               <reliableSession enabled="True"/>
            </binding>
         </wsHttpBinding>
      </bindings>
   </system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

以管理员身份运行"CredentialsServiceHost.exe“文件,然后运行"CredentialsManager.exe”文件。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20541680

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档