Hello,
I have installed the Globalization package on a "new" web application project simialr to your video demo and all worked fine. However when I try to integrate with an existing web application I am having issues with teh LocalizationAdmin page even running.
The page comes up primarily blank but there are a few strings displayed that make it look like the globalization library may not be being accessed.
Examples are:
{{::view.dbRes('LocalizationAdministration')}} in the title bar
and
{{view.error.message}} in the footer.
Pretty much everything else is blank.
I am using other javascript libraries in my web application but I would not think they are interfering wiht this page.
Any help would be greatly appreciated. I am guessing there is some simple thing that is conflicting.
In the Chrome Developer Tools I am getting the following error which I assume is the issue but I am not sure how to resolve. My guess is something is wrong with my project which is not allowing the resources to get compiled:
Failed to load: http://localhost:52803/JavaScriptResourceHandler.axd?ResourceSet=LocalizationForm&LocaleId=auto&VarName=resources&ResourceType=resdb&ResourceMode=1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Here is my web.config if that helps:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="CISConfigurator.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<section name="DbResourceConfiguration" requirePermission="false" type="System.Configuration.NameValueSectionHandler,System,Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<appSettings>
<!-- UAT -->
<add key="ConnectionString_core" value="server=XXX;initial catalog=XXX;password=XXX;Connect Timeout=3600; persist security info=True;user id=XXX;packet size=4096;max pool size=1000;" />
<add key="DynamicPDFLicenseKey" value="XXX" />
<add key="useSQL" value="true" />
<add key="GemBoxLicenseKey" value="XXX" />
</appSettings>
<connectionStrings />
<!--
For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.5" />
</system.Web>
-->
<system.web>
<httpRuntime executionTimeout="300" maxRequestLength="40000" />
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<namespaces>
<clear />
<add namespace="System" />
<add namespace="System.Collections" />
<add namespace="System.Collections.Generic" />
<add namespace="System.Collections.Specialized" />
<add namespace="System.Configuration" />
<add namespace="System.Text" />
<add namespace="System.Text.RegularExpressions" />
<add namespace="System.Web" />
<add namespace="System.Web.Caching" />
<add namespace="System.Web.SessionState" />
<add namespace="System.Web.Security" />
<add namespace="System.Web.Profile" />
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.WebControls" />
<add namespace="System.Web.UI.WebControls.WebParts" />
<add namespace="System.Web.UI.HtmlControls" />
<add namespace="Westwind.Utilities" />
<add namespace="Westwind.Web" />
<add namespace="Westwind.Globalization" />
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<globalization resourceProviderFactoryType="Westwind.Globalization.DbSimpleResourceProviderFactory,Westwind.Globalization.Web" />
<httpModules>
<add name="ScriptCompressionModule" type="Westwind.Web.ScriptCompressionModule,Westwind.Web" />
</httpModules>
<trust originUrl="(https://translate.googleapis.com/translate_a/single)|(https://www.googleapis.com/language/translate/v2)|(http://api.microsofttranslator.com/V2/Http.svc/Translate)|(https://datamarket.accesscontrol.windows.net/v2/OAuth2-13)" />
<httpHandlers>
<add verb="GET" path="JavaScriptResourceHandler.axd" type="Westwind.Globalization.JavaScriptResourceHandler,Westwind.Globalization.Web" />
</httpHandlers>
</system.web>
<applicationSettings>
XXXXXXX
</applicationSettings>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="ScriptCompressionModule" type="Westwind.Web.ScriptCompressionModule,Westwind.Web" />
</modules>
<handlers>
<add name="JavaScriptResourceHandler" verb="GET" path="JavascriptResourceHandler.axd" type="Westwind.Globalization.JavaScriptResourceHandler,Westwind.Globalization.Web" />
</handlers>
</system.webServer>
<DbResourceConfiguration>
<add key="ConnectionString" value="server=XXX;initial catalog=XXX;password=XXX;Connect Timeout=3600; persist security info=True;user id=XXX;packet size=4096;max pool size=1000;" />
<add key="ResourceTableName" value="Localizations" />
<add key="ResxExportProjectType" value="Project" />
<add key="StronglyTypedGlobalResource" value="/Properties/Resources.cs" />
<add key="ResourceBaseNamespace" value="CISConfigurator.Properties" />
<add key="ResxBaseFolder" value="/Properties/" />
<add key="AddMissingResources" value="False" />
<add key="LocalizationFormWebPath" value="/LocalizationAdmin/" />
<add key="BingClientId" value="" />
<add key="BingClientSecret" value="" />
<add key="ActiveConfiguration" value="" />
<add key="GoogleApiKey" value="" />
</DbResourceConfiguration>
</configuration>
I believe I have resolved my issues. I was trying to run the admin page off the VS Virtual Web Server outside of an administration context. it woudl not work. Running it within an administration context under teh debugger works. Also if I use my local IIS it now works as well.
Hi Ralph,
If you run into problems with the Localization admin page, the first place to check is check for JavaScript or HTTP errors using the F12 browser tools. The most likely source for errors is that the API content - the backend data - most likely is not being loaded.
As you found out, it's important that a few configuration pieces are in place to make this work - and that information is provided on the GitHub project home page. You do have to be running inside of an ASP.NET application context for this to work as the backend is an ASP.NET driven API. You can move things around, but you need to change the configuration settings to tell where the default location for the admin API lives.
Glad you figured it out.
+++ Rick ---