首页 文章

Visual Studio 2013和ASP.NET Web配置工具

提问于
浏览
53

我正在使用Visual Studio 2013,您可能知道没有ASP.NET Web配置工具 . 我一直想做快速角色等 . 我尝试使用这篇文章启用它:http://blogs.msdn.com/b/webdev/archive/2013/08/19/asp-net-web-configuration-tool-missing-in-visual-studio-2013.aspx?PageIndex=2#comments . 但我得到"Invalid application path"错误 . 解决此错误或解决方法的任何方法?

4 回答

  • 7

    在控制台上,复制并粘贴此处写的内容:

    "C:\Program Files\IIS Express\iisexpress.exe" /path:c:\windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETWebAdminFiles /vpath:"/asp.netwebadminfiles" /port:8089 /clr:4.0 /ntlm
    

    如果您使用管理员权限打开cmd.exe并不重要,只需复制粘贴上面的代码在控制台上,并且在完成之前不要以“q”退出!

    然后打开浏览器窗口并在地址栏上写下:

    http://localhost:8089/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=[Exact_Project_Path]\&applicationUrl=/
    

    务必从Windows资源管理器中复制并粘贴项目路径,它会起作用;)

    我希望微软将此版本添加回VS2013的下一次更新!任何人复制和粘贴代码都不方便,只是为了像过去那样处理会员资格...

    希望有所帮助!

    IMPORTANT EDIT: I am sorry, I just realized that it matters if you start the console with administrator privileges. Don't do that. If console has administrator rights, the Web Configuration Tool shows this error on the Security page:

    您选择的数据存储存在问题 . 这可能是由无效的服务器名称或凭据或权限不足引起的 . 它也可能是由未启用角色管理器功能引起的 . 单击下面的按钮可重定向到可以选择新数据存储的页面 . 以下消息可能有助于诊断问题:拒绝访问路径'C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 1c3fef5c \ 2180c7f9 \ hash' .

  • 0

    如果要求您输入用户名和密码,请执行以下操作:

    • 打开Firefox并输入about:config作为网址

    • 在"ntlm"的过滤器类型中

    • 双击"network.automatic-ntlm-auth.trusted-uris"并输入"localhost"并按Enter键

    来源:http://forums.codecharge.com/posts.php?post_id=81959

  • 135

    有一个名为"Credentials Manager for WCF"的开源实用程序,我从here下载 . 它需要以下配置才能工作 .
    对于配置,您应该编辑项目"CredentialServiceHost"的配置文件,如下所示:

    *<?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”,您应该使用以下配置:

    <?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

    这确实对我有用,直到创建一个安全角色,然后是一个用户,但是当我尝试运行我的网站时,得到以下消息HTTP Error 403.14 - Forbidden

    Web服务器配置为不列出此目录的内容 . 最有可能导致:•未为请求的URL配置默认文档,并且未在服务器上启用目录浏览 .

    您可以尝试的事项:•如果您不想启用目录浏览,请确保已配置默认文档并且文件存在 . •启用目录浏览 . 1.转到IIS Express安装目录 . 2.运行appcmd set config /section:system.webServer/directoryBrowse / enabled:true以启用服务器级别的目录浏览 . 3.Run appcmd set config [“SITE_NAME”] / section:system.webServer/directoryBrowse / enabled:true表示在站点级别启用目录浏览 .

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

相关问题