It depends on type of web application, but in general you can set the 
environment for your process.

Uses Environment.SetEnvironmentVariable to set the NLS_LANG on beginning of 
your application.

You can put the call on Application_Start of Global.asax.cs if your 
application is using Web Forms (or old MVC).

If your application is using ASP.NET WebApi, you can put the call on 
Startup.Configuration method.

On ASP.NET Core you can put the call on Program.Main, before run the host.

On Tuesday, March 27, 2018 at 12:08:34 PM UTC-3, Felipe Oriani wrote:
>
> Hey guys,
>
> We have an application using NHibernate with Oracle 11g and configured to 
> use the Oracle Managed DataAccess provider. It works fine in a lot fo 
> environtments, but in a single enrivonment, we are having problems with 
> NLS_LANG configuration and every query that extract information from 
> database comes with special chars like ã á ç õ and etc.
>
> I know we can define NSL_LANG on the System Environment Variables on the 
> Windows but it affect other applications that are running on the same 
> server. 
>
> I would like to know if is there any way to define NLS_LANG on the 
> application layer or the IIS, or on the NHibernate configuration 
> (hibernate.cfg.xml) ?
>
> Thank you
>
>
> -- 
> ______________________________________
> Felipe B Oriani
> [email protected] <javascript:>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to