Failed To Map The Path Error In Asp.net
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Failed to map the path '/' with asp.net development server up vote 1 down vote favorite I have used following code to change web.config at run time Configuration conf = WebConfigurationManager.OpenWebConfiguration("~/"); conf.ConnectionStrings.ConnectionStrings["ApplicationServices"].ConnectionString = "Test"; conf.Save(); But I am getting an error - "Failed to map the path '/'." I have searched on internet and worked on all the solutions like 1. Change the path to "/" 2. Change the path to "~/" but same issue occurred. There is one point I would like to say is my application is not hosted on IIS, but running though visuals studio using asp.net development server asp.net share|improve this question asked Oct 1 '13 at 11:29 gyansangrah 64 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted Replace ~ with HttpContext.Current.Request.ApplicationPath i.e. Configuration conf = WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath) ~ should work, I suggested ApplicationPath to be sure of Virtual Directory differences when hosted on IIS instead of VS DevServer. In fact if you are targetting web.config in root, then you just need to pass null as the parameter. No need for passing ~. Edit: Are you working with admini
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/Getting Started/Failed to map the path '/'. Failed to map the path '/'. [Answered]RSS 8 replies Last post Sep 06, 2010 07:52 AM by more.rahuls ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Reply gp3333 Member 1 Points http://stackoverflow.com/questions/19115024/failed-to-map-the-path-with-asp-net-development-server 73 Posts Failed to map the path '/'. Jan 28, 2008 06:39 PM|gp3333|LINK I am install Visual studio 2008 and after I import any project from Visual studio 2005 or after I one by one add some files by any example and try run it, I https://forums.asp.net/t/1211977.aspx have all the time error below... I am point in project target to framework 2.0 properly any help? I 3 days looks around and no right solution Server Error in '/CustomerWebSiteMY' Application. Failed to map the path '/'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Failed to map the path '/'. Source Error: [No relevant source lines] Source File: c:\Users\GP\AppData\Local\Temp\Temporary ASP.NET Files\customerwebsitemy\c2a87546\bfb9e837\App_Web_92tmcihj.0.cs Line: 0 Stack Trace: [InvalidOperationException: Failed to map the path '/'.] System.Web.Configuration.ProcessHostConfigUtils.MapPathActual(String siteName, VirtualPath path) +261 System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) +580 System.Web.Configuration.ProcessHostMapPath.GetPathConfigFilenameWorker(String siteID, VirtualPath path, String& directory, String& baseName) +19 System.Web.Configuration.ProcessHostMapPath.System.Web.Configuration.IConfigMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +37 System.Web.Configuration.HostingPreferredMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& b
SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation https://social.msdn.microsoft.com/Forums/en-US/dd53e821-28a1-401b-85bb-d2a0b327a880/server-error-in-application-failed-to-map-the-path?forum=Vsexpressinstall APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Server Error in '/' Application Failed to map the path Archived Forums I-L > Installing and failed to Registering Visual Studio Express Editions Question 0 Sign in to vote Need some help on this error. Everything was working fine for me. I had one site up and running with the Visual Web Developer 2005 Beta 2 and Microsoft Framework 2.0. I created a second website and put it in its own directory, configured IIS to use Ms Framework 2.0. failed to map Everything should work being the same just different directories. Unfortunately, now both websites are down. I have posted the error below. I have attempted creating the folder that it is yelling about even though I do not use it. I even tried creating a basic hello world website. It also receives the error. I have uninstalled and reinstalled to no avail. Any help would be appreciated. Server Error in '/' Application. Failed to map the path '/App_GlobalResources'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Failed to map the path '/App_GlobalResources'.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidOperationException: Failed to map the path '/App_GlobalResources'.] System.Web.Hosting.HostingEnvironment.MapPathActual(String virtualPath, Boolean permitNull) +975 System.Web.Hosting.HostingEnvironment.MapPathInternal(String virtualPath) +42 System.Web.Hosting.HostingEnvironment.MapPath(String virtualPath) +55 System.Web.Compil