473,398 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Satellite assembly resources won't load if identity impersonate=true

Hi there,

I am having a very odd problem with localization. I have a web app with 2 embedded resources files - 1 neutral .resx file and 1 for fr-CA. With <identity impersonate="true" /> the resources from the french assembly do not load and it defaults to the neutral resources. If I comment out the <identity ... /> line they work fine. I have given EVERYBODY full control to the entire directory structure.

I am using the following lines of code to set the culture on the thread in global.asax.cs (for testing purposes)

protected void Application_BeginRequest(Object sender, EventArgs e)
{
string lang = Request.QueryString["lang"];
string culture = "en-US";

if(lang != null)
{
switch(lang.ToLower())
{
case "f":
culture = "fr-CA";
break;
default:
culture = "en-US";
break;
}
}
CultureInfo c = new CultureInfo(culture);
System.Threading.Thread.CurrentThread.CurrentCultu re = c;
System.Threading.Thread.CurrentThread.CurrentUICul ture = c;
}

And to load up the resources I am using:
ResourceManager rm = new ResourceManager("Spc.Websites.Static.Resource", Assembly.GetExecutingAssembly());
Literal1.Text = rm.GetString("display");
Any help would be greatly apprecaited!

-Steven
Nov 19 '05 #1
3 1544
Hi Steven,

Welcome to ASP.NET newsgroup.
As for the problem you mentioned, I think you're encountering a common
issue on asp.net's runtime assembly shadow copy. ASP.NET will shadow copy
all the private assemblies deployed in bin folder to the temporary asp.net
folder so that rutnime won't lock the orginal deployed ones. However, when
we using impersonate, the impersonated user account may haven't the
sufficient permission to create/modify file in the ASP.NET's temporary
folder, then the satellite one will be failed to copy to temporary dir.
So currently I suggest you first try using the filemon tool to monitor the
file/folder accessing status when running your asp.net app to confirm this
problem. And then adjust the proper permission for your impersonated
account according to the monitor result.

If there're anything unclear, please feel free to post here. Thanks,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #2
Steven,

This indeed was the issue. Thank you for your help!

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:kr**************@TK2MSFTNGXA01.phx.gbl...
Hi Steven,

Welcome to ASP.NET newsgroup.
As for the problem you mentioned, I think you're encountering a common
issue on asp.net's runtime assembly shadow copy. ASP.NET will shadow copy
all the private assemblies deployed in bin folder to the temporary asp.net
folder so that rutnime won't lock the orginal deployed ones. However,
when
we using impersonate, the impersonated user account may haven't the
sufficient permission to create/modify file in the ASP.NET's temporary
folder, then the satellite one will be failed to copy to temporary dir.
So currently I suggest you first try using the filemon tool to monitor the
file/folder accessing status when running your asp.net app to confirm this
problem. And then adjust the proper permission for your impersonated
account according to the monitor result.

If there're anything unclear, please feel free to post here. Thanks,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #3
You're welcome Steven :-)
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kevin B. Campisi | last post by:
Hi There, I'm really stuck on this one and any help would be GREATLY appreciated. I've got an ASP.net application, that initially, gives me the following error: Login failed for user...
1
by: Stan | last post by:
I get this error when I try to access any page on the website: An error occurred while try to load the string resources (GetModuleHandle failed with error 126). At the same time here is what I...
3
by: Kathy Burke | last post by:
Hi. Totally lost on this one (ok, I admit I'm USUALLY lost!). All works fine in dev environment (P4, localhost server IIS, XP Pro) Asp.net and .Net 1.1 In order to access doc files needed for...
8
by: Razak | last post by:
Hi, I have a class which basically do Impersonation in my web application. From MS KB sample:- ++++++++++++++++++++code starts Dim impersonationContext As...
2
by: franzhe | last post by:
Hi all, in a simple ASP.Net application with resources in satellite assemblies I have the following problem: If I set <identity impersonate="true"/>, accessing a culture specific resource...
3
by: Raghuram | last post by:
Hi, What is the use of <Identity Impersonate="true" /> How can we implement this in an ASP.NET application When are we supposed to use this. please provide me the details with an Example....
0
by: Faris Ahmed | last post by:
Dear ASP newsgroup, I have the following environment: 1) VS2005 ASP.NET 2.0 WebApplication called MyApp. 2) MyApp contains Strings.resx, Strings.en.resx and Strings.de.resx in...
1
by: Neeraj | last post by:
Hi all. I have stuck at a strange point.in Database some master table have identity column and some havenot. Then How can i know at runtimes that which table have identity column. According to...
5
by: WT | last post by:
Hello, IIS6 on W2K3, .net 3.5, Sql 2005. All sp applied. My site is using windows authentication only and the web application connects to sql server residing on another server in the same...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.