Skip Navigation LinksHome > View Post

Failed to map the path App GlobalResources

I recently had a tricky situation trying to run ASP.NET 2.0 on a Windows 2000 server and ran into the following error: Failed to map the path '/YourApplication/App_GlobalResources'.

I struggled with this for a while so thought I'd post the solution that worked for me here. I spent hours searching the groups but mostly found unanswered posts. A couple did hint that the nature of the problem lies in the permissions of the ASP.NET user account. Eventually I turned to the big brains at Microsoft Support - here's what we came up with.

First step was to delete the ASPNET user account and then run the aspnet_regiis utility in the framework folder:

c:\WINNT\Microsoft.NET\framework\v2.0.50727\aspnet_regiis -i

This will re-register ASP.NET with IIS and re-create the ASPNET account.

Next you need to give permissions to the (nicely refreshed) ASPNET user account to access this folder with Modify permissions:

C:\Documents and Settings\All Users.WINNT\Application Data\Microsoft\Crypto\RSA\MachineKeys

A quick restart of IIS (quick-tip: simply type iisreset in a run dialog to restart your IIS) and you should be away. It worked for us anyway :)

This post is provided "AS IS" with no warranties, and confers no rights. Thanks Aurélien at Microsoft!

Tags: ASP.NET

 
Josh Post By Josh Twist
10:19 AM
28 Nov 2005

» Next Post: Web Service XML compression with .NET 2.0
« Previous Post: XHTML in .NET 2.0

Comments are closed for this post.

Posted by Scott Jones @ 19 Feb 2006 9:52 AM
Hi Josh,

Unfortunately, the solution for solving the "Failed to map the path App_GlobalResources" did not work for me. I am still getting the same error message. Any ideas?

Thanks anyway.

Scott Jones

Posted by Josh @ 19 Feb 2006 11:55 AM
Hi Scott,

Have you tried giving the ASP.NET user account permissions over the 'C:\Documents and Settings\All Users.WINNT\Application Data\Microsoft\Crypto\RSA\MachineKeys' folder?

Make sure you propagate the permissions over the files and sub-directories too.

Let me know how you get on.

Josh

Posted by Scott @ 21 Feb 2006 6:36 PM
Hi Josh,

Yes. I just checked it again to make sure that I did propagate the permissions for all files and folders. Still not working. I should mention that I am getting this error on my development machine which has an os of xp sp 2. Once I have it working, I plan to deploy it to win 2003 server. I am assuming that I will have the same problem there.

Thanks for any help that you can give me.

Scott

Posted by Josh @ 22 Feb 2006 12:22 AM
Right. Ouch.

Next I'd use regmon and filemon (available free from http://www.sysinternals.com/) to see if the ASPNET account is being denied access to a file or registry resource.

They're pretty easy to use - just launch the program, set the include filter to "*aspnet*" (without the quotes) and you're away monitoring file/registry access. Now simply request your web page generating the error. You may want to restart IIS to ensure the appdomain starts afresh for this.

Josh

Posted by Scott @ 23 Feb 2006 12:34 PM
Thanks Josh. I'll give it a try and let you know how I make out.

Scott

Posted by Thomas Lindsay @ 26 Feb 2006 1:42 AM
Thank you, Josh - regmon located problem in HKCR Interface CLSID where APSNET user was denied access. Added permission and page ran fime.

Posted by Scott @ 27 Feb 2006 6:04 AM
Hi Josh,

Same here. Regmon was able to locate the problem folder for me. Thanks for the help!

Scott

Posted by Nina Meiers @ 14 Mar 2006 4:50 AM
Thanks for this - It was clear, I had the second issue and resolved it and was able to get aspnet 2 working on my server, after trying unsuccessfully for some time. I guess I had to wait until someone found the answer to this very common issue.

Nina Meiers

Posted by Flu @ 20 Mar 2006 4:38 AM
I just gave the ASP.NET user full access to "C:\Documents and Settings\All Users.WINNT\Application Data\Microsoft\Crypto\RSA\MachineKeys" without deleting the account or doing anything else and it worked!

Thanks
Ulf Reimers

Posted by Mihir Shah @ 03 Apr 2006 9:19 AM
Many thanks, Josh.

I had a similar problem and was able to trace the cause to inadequate access to the C:\WINNT\system32\Microsoft\Crypto\RSA\MachineKeys folder using FileMon.

Mihir Shah

Posted by Tiberiu @ 12 May 2006 5:43 AM
Good work! Problem solved for me too.

Posted by Thiago Brasil @ 23 May 2006 4:33 PM
Thanks a lot, I had the same problem and I solve it after read you post.
good codes.

Posted by Ravi Garg @ 08 Jun 2006 8:25 AM
Thanx alot guys. This worked for me & solved my big problem

Posted by NetFly @ 12 Jun 2006 7:26 AM
I cannot find this path on my W2k server:

C:\Documents and Settings\All Users.WINNT\Application Data\Microsoft\Crypto\RSA\MachineKeys

where is it?

Posted by Tayron @ 22 Jun 2006 7:58 AM
This is other solution

1. I install netx patch
http://support.microsoft.com/?id=286814

2. Reboot the Machine
3. Delete the virtual directory Reports and Reportserver from IIS (Installed Sql 2005 Reporting services)
4. Create virtual directory Reports and Reportserver from Start - Program - Microsoft Sql Server 2005 - Configuration Tools - Reporting services configuration and create new Report Server

work for me.

Posted by Alex @ 30 Jun 2006 6:57 AM
Thanx.. worked for me!

Posted by Denis @ 12 Aug 2006 4:24 PM
Josh's suggestion worked fine for me. I must say that it was the cleanest & quickest fix I found.

Thanks!

Posted by achilles @ 27 Sep 2006 5:15 AM
Thanks! The solution worked for me too.

Posted by Chris @ 27 Sep 2006 7:55 AM
This path may also need to be granted in the same way, (Filemon did the trick again)...

C:\WINNT\Profiles\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

Posted by Asif Patel @ 01 Oct 2006 11:22 PM
Thanks Josh, your post was of great help,God bless you & may all your dreams come true

Posted by Paul P @ 06 Oct 2006 9:06 AM
I had this problem trying to go to parent paths using VS2005, I gave ASPNET permission without joy. I had opened the web project via the file system ie project in solution explorer looked like c:\... I removed the project and added it via the web ie it looked like http:\\localhost... and that seemed to fix it (I hate dynamic ports aswell so that was a bonus)

Posted by Weiping Le @ 13 Oct 2006 1:16 PM
Thanks for everyone's comments. All I did is just
go to registry ( regedit)
give ASPNET account full access to:

HKEY_CLASSES_ROOT\Interface\{70B51430-B6CA-11D0-B9B9-00A0C922E750}

It resolved my issue.

Cheers.

Weiping

Posted by Marc @ 31 Oct 2006 2:47 AM
Yes !

ASPNET Full access to HKR\Interface\{70B51430........

and now it's working

Thanks

Posted by Chris @ 15 Nov 2006 1:10 AM
Hi

I have a similar error, but it says:

Failed to map path '/'.

Is this the same error? It's verry strange, because I only get it sometimes and not all the time.

Posted by Max @ 15 Nov 2006 6:45 PM
Hi,

I am getting this error after installing Xceed chart for asp.net 4.0.

System.InvalidOperationException: Failed to map the path '/'.

I have tried all the steps above and it still did not resolve the issue.


Posted by Josh @ 16 Nov 2006 12:38 AM
Sorry guys but it sounds like that's a different error.

Posted by Chris @ 20 Nov 2006 1:49 AM
I found someone with a similar problem but no solution:

http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.aspnet/2005-05/msg02376.html

I have no idea, why it only happens sometimes. And why can't .net map '/'? '/' should be no problem at all.

Posted by Chris @ 20 Nov 2006 11:04 PM
Are we allowed to discuss the problem here Josh? ;-)

I got the error at following line (sometimes) :-S

plhoMainPart.Controls.Add(LoadControl(Session["admin_usercontrol"].ToString() + ".ascx"));

Where plhoMainPart is a PlaceHolder and the Session variable is NOT null. I have also tried this:

plhoMainPart.Controls.Add(LoadControl("./ + "Session["admin_usercontrol"].ToString() + ".ascx"));

But it doesn't work either.

Posted by Josh @ 21 Nov 2006 1:43 AM
>> "Are we allowed to discuss the problem here Josh?"

Fill your boots Chris but I'm not sure that many people will read that far down the comments. Why not try one of the forums on msdn or gotdotnet.com?

Posted by Ryan S @ 11 Jan 2007 9:52 AM
Nothing has worked so far. First off, there is not a 'C:\Documents and Settings\All Users.WINNT\' directory on my computer, rather it has only the 'All Users' folder (as in it lacks the .WINNT extension). I am unsure as to whether this effects things or not... I'm running on server 2000 and using IIS 5 if it's any help.

Anyhow, I've followed all the steps suggested to no avail. When I ran filemon, I noticed that the aspnet_wp.exe file kept trying to access files and folders in my website's directory. The only two files that VS 2005 created were the default.aspx and Web.config (and an empty App_Data folder). At any rate, in every case in regmon where 'MachineKey' shows up the result is 'NOT FOUND'. I guess this means that something is lacking permissions (even though it feels like I've ASPNET user permissions to half the computer now). Any clues as to what the NOT FOUND means would be greatly appreciated.

Oh, I was also hoping someone could clarify how to grant permissions via regedit? (look at Weiping Le's post)

Thanks so much,

-Ryan S

Posted by oscar @ 16 Jan 2007 9:36 AM
Ryan S

Indeed you hope somebody could clarify how to grant permissions via regedit?

Upss ! No man, don't. The Fail to map the path ... problem, it solves for many ways. No Ryan S, please don't expect something like you hope, that's retro. Aim ! man, the light always come to us.

Posted by YK @ 15 Feb 2007 5:14 PM
Josh, This helped a lot.

Thanks so much

Posted by Muchiri @ 08 Mar 2007 12:42 AM
Thanks Weiping Le @ 13 Oct 2006 1:16 PM
Nothing worked until I tried your suggestion of giving ASPNET full access to:

HKEY_CLASSES_ROOT\Interface\{70B51430-B6CA-11D0-B9B9-00A0C922E750}

It resolved my issue.

Cheers.

Muchiri Motilewa

Posted by Jason Z @ 12 Mar 2007 5:58 AM
Hi Guys,

Finally I found a solution!!!! I tried all of the solutions here with no luck until I stumbled upon Greg Cost's post here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=117013&SiteID=1

In the folder --> C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys
... I found a key that was 0 KBytes, (bc0b10bc77567c10e98669fe434e5488_f8157126-3cd0-462b-838b-a193b791f076), be sure to show the details of the folder so you could see these key details.

Once I saw that this key had 0 KBytes, I simply deleted it (which is then recreated when accessing the website), AND IT WORKED!!! Lord ol'mighty, it took me a week of constant searching to finally get this to work!!!

As I mentioned, I tried all of the other suggested solutions above, so the ultimate solution may be a combination of the above solutions as well as deleting the key that has 0 KBytes.

Hope this post saves someone some grief. :o)

Jason Z

Posted by BlackLocist @ 15 Mar 2007 7:50 AM
Also use RegMon to check if aspnet_wp.exe is being denied any registry. Add permissions and viola! worked for me. :)

Posted by Yoshi @ 21 Mar 2007 1:09 PM
What worked for me is that you have to click the Security Tab under the Properties of the C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA and add the ASP.NET account with full control. I was just changing the permissions under the Sharing tab. Hope this helps someone else!!

Posted by Mark W @ 29 May 2007 6:30 AM

Thanks to all
All I did is just
go to registry regedt32.exe for win2000
give ASPNET account full access to:

HKEY_CLASSES_ROOT\Interface\{70B51430-B6CA-11D0-B9B9-00A0C922E750}

Thanks for the post it WORKS!!!!!!!!!!

Mark

Posted by Christophe @ 12 Jun 2007 10:42 AM
Thanks Jason Z. I also had a key in the C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys folder that had 0 bytes, deleted it, and it works!

Posted by Rob Smith @ 27 Jun 2007 7:33 AM
I found an even easier solution...

When i develop web sites for top level domain names (something.com), I usually set my IIS home directory to c:\inetpub\wwwroot\sitename so that way I can link on the site to /default.aspx and have it operate the same way when im developing and when its deployed. Otherwise, it would be /sitename/default.aspx locally and /default.aspx deployed.

With that said, when I changed my home directory of IIS back to c:\inetpub\wwwroot\, I had a trailing slash like you see in this sentence. I removed the trailing slash which made it c:\inetpub\wwwroot and it fixed it.

Posted by Pramod @ 02 Jul 2007 8:12 PM
Thanks josh it worked for me..

thank you so much..

Posted by marcemarc @ 06 Jul 2007 2:15 AM
Last day at work, deploying the big signed off project to the live webserver, and got this error; mightly stressful, thanks for all the advice above. I gave the ASP.Net account full permissions to the registry setting:
HKEY_CLASSES_ROOT\Interface\{70B51430-B6CA-11D0-B9B9-00A0C922E750}
and
modify permissions to c:\documents and settings\all users\application data\microsoft\crypto\RSA

You have to make sure that you have 'show hidden files and folders turned on', and 'hide protected operating system files turned off', to be able to find the folder (this is in tools - folder options - view) , and you need to do start run regedt32 rather than regedit if you want to be able to set permissions on registry keys. (All obvious I know but when the pressure is on :-)

Posted by Mir Ghouse @ 18 Jul 2007 4:09 AM
Thank you Mr Josh "This Regmon solved my problem"

Posted by Mir Ghouse @ 18 Jul 2007 6:01 AM
I have an other problem now. when i deploy my websites on other server or even my own pc's vitual directory and open it in web browers it gives this error.

please help me

Compiler Error Message: BC30456: 'Title' is not a member of 'ASP.default_login_aspx'.

Posted by RAlladi @ 14 Aug 2007 1:52 PM
For me too, giving permission to ASPNET user on the HKCR\Interface\{70B51430-B6CA-11D0-B9B9-00A0C922E750} made it work. I found it with regmon following the suggestions here. Thanks a million! (This is on XP Pro SP2).

Posted by Travis @ 27 Aug 2007 3:09 PM
Delete 0 byte files in that Crypto RSA folder (as referenced earlier). Finally got past this error, onto something new.

FWIW, The machine was locked down pretty heavy before installing .NET 2.0. This was a Windows 2000 machine running .NET v1.1 for a very long time.

Posted by Sunny @ 05 Sep 2007 12:22 AM
Hey guys.. u wud just be amazed with my reason for this problem I faced. May be u'll feel i m dumbass. but i just wanted to share reason with you.
I created a directory under my app root. and i was getting this error on referencing that. i spent hours on reading posts. but at end what did i see you know? i had a virtual directory of that name referencing other computer.(on iis that virdir was showing error).

I think it was so stupid but this could be a reason

Posted by Bejarano @ 04 Oct 2007 7:52 AM
Jason Z,

After all tries my problem resolved with your indication, thanks a lot!!!!

Posted by Hasu @ 22 Oct 2007 9:17 AM
Thanks for this posting! it worked like a charm!

Posted by Gus @ 26 Oct 2007 7:01 AM
Holy crap, this actually worked! Thanks a ton!

Posted by Faudzia Adam @ 06 Nov 2007 11:12 AM
I would like to thank Weiping. Your suggestion of giving ASPNET full access to:

HKEY_CLASSES_ROOT\Interface\{70B51430-B6CA-11D0-B9B9-00A0C922E750}

also resolved my issue.

Regards,
Fojie

Posted by Maxine @ 21 Jan 2008 6:22 AM
hi all,

just wanted to add my 20 cents worth, i am using XP and have tried all of the suggestions above. although i am sure they all contributed, the one i thought wouldnt help at all (submitted by Rob Smith) was the winner....

thankyou! Legend!

Maxine

Posted by Ashul @ 22 Jan 2008 8:58 AM
HKEY_CLASSES_ROOT\Interface\{70B51430-B6CA-11D0-B9B9-00A0C922E750}

Resolved my issue. If anyone else wants to know:

The problem was on a Win XP SP2 PC with IIS running a webservice on a different port (not 80)

Legends :)
Ashul

Posted by Dan @ 14 Feb 2008 5:41 PM
My goodness! I have tried every trick that has been laid out in this thread...and nothing worked.

But fear not! I fixed it. The automated setup places a virtual directory with a site that I created. I ended up going into the site and setting the home directory there and eliminating the virtual.

Worked like a charm!

Posted by karthikeyan @ 23 Feb 2008 2:22 AM
dai thambi open avala da.. dai

Posted by Mauricio Gonzalez @ 26 Feb 2008 4:38 PM
Great, my application has this problem. Now this work excelent.... thank's

Posted by Mauricio Gonzalez @ 26 Feb 2008 4:38 PM
Great, my application has this problem. Now this work excelent.... thank's

Posted by Craig Bruce @ 02 Apr 2008 4:30 PM
if you are using Vista and have this problem, RUN VS 2005/2008 AS ADMINISTRATOR and it will work.

Posted by Oscar @ 24 Apr 2008 3:59 PM
Hello, thank you very much for your post, after running regmon I found out the same access problem problem to the HKCR Interface CLSID , double clicked on that record, assigned the ASPNET user the permits and magically the site worked.

thanks a lot

Posted by Matt @ 23 Jun 2008 8:41 PM
Hi All,

Giving a permission to this folder works for me:
'C:\Documents and Settings\All Users.WINNT\Application Data\Microsoft\Crypto\RSA\MachineKeys'

Can anyone explain what is relation of this folder and the error "Failed to map the path '/YourApplication/App_GlobalResources'."?

Posted by karlo @ 25 Jun 2008 11:51 AM
hello, I speak english a little, wherever, I had the same error for a week more than less, I resolve the problem with the solution form marcemarc, editing permissions in the regedit, but I have a question, why happened it? if any can resolve mi question please writeme , mi mail is f_raptor(arroba)hotmail.com, thanks

Posted by Shigeki @ 17 Jul 2008 9:18 PM
I want to know too...

What is relation of this folder and the error "Failed to map the path '/YourApplication/App_GlobalResources'."?

Because i facing this problem too..

Could i said "Failed to map the path '/YourApplication/App_GlobalResources'." is a security issue?

Posted by Alan McBee @ 02 Aug 2008 1:22 PM
The most useful answer for me was in the comment left by Jason Z @ 12 Mar 2007 5:58 AM.

This is not the first time I had a zero-byte file in the C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys folder, but I had forgotten to check for those again.

Posted by Anwaar @ 03 Sep 2008 12:30 AM
Thanks. Newbie Totka. I simply made ASPNET user member of Administrators .. and restarted IIS :-). It worked..

Posted by Mitch B @ 28 Jan 2009 9:55 AM
I cannot get this going for the life of me. Running on server 03 SP1. I have remade user, basically tried everything listed (including permissions). Regmon is showing a lot of 'NOT FOUND'. Anyone have some tips?

Posted by ISGIAdam @ 09 Feb 2009 10:44 AM
I also have SP3 and have tried everything above and nothing is working. I am seeing a lot of 'NOT FOUND' entries too. Any ideas?

Posted by Miel Hostens @ 06 Jun 2009 8:11 AM
I used next code
Server.MapPath("/App_Data/***.mdb")
Got the same error as above, tried everything, nothing worked,
Until...
Server.MapPath("App_Data/***.mdb"), removed one / and this did it

Posted by casino de jeux online @ 20 Jan 2010 4:45 AM
ASP.NET is a technology for creating dynamic Web applications. ASP.NET pages (Web Forms) are compiled and allow you to build powerful forms-based Web pages. When building these pages, you can use ASP.NET user controls to create common UI elements and program them for common tasks.

Posted by Tom @ 28 Jan 2010 2:13 PM
I added ASPNET as Full Control on that MachineKeys directory, gave ASPNET Full Control to the registry key HKCR\Interfaces\{70B51430-B6CA-11D0-B9B9-00A0C922E750}, even put ASPNET in the Administrators local group for this computer and still no luck - still has an exception ("Failed to map the path '/'.") when I debug my project on
string path = Server.MapPath{@"/");
.

Posted by Tom @ 28 Jan 2010 2:15 PM
I meant
string path = Server.MapPath(@"/");
was the line I was using.

Posted by Tom @ 28 Jan 2010 2:32 PM
Actually I solved it, with some help from http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_23608942.html#a22135706 if any of you have accounts there to access it. Basically it said to map the path this way:
string path = Server.MapPath("~");

instead of using a slash.

Whatever gets it done, I guess... This worked without having to add any ASPNET permissions - I took them away from the MachineKeys folder and registry key to avoid having to explain it to the security folks... especially since it didn't need it in the end, anyway.

-Tom

Posted by guest @ 02 Mar 2010 10:16 AM
I applied solution described by Jason Z.

In the folder --> C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys
... I found a key that was 0 KBytes, (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

I simply deleted it (which is then recreated when accessing the website), AND IT WORKED!!!

As I mentioned, I tried all of the other suggested solutions above, so the ultimate solution may be a combination of the above solutions as well as deleting the key that has 0 KBytes.


© 2005 - 2014 Josh Twist - All Rights Reserved.