Hello,
No worries for the late response - I've been working on learning other aspects of ABP's module system.
I've not yet been able to resolve this - I'd appreciate any help you can offer!
Thanks!
As a quick addendum, this is the error logged through log4net:
System.Web.HttpException (0x80004005): The file '/FirstAspNetZero/Views/Announcements/Index.cshtml' does not exist.
at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)...
"FirstAspNetZero.Web" is the name of my test application, with the file located at "Announcements.Web/Views/Announcements", in a test module with the following Embedded resources configured in the module class:
[DependsOn(typeof(AnnouncementsApplicationModule), typeof(AbpWebApiModule), typeof(AbpWebMvcModule))]
public class AnnouncementsWebModule : AbpModule
{
public override void PreInitialize()
{
Configuration.EmbeddedResources.Sources.Add(
new EmbeddedResourceSet(
"/Views/",
Assembly.GetExecutingAssembly(),
"Announcements.Web.Views"
)
);
}
Ah, that's great!
Thank you both for looking into this, and again for the awesome framework. I'll definitely be upgrading to 2.x in the near future; thanks for the heads up!
Hello, and thanks for the response!
I combed through my project for the "abp.utils.setCookieValue" function, and saw that it gets called a few times to set the Tenant and Authorization cookies; I don't see it being called for changing the Culture, however. It looks like, instead, the cookie is only being set in the AbpLocalization controller when a call is made to "AbpLocalization/ChangeCulture" in the "_Header.cshtml" file, so what I've done is re-created a controller based on AbpLocalizationController whose "ChangeCulture" method specifies a Path as the request's ApplicationPath, in the same way the CurrentCultureSetter class does. This allows me to change cultures as desired, but I know it's pretty hacky, since it's basically just redefining a framework class for the sake of changing this Path setting. Do you have any suggestions on how else I might achieve this? Thanks again for the help!
Hello again,
I believe I've got a lead on why I'm receiving duplicated cookies for the current culture, but I'm not sure where to go from here.
While looking over the source code on Github for the Abp.Web & Abp.Web.Mvc modules, I see 2 places that a 'CultureName' cookie is set - one in Abp.Web.Localization.CurrentCultureSetter, and the other in the AbpLocalizationController's ChangeCulture call inside Abp.Web.Mvc.
I think the issue I'm facing is due to the fact that the CurrentCultureSetter's method specifies "Path = [application path]", whereas the ChangeCulture call does not specify a path - but then again, if this is the issue, I don't understand how it was worknig for me previously.
I'd appreciate any input or guidance on this. In the meantime, thanks again, and good job on the clean framework!
Hello,
Are there any updates on this? I'm circling back to the issue every few days to see if I can approach it another way, but I'm still stuck with duplicating cookies. Any help would be greatly appreciated!
My apologies - I'm using ASP.NET Zero configured for MPA when running into this issue.
Separately, I've tried installing the base MVC 5.X w/jQuery to see if I could replicate the issue, and in that project, I also see duplicate culture cookies after trying to switch languages unsuccessfully.
Hello!
No, currently we're using the MVC w/ JQuery setup.
Perfect; thank you for your help!
Hello,
I am working on the same team as @cjannel. Thank you for your responses; they're insightful and really helping me grasp the larger picture.
To follow up your earlier question, we are currently posting the form info through the app service; we would like to add attributes to the Dto definitions in the application layer. So, the questions would be, a: is it feasible to define a custom attribute to use on the Dtos, (which in addition to being based on ComponentModel.DataAnnotations.ValidationAttribute, implements System.Web.Mvc.IClientValidatable to provide the metadata required for our unobtrusive jQuery to work)?; and b: where should the annotation be defined in the project?
Thanks again in advance!