Dear all,
I've developed some modules but all are giving errors in the DNN 05.01.04 (3) installation. First they didn't localize so i found the following work arounds:
override void OnInit(EventArgs e)
{ base.OnInit(e);
string FileName = Path.GetFileNameWithoutExtension(this.AppRelativeVirtualPath); if (this.ID != null)
//this will fix it when its placed as a ChildUserControl
this.LocalResourceFile = this.LocalResourceFile.Replace(this.ID, FileName + ".ascx.resx"); else
// this will fix it when its dynamically loaded using LoadControl method
this.LocalResourceFile = this.LocalResourceFile + FileName + ".ascx.resx";
OR:
override void OnLoad(EventArgs e)
{try
{ Version ver = System.Reflection.Assembly.GetAssembly(typeof(Globals)).GetName().Version; if (ver.Major == 5)
{ if(File.Exists(this.LocalResourceFile))
this.LocalResourceFile = HostingEnvironment.MapPath(Localization.GetResourceFile(this, this.GetType().BaseType.Name + ".ascx")) + ".resx"; else
this.LocalResourceFile = Localization.GetResourceFile(this, this.GetType().BaseType.Name + ".ascx"); base.OnLoad(e);
catch (Exception ex)
{
Response.Write(ex.Message);
Both work arounds work and make the localization work but putting the sitelog full with errors like:
AssemblyVersion: 5.1.4
PortalID: 0
PortalName: Recruit A Student
UserID: 1
UserName: host
ActiveTabID: 114
ActiveTabName: Applicant
RawURL: /DCJobBoard/Applicant/tabid/114/Mode/Login/Default.aspx
AbsoluteURL: /dcjobboard/Default.aspx
AbsoluteURLReferrer: http://localhost/DCJobBoard/Applicant.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 4bbeb87c-6103-4b5e-8f4e-0fc2788ae9c4
InnerException: '/dcjobboardd:\instances\dcjobboard\desktopmodules\dcjobboard\applicant\app_localresources\sharedresources.nl-nl.host.resx' is not a valid virtual path.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.VirtualPath.Create
StackTrace:
Message: System.Web.HttpException: '/dcjobboardd:\instances\dcjobboard\desktopmodules\dcjobboard\applicant\app_localresources\sharedresources.nl-nl.host.resx' is not a valid virtual path. at System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) at System.Web.Hosting.HostingEnvironment.MapPath(String virtualPath) at DotNetNuke.Services.Localization.Localization.GetResourceFileCallBack(CacheItemArgs cacheItemArgs) at DotNetNuke.Common.Utilities.DataCache.GetCachedData[TObject](CacheItemArgs cacheItemArgs, CacheItemExpiredCallback cacheItemExpired)
Source:
Server Name: DCWS022
Can anyone help me as it is slowing down the instance and make the log verry messy.
Thanks.
Christiaan
protected
{
{
{
}
protected
protected
}
}
}
}