Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2008
    Thanked 0 Times in 0 Posts

    ASP.Net project not opening - file path does not correspond to the url localhost

    I have an ASP.Net web project I've copied from a co-worker's machine and I can't open it. The message I see is as follows:

    The default Web access mode for this project is set to file share, but the project folder at ‘http://localhost’ cannot be opened with the path ‘D:\Workarea2\Development\Web’. The error retured was:
    Unable to open Web project ‘/’. The file path ‘D:\Workarea2\Development\Web’ does not correspond to the URL ‘http://localhost’. The two need to map to the same server location. HTTP Error 404: Not Found.

    In IIS, I have stopped my default web site and created a new website mapped to port 80. The web pages the ASP.Net project concerns are all in this directory. The physical directory for this website is D:\Workarea2\Development\Web. I can browse the web site without any problems from IIS.

    So in other words, I have a web site set up correctly in IIS, but I can't open the ASP.Net project associated with the site! This same ASP.Net project opens fine on my co-worker's machine, and I have made the web site I set up under port 80 on my server an exact match to the web site he set up on his machine. Can anyone shed any light on this puzzling behaviour?

    The solution file I'm opening is this:

    Microsoft Visual Studio Solution File, Format Version 7.00
    Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "localhost", "http://localhost/localhost.vbproj", "{FA46AF40-8685-4105-813A-AF3D3CBEF408}"
    GlobalSection(SolutionConfiguration) = preSolution
    ConfigName.0 = Debug
    ConfigName.1 = PatchRelease
    ConfigName.2 = Release
    GlobalSection(ProjectDependencies) = postSolution
    GlobalSection(ProjectConfiguration) = postSolution
    {FA46AF40-8685-4105-813A-AF3D3CBEF408}.Debug.ActiveCfg = Debug|.NET
    {FA46AF40-8685-4105-813A-AF3D3CBEF408}.Debug.Build.0 = Debug|.NET
    {FA46AF40-8685-4105-813A-AF3D3CBEF408}.PatchRelease.ActiveCfg = Release|.NET
    {FA46AF40-8685-4105-813A-AF3D3CBEF408}.PatchRelease.Build.0 = Release|.NET
    {FA46AF40-8685-4105-813A-AF3D3CBEF408}.Release.ActiveCfg = Release|.NET
    {FA46AF40-8685-4105-813A-AF3D3CBEF408}.Release.Build.0 = Release|.NET
    {089E24D9-3337-4F9F-8A5D-5DF771685863}.Debug.ActiveCfg = Debug
    {089E24D9-3337-4F9F-8A5D-5DF771685863}.PatchRelease.ActiveCfg = Release
    {089E24D9-3337-4F9F-8A5D-5DF771685863}.Release.ActiveCfg = Release
    {089E24D9-3337-4F9F-8A5D-5DF771685863}.Release.Build.0 = Release
    {F13F0E5E-9574-474E-BB9C-BAC07B4F06CA}.Debug.ActiveCfg = Debug
    {F13F0E5E-9574-474E-BB9C-BAC07B4F06CA}.PatchRelease.ActiveCfg = Release
    {F13F0E5E-9574-474E-BB9C-BAC07B4F06CA}.PatchRelease.Build.0 = Release
    {F13F0E5E-9574-474E-BB9C-BAC07B4F06CA}.Release.ActiveCfg = Release
    GlobalSection(SolutionItems) = postSolution
    GlobalSection(ExtensibilityGlobals) = postSolution
    GlobalSection(ExtensibilityAddIns) = postSolution

    The localhost.vbproj file is as follows:
    ProjectType = "Web"
    ProductVersion = "7.0.9466"
    SchemaVersion = "1.0"
    ProjectGuid = "{FA46AF40-8685-4105-813A-AF3D3CBEF408}"
    ApplicationIcon = ""
    AssemblyKeyContainerName = ""
    AssemblyName = "localhost"
    AssemblyOriginatorKeyFile = ""
    AssemblyOriginatorKeyMode = "None"
    DefaultClientScript = "JScript"
    DefaultHTMLPageLayout = "Flow"
    DefaultTargetSchema = "IE32Nav30"
    DelaySign = "false"
    OutputType = "Library"
    OptionCompare = "Binary"
    OptionExplicit = "On"
    OptionStrict = "Off"
    RootNamespace = "localhost"
    StartupObject = ""
    Name = "Debug"
    BaseAddress = "285212672"
    ConfigurationOverrideFile = ""
    DefineConstants = ""
    DefineDebug = "true"
    DefineTrace = "true"
    DebugSymbols = "true"
    IncrementalBuild = "true"
    Optimize = "false"
    OutputPath = "bin\"
    RegisterForComInterop = "false"
    RemoveIntegerChecks = "false"
    TreatWarningsAsErrors = "false"
    WarningLevel = "1"
    Name = "Release"
    BaseAddress = "285212672"
    ConfigurationOverrideFile = ""
    DefineConstants = ""
    DefineDebug = "false"
    DefineTrace = "true"
    DebugSymbols = "false"
    IncrementalBuild = "false"
    Optimize = "true"
    OutputPath = "bin\"
    RegisterForComInterop = "false"
    RemoveIntegerChecks = "false"
    TreatWarningsAsErrors = "false"
    WarningLevel = "1"
    Name = "System"
    AssemblyName = "System"
    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"
    Name = "System.Web"
    AssemblyName = "System.Web"
    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Web.dll"
    <Import Namespace = "Microsoft.VisualBasic" />
    <Import Namespace = "System" />
    RelPath = "cluster.asp"
    BuildAction = "Content"
    <!-- etc - list of files -->

    Grateful if anyone could shed any light on this. I can't see for the life of me why it's not correct.

  2. #2
    Regular Coder Freon22's Avatar
    Join Date
    May 2005
    Thanked 5 Times in 5 Posts
    So while in MS Visual Studio if you click on Open Web Site, then click on Local IIS, then navigate to the location of the web site. It will not open up as a project? If thats the case you may need to delete the .sln file for the project. But you may want to make a backup of that file before you delete it.

    I have never had any problems opening up sites on Local IIS or Remote Site.
    Last edited by Freon22; 10-28-2008 at 03:06 PM.
    I was wondering why frisbees got bigger as they got closer, then it hit me.

  3. #3
    teh Moderatorinator
    Join Date
    Sep 2004
    Thanked 40 Times in 40 Posts
    When you access the site through localhost the app comes up? e.g
    Works? But you can't open it with visual studio? If so, you'll need to make sure you have the proper .webinfo file:
    Example i'll take from a project on my machine:
    filename: yourProjectName.vbproj.webinfo
    file contents:
        <Web URLPath = "http://localhost/yourProjectName/yourProjectName.vbproj" />
    Good luck;

  4. #4
    Regular Coder
    Join Date
    Jun 2008
    SE Wisconsin, US
    Thanked 20 Times in 20 Posts
    If none of these options works, you might consider trying to remove the reflected schemas cache. When I have bizarre errors in VS.Net and can't solve them with other means, flushing this sometimes helps. You can find more info at http://joeon.net/post/MS-AJAX-Releas...n-element.aspx.

    Hope that helps! It may not do anything for you, but it shouldn't hurt, either.
    Milwaukee Web Designer and SEO Milwaukee Firm specializing in ASP.Net, C#, VB.Net, SQL Server and Access.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts