Closed citybear01 closed 9 years ago
I also discovered that when I went to the Designer page within my Visual Studio 2013 tab, I was getting these errors as well:
This library requires .NET 4.5. I think you may be running .NET 4.0 and so the assembly either wasn't added to your project or if it was it's not usable because it's the wrong version.
I am using .NET 4.5.1:
Oh I see the problem. Old project upgraded from 1.x yes?
The assembly for the resourceProviderFactory is Westwind.Globalization.Web
. Change in the configuration setting.
This was a brand new project built initially for 4.5.1. So, it was not an old project upgraded. I made those changes to the Web Config file and I get the same error:
Here is the Designer Page within VS 2013:
Here is the Source for the Designer Page (HTML):
Here is the revised WebConfig File:
As you can see I am still getting those errors in the Designer.
==> Note, I am able to bring up the page in FireFox <== ==> But I am NOT getting the Meta tags resolved <==
Here is a sample line from the HTML:
==>
Here is a screen of this definition using LocalizationAdmin: For lblAmountResource1, here is the entry:
It looks like the line that I tried to isolate for you did not come out the way I expected.
If you look at the HTML it is line 11 or this text:
"
The meta:resourcekey is this:
" meta:resourcekey="lblAmountResource1""
Looks like my attempt at posting the actual HTML failed again. So, here is a JPEG for that line:
I'm not sure...
Can you try this for a sanity check:
Then open the ResourceTest.aspx page. There are a couple of controls in that page. Do those show up correctly? They do for me.
One thing I see in your install is that the versions are not the latest. There was a bug in the previous release that caused issues with WebForms controls and that was fixed in the latest package. Westwind.Utilities should be V2.64. You can also try updating all the assemblies:
From the Package Manager Console:
Update-Package Westwind.Globalization.Web
I think this will update all the dependencies. If not at the very least update Westwind.Utilities as well - it should be 2.64 on the latest rev.
My guess is for some reason or other your various assembly versions are out of sync causing assembly load errors.
OK, did what you asked:
Created a new empty web project:
Here is the NuGet Console stuff:
I then tried ResourceTest.aspx and it worked fine.
Tomorrow, I will add my Master Page, Default Page, and remaining code.
And I will try again!
I will let you know.
One final question. Please keep in mind that I am newbie to Visual Studio and .NET. This is my first project and I was a IBM Mainframer up until April.
If I use a meta:resourcekey tag in the HTML, and I change cultures, do I have to explicitly in the code behind obtain the most current culture value for that resourcekey? I thought that when I am using the meta tag in the HTML, the code would take care of it. Do I have to put something inside the JavaScript as well?
No. meta:resourcekey will pick up the active culture.
You do have to enable culture tracking either in the globalization
tag in web.config, or using WebUtils.SetCulture() to force the culture to be switched based on browser locale.
How do I use WebUtils.SetCulture? Do I call this in the code behind? If so, can you give an example. If not, then where?
Also, how do I code it in the Web.Config.
Please be kind...this is my first project and need a lot of help here.
I have an existing WebForm application that uses meta:xxxxx tags in the HTML. So, I followed the instructions you listed in the section labeled "Using the ASP.NET Resource Provider". Now I am getting an error when I start up the application. Below are pictures of the Error screen that appears when the application starts up and the second is a "listing" of my Web Config file
Web Config file: