Last post Jul 27, 2017 02:22 PM by albertlin
Jul 23, 2017 06:20 PM|AlbertLin|LINK
I publish web app and database to azure, and I can link my local to azure database. the web app is working on my local. but I run paxxxxxx.azurewebsites.net, I got the error:
The resource object with key 'Login' was not found.
<asp:MenuItem Value="Login" Text="<%$Resources:Resource.us,Login%>" NavigateUrl="~/Account/Login"></asp:MenuItem>
I open vs2013 and I can find the key in "Resource.us.resx" and "Resource.zh.resx" on "App_GlobalResources" folder.
I am not sure what is going on (the point is the web is working on my local when I link to azure database).
I can find some info on "app service editor":
in "bin", I can find "resources.dll" file in "zh" only, it means I miss "us" file?
thanks for any idea.
Jul 24, 2017 03:18 AM|JBetancourt|LINK
right-click properties on your resource file and change the "Build Action" to "Content" and see if that adds your resource to the bin folder
Jul 25, 2017 03:16 PM|Rohit Kukreti|LINK
Other than what JBetancourt mentioned, you will have to Set the .resx file to "Copy to Output Directory" to Copy always.
Jul 25, 2017 03:49 PM|AlbertLin|LINK
Thanks. I did both like you and
JBetancourt. the error is gone. but I got new error:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Resources.Resource.resources" was correctly embedded or linked into assembly "App_GlobalResources.thxpsmte" at compile time, or that all the satellite
assemblies required are loadable and fully signed.
Jul 27, 2017 02:22 PM|AlbertLin|LINK
finally the problem is fix.
what I did 4 steps:
1. set 2 resource files "content" and "copy if newer".
3, set 2 resource files "embedded"
4. publish again.