1

Windows 7 컴퓨터에서 VS 2013 미리보기를 사용하여 새 프로젝트를 추가하는 동안 오류가 발생합니다. 또한 웹 양식 프로젝트를 시도했지만 동일한 오류가 발생했습니다. 그래서 내가 뭔가를 제대로 구성하지 않은 것처럼 보입니다. 비록 거의 모든 것을 시도해 보았습니다.VS 2012 또는 VS 2013 미리보기로 MVC 4 웹 API 또는 임의의 웹 프로젝트를 만들 수 없습니다.

Creation of the virtual directory "http://localhost:50161/ failed with the error: 
Filename:redirection.config 
Error: Cannot read configuration file 

아무도 도와 줄 수 있습니까?

이 내 프로젝트 파일이 웹 API 프로젝트처럼 보이는 방법입니다

<?xml version="1.0" encoding="utf-8"?> 
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> 
    <PropertyGroup> 
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 
<ProductVersion> 
</ProductVersion> 
<SchemaVersion>2.0</SchemaVersion> 
<ProjectGuid>{18A6F9D4-D8BF-4137-A766-5859742DD230}</ProjectGuid> 
<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> 
<OutputType>Library</OutputType> 
<AppDesignerFolder>Properties</AppDesignerFolder> 
<RootNamespace>MVC4ServiceBook.Web.Api</RootNamespace> 
<AssemblyName>MVC4ServiceBook.Web.Api</AssemblyName> 
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> 
<MvcBuildViews>false</MvcBuildViews> 
<UseIISExpress>True</UseIISExpress> 
<IISExpressSSLPort /> 
<IISExpressAnonymousAuthentication /> 
<IISExpressWindowsAuthentication /> 
<IISExpressUseClassicPipelineMode /> 
</PropertyGroup> 
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 
<DebugSymbols>true</DebugSymbols> 
<DebugType>full</DebugType> 
<Optimize>false</Optimize> 
<OutputPath>bin\</OutputPath> 
<DefineConstants>DEBUG;TRACE</DefineConstants> 
<ErrorReport>prompt</ErrorReport> 
<WarningLevel>4</WarningLevel> 
</PropertyGroup> 
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 
<DebugType>pdbonly</DebugType> 
<Optimize>true</Optimize> 
<OutputPath>bin\</OutputPath> 
<DefineConstants>TRACE</DefineConstants> 
<ErrorReport>prompt</ErrorReport> 
<WarningLevel>4</WarningLevel> 
</PropertyGroup> 
<ItemGroup> 
<Reference Include="Microsoft.CSharp" /> 
<Reference Include="System" /> 
<Reference Include="System.Data" /> 
<Reference Include="System.Data.Entity" /> 
<Reference Include="System.Drawing" /> 
<Reference Include="System.Web.Entity" /> 
<Reference Include="System.Web.ApplicationServices" /> 
<Reference Include="System.ComponentModel.DataAnnotations" /> 
<Reference Include="System.Core" /> 
<Reference Include="System.Data.DataSetExtensions" /> 
<Reference Include="System.Xml.Linq" /> 
<Reference Include="System.Web" /> 
<Reference Include="System.Web.Abstractions" /> 
<Reference Include="System.Web.Routing" /> 
<Reference Include="System.Xml" /> 
<Reference Include="System.Configuration" /> 
<Reference Include="EntityFramework"> 
    <HintPath>..\..\lib\EntityFramework.5.0.0\lib\net40\EntityFramework.dll</HintPath> 
</Reference> 
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath> 
    </Reference> 
    <Reference Include="Microsoft.Web.Mvc.FixedDisplayModes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.AspNet.Mvc.FixedDisplayModes.1.0.0\lib\net40\Microsoft.Web.Mvc.FixedDisplayModes.dll</HintPath> 
</Reference> 
<Reference Include="Newtonsoft.Json"> 
    <HintPath>..\..\lib\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath> 
</Reference> 
<Reference Include="System.Net.Http"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.Net.Http.2.0.30506.0\lib\net40\System.Net.Http.dll</HintPath> 
</Reference> 
<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <HintPath>..\..\lib\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll</HintPath> 
</Reference> 
<Reference Include="System.Net.Http.WebRequest"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.Net.Http.2.0.30506.0\lib\net40\System.Net.Http.WebRequest.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.Helpers.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <HintPath>..\..\lib\Microsoft.AspNet.WebApi.Core.4.0.30506.0\lib\net40\System.Web.Http.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <HintPath>..\..\lib\Microsoft.AspNet.WebApi.WebHost.4.0.30506.0\lib\net40\System.Web.Http.WebHost.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.AspNet.Mvc.4.0.30506.0\lib\net40\System.Web.Mvc.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.Optimization"> 
    <HintPath>..\..\lib\Microsoft.AspNet.Web.Optimization.1.0.0\lib\net40\System.Web.Optimization.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.Providers"> 
    <HintPath>..\..\lib\Microsoft.AspNet.Providers.Core.1.2\lib\net40\System.Web.Providers.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.AspNet.Razor.2.0.30506.0\lib\net40\System.Web.Razor.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath> 
</Reference> 
<Reference Include="System.Web.Http.Tracing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.AspNet.WebApi.Tracing.4.0.30506\lib\net40\System.Web.Http.Tracing.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.Http.OData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.AspNet.WebApi.OData.4.0.30506\lib\net40\System.Web.Http.OData.dll</HintPath> 
    </Reference> 
    <Reference Include="Microsoft.Data.Edm, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.Data.Edm.5.2.0\lib\net40\Microsoft.Data.Edm.dll</HintPath> 
    </Reference> 
    <Reference Include="Microsoft.Data.OData, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\Microsoft.Data.OData.5.2.0\lib\net40\Microsoft.Data.OData.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Spatial, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\System.Spatial.5.2.0\lib\net40\System.Spatial.dll</HintPath> 
</Reference> 
<Reference Include="WebGrease"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\WebGrease.1.3.0\lib\WebGrease.dll</HintPath> 
</Reference> 
<Reference Include="Antlr3.Runtime"> 
    <Private>True</Private> 
    <HintPath>..\..\lib\WebGrease.1.3.0\lib\Antlr3.Runtime.dll</HintPath> 
</Reference> 
</ItemGroup> 
<ItemGroup> 
<Compile Include="App_Start\BundleConfig.cs" /> 
<Compile Include="App_Start\FilterConfig.cs" /> 
<Compile Include="App_Start\RouteConfig.cs" /> 
<Compile Include="App_Start\WebApiConfig.cs" /> 
<Compile Include="Controllers\HomeController.cs" /> 
<Compile Include="Controllers\ValuesController.cs" /> 
<Compile Include="Global.asax.cs"> 
    <DependentUpon>Global.asax</DependentUpon> 
</Compile> 
<Compile Include="Properties\AssemblyInfo.cs" /> 
</ItemGroup> 
<ItemGroup> 
<Content Include="favicon.ico" /> 
<Content Include="Global.asax" /> 
    <Content Include="Web.config" /> 
<Content Include="Web.Debug.config"> 
    <DependentUpon>Web.config</DependentUpon> 
</Content> 
<Content Include="Web.Release.config"> 
    <DependentUpon>Web.config</DependentUpon> 
</Content> 
<Content Include="Areas\HelpPage\Views\_ViewStart.cshtml" /> 
<Content Include="Content\Site.css" /> 
<Content Include="Images\accent.png" /> 
<Content Include="Images\bullet.png" /> 
<Content Include="Images\heroAccent.png" /> 
<Content Include="Images\orderedList0.png" /> 
<Content Include="Images\orderedList1.png" /> 
<Content Include="Images\orderedList2.png" /> 
<Content Include="Images\orderedList3.png" /> 
<Content Include="Images\orderedList4.png" /> 
<Content Include="Images\orderedList5.png" /> 
<Content Include="Images\orderedList6.png" /> 
<Content Include="Images\orderedList7.png" /> 
<Content Include="Images\orderedList8.png" /> 
<Content Include="Images\orderedList9.png" /> 
<Content Include="Scripts\_references.js" /> 
<Content Include="Views\Web.config" /> 
<Content Include="Views\_ViewStart.cshtml" /> 
<Content Include="Views\Home\Index.cshtml" /> 
<Content Include="Views\Shared\Error.cshtml" /> 
<Content Include="Views\Shared\_Layout.cshtml" /> 
</ItemGroup> 
<ItemGroup> 
<Folder Include="App_Data\" /> 
<Folder Include="Models\" /> 
</ItemGroup> 
<PropertyGroup> 
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> 
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> 
</PropertyGroup> 
    <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> 
    <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> 
    <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'"> 
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" /> 
</Target> 
<ProjectExtensions> 
<VisualStudio> 
    <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> 
    <WebProjectProperties> 
     <UseIIS>False</UseIIS> 
     <AutoAssignPort>True</AutoAssignPort> 
     <DevelopmentServerPort>0</DevelopmentServerPort> 
     <DevelopmentServerVPath>/</DevelopmentServerVPath> 
     <IISUrl> 
     </IISUrl> 
     <NTLMAuthentication>False</NTLMAuthentication> 
     <UseCustomServer>False</UseCustomServer> 
     <CustomServerUrl> 
     </CustomServerUrl> 
     <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> 
    </WebProjectProperties> 
    </FlavorProperties> 
    </VisualStudio> 
    </ProjectExtensions> 
    <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
    Other similar extension points exist, see Microsoft.Common.targets. 
<Target Name="BeforeBuild"> 
</Target> 
<Target Name="AfterBuild"> 
</Target> --> 
</Project> 

답변

0

그것을 해결.

MyDocuments에서 SQLExpress 폴더를 삭제하고 IIS를 제거한 다음 IIS를 다시 설치하고 이번에는 redirection.config 파일이있는 SQLExpress 폴더를 다시 만들었으며 (이전에는 없었 음) IIS_IUSRS에 읽기 권한을 부여했습니다. 사용자가 해당 파일을 읽고 문제가 해결되었습니다.

0

2 년 된 프로젝트를 여는 비슷한 문제가 발생했습니다. 내 솔루션은 폴더를 삭제 (실제로 이름 바꾸기 및 나중에 삭제)했습니다. C : \ Users \ AppData \ Local \ Microsoft \ WebsiteCache