..NET 3.5
I have a Windows Service application and it does remoting,
but when a client incounters an error the client get the following error
message
"Server encountered an internal error. For more information, turn off
customErrors in the server's .config file."
Where do I turn this off
I have found the following statement but where do I put this statement,
client? server ? I have tried both but still getting the same error message
RemotingConfigu ration.CustomEr rorsMode
Thank You
Peter
Jun 27 '08
14 5624
"Peter" <cz****@nospam. nospamwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
RemotingConfigu ration.CustomEr rorsMode = CustomErrorsMod es.Off;
or
RemotingConfigu ration.Configur e("ReportsServe r.exe.config");
does not make any difference.
the client still is getting
"Server encountered an internal error. For more information, turn off
customErrors in the server's .config file."
I have tried to compile in Debug and Release and it did not make any
difference.
I know for a fact that the lines below get executed because I set the port
number in the same method.
RemotingConfigu ration.CustomEr rorsMode = CustomErrorsMod es.Off;
or
RemotingConfigu ration.Configur e("ReportsServe r.exe.config");
"Steven Cheng [MSFT]" <st*****@online .microsoft.comw rote in message
news:EK******** ******@TK2MSFTN GHUB02.phx.gbl. ..
>Hi Peter,
Based on the code snippet you provided, you have used the following code to set the CustomErrorMode on server:
RemotingConfig uration.CustomE rrorsMode = CustomErrorsMod es.Off;
Didn't it work?
Based on my understanding, there are two means to set Custom Error mode for remoting service:
1. Programmaticall y set it via code, just like the code you provided, you can set RemotingConfigu ration.CustomEr rorsMode at initialization time.
2. You can also use configuration file to set the custom error mode. e.g.
========== <system.runtim e.remoting> <customErrors mode="Off" /> .. ==========
However, you need to make sure you've called the following method so as to tell the remoting runtime to load configuration from the app.config file:
============ = static void Init() { Console.WriteLi ne("Init....... ............... .....");
//here SimpleRemotingS ln.ServerApp.ex e is my server appliation's exe file name.
RemotingConfig uration.Configu re("SimpleRemot ingSln.ServerAp p.exe.config"); ........ ============
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: ms****@microsof t.com.
============== =============== =============== ====== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications.
============== =============== =============== ====== This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>>>From: "Peter" <cz****@nospam. nospam> References : <Oo************ **@TK2MSFTNGP04 .phx.gbl>
<00*********** *************** ********@x41g20 00hsb.googlegro ups.com> <#0*********** ***@TK2MSFTNGP0 6.phx.gbl> <Oy*********** **@TK2MSFTNGP02 .phx.gbl> <O7*********** ***@TK2MSFTNGP0 5.phx.gbl> <uh*********** ***@TK2MSFTNGP0 5.phx.gbl>
>>>Subject: Re: Windows Service config file Date: Tue, 22 Apr 2008 21:12:36 -0500
Here's the error message on the client sided
"Server encountered an internal error. For more information, turn off customErro rs in the server's .config file."
Here's the conde on the Server side.
namespace ReportsService { public partial class ReportService : ServiceBase { private TcpChannel _objChannel = null;
private const int INT_DEFAULT_POR T = 8000; private const string STR_DEFAULT_NAM E = "ReportsServer. tcp";
public ReportService() { InitializeCompo nent(); }
protected override void OnStart(string[] args) { RemotingConfigu ration.CustomEr rorsMode = CustomErrorsM odes.Off; // Create the TcpChannel this._objChanne l = new TcpChannel(INT_ DEFAULT_PORT); ChannelServices .RegisterChanne l(this._objChan nel, false);
// Register the Proxy class for remoting. RemotingConfigu ration.Register WellKnownServic eType( typeof(Report), STR_DEFAULT_NAM E, WellKnownObject Mode.Singleton) ;
}
protected override void OnStop() { ChannelServices .UnregisterChan nel(this._objCh annel); } } }
"Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message news:uh***** *********@TK2MS FTNGP05.phx.gbl ... "Peter" <cz****@nospam. nospamwrote in message news:O7***** *********@TK2MS FTNGP05.phx.gbl ... >I am using a Windows service with remoting > and I have tried both app.config file - where app = application name.exe and I have tried RemotingConfigu ration.CustomEr rorsEnabled on the
client
>>>>side and still getting the same error on the client. > My application name is ReportsService. exe and the config file is ReportsService. exe.config >
But this doesn't answer the question whether you are using a Config file or whether you are explicitly configuring the services and channels in code. I would love to see the code that initializes the server side of your remoting service. Also, what's the exact error message received by the client when _the_ error occurs?
Willy.
What is the value returned by CustomErrorsEna bled when called after the
after setting the CustomErrorsMod e to Off?
....
RemotingConfigu ration.CustomEr rorsMode = CustomErrorsMod es.Off;
bool customErrors = RemotingConfigu ration.CustomEr rorsEnabled(fal se);
// customErrors should be 'false', remote callers should get full exception
info including stack trace.....
....
Willy.
"Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
"Peter" <cz****@nospam. nospamwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>RemotingConfig uration.CustomE rrorsMode = CustomErrorsMod es.Off; or RemotingConfig uration.Configu re("ReportsServ er.exe.config") ;
does not make any difference. the client still is getting "Server encountered an internal error. For more information, turn off customErrors in the server's .config file."
I have tried to compile in Debug and Release and it did not make any difference.
I know for a fact that the lines below get executed because I set the port number in the same method.
RemotingConfig uration.CustomE rrorsMode = CustomErrorsMod es.Off; or RemotingConfig uration.Configu re("ReportsServ er.exe.config") ;
"Steven Cheng [MSFT]" <st*****@online .microsoft.comw rote in message news:EK******* *******@TK2MSFT NGHUB02.phx.gbl ...
>>Hi Peter,
Based on the code snippet you provided, you have used the following code to set the CustomErrorMode on server:
RemotingConfi guration.Custom ErrorsMode = CustomErrorsMod es.Off;
Didn't it work?
Based on my understanding, there are two means to set Custom Error mode for remoting service:
1. Programmaticall y set it via code, just like the code you provided, you can set RemotingConfigu ration.CustomEr rorsMode at initialization time.
2. You can also use configuration file to set the custom error mode. e.g.
========== <system.runti me.remoting> <customErrors mode="Off" /> .. ==========
However, you need to make sure you've called the following method so as to tell the remoting runtime to load configuration from the app.config file:
=========== == static void Init() { Console.WriteLi ne("Init....... ............... .....");
//here SimpleRemotingS ln.ServerApp.ex e is my server appliation's exe file name.
RemotingConfi guration.Config ure("SimpleRemo tingSln.ServerA pp.exe.config") ; ........ =========== =
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: ms****@microsof t.com.
============= =============== =============== ======= Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications.
============= =============== =============== ======= This posting is provided "AS IS" with no warranties, and confers no rights.
-------------------- From: "Peter" <cz****@nospam. nospam> Reference s: <Oo************ **@TK2MSFTNGP04 .phx.gbl> <00********** *************** *********@x41g2 000hsb.googlegr oups.com> <#0********** ****@TK2MSFTNGP 06.phx.gbl> <Oy********** ***@TK2MSFTNGP0 2.phx.gbl> <O7********** ****@TK2MSFTNGP 05.phx.gbl> <uh********** ****@TK2MSFTNGP 05.phx.gbl> Subject: Re: Windows Service config file Date: Tue, 22 Apr 2008 21:12:36 -0500
Here's the error message on the client sided
"Server encountered an internal error. For more information, turn off customError s in the server's .config file."
Here's the conde on the Server side.
namespace ReportsService { public partial class ReportService : ServiceBase { private TcpChannel _objChannel = null;
private const int INT_DEFAULT_POR T = 8000; private const string STR_DEFAULT_NAM E = "ReportsServer. tcp";
public ReportService() { InitializeCompo nent(); }
protected override void OnStart(string[] args) { RemotingConfigu ration.CustomEr rorsMode = CustomErrors Modes.Off; // Create the TcpChannel this._objChanne l = new TcpChannel(INT_ DEFAULT_PORT); ChannelServices .RegisterChanne l(this._objChan nel, false);
// Register the Proxy class for remoting. RemotingConfigu ration.Register WellKnownServic eType( typeof(Report), STR_DEFAULT_NAM E, WellKnownObject Mode.Singleton) ;
}
protected override void OnStop() { ChannelServices .UnregisterChan nel(this._objCh annel); } } }
"Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message news:uh**** **********@TK2M SFTNGP05.phx.gb l... "Peter" <cz****@nospam. nospamwrote in message news:O7**** **********@TK2M SFTNGP05.phx.gb l... >>I am using a Windows service with remoting >> >and I have tried both app.config file - where app = >applicatio nname.exe >and I have tried RemotingConfigu ration.CustomEr rorsEnabled on the client >side and still getting the same error on the client. >> >My application name is ReportsService. exe >and the config file is ReportsService. exe.config >> > > But this doesn't answer the question whether you are using a Config file or whether you are explicitly configuring the services and channels in code. I would love to see the code that initializes the server side of your remoting service. Also, what's the exact error message received by the client when _the_ error occurs? > > Willy. >
What is the value returned by CustomErrorsEna bled when called after the
after setting the CustomErrorsMod e to Off?
...
RemotingConfigu ration.CustomEr rorsMode = CustomErrorsMod es.Off;
bool customErrors = RemotingConfigu ration.CustomEr rorsEnabled(fal se);
// customErrors should be 'false', remote callers should get full
exception info including stack trace.....
...
Willy.
When I execute the following on the client side the customErrors returns
false :
RemotingConfigu ration.CustomEr rorsMode = CustomErrorsMod es.Off;
bool customErrors = RemotingConfigu ration.CustomEr rorsEnabled(fal se);
"Peter" <cz****@nospam. nospamwrote in message
news:e0******** ******@TK2MSFTN GP04.phx.gbl...
>
"Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>"Peter" <cz****@nospam. nospamwrote in message news:%2******* *********@TK2MS FTNGP02.phx.gbl ...
>>RemotingConfi guration.Custom ErrorsMode = CustomErrorsMod es.Off; or RemotingConfi guration.Config ure("ReportsSer ver.exe.config" );
does not make any difference. the client still is getting "Server encountered an internal error. For more information, turn off customError s in the server's .config file."
I have tried to compile in Debug and Release and it did not make any difference.
I know for a fact that the lines below get executed because I set the port number in the same method.
RemotingConfi guration.Custom ErrorsMode = CustomErrorsMod es.Off; or RemotingConfi guration.Config ure("ReportsSer ver.exe.config" );
"Steven Cheng [MSFT]" <st*****@online .microsoft.comw rote in message news:EK****** ********@TK2MSF TNGHUB02.phx.gb l... Hi Peter,
Based on the code snippet you provided, you have used the following code to set the CustomErrorMode on server:
RemotingConf iguration.Custo mErrorsMode = CustomErrorsMod es.Off;
Didn't it work?
Based on my understanding, there are two means to set Custom Error mode for remoting service:
1. Programmaticall y set it via code, just like the code you provided, you can set RemotingConfigu ration.CustomEr rorsMode at initialization time.
2. You can also use configuration file to set the custom error mode. e.g.
========== <system.runt ime.remoting> <customErrors mode="Off" /> .. ==========
However, you need to make sure you've called the following method so as to tell the remoting runtime to load configuration from the app.config file:
============ = static void Init() { Console.WriteLi ne("Init....... ............... .....");
//here SimpleRemotingS ln.ServerApp.ex e is my server appliation's exe file name.
RemotingConf iguration.Confi gure("SimpleRem otingSln.Server App.exe.config" ); ........ ========== ==
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and suggestion s about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: ms****@microsof t.com.
============ =============== =============== ======== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications.
============ =============== =============== ======== This posting is provided "AS IS" with no warranties, and confers no rights.
-------------------- >From: "Peter" <cz****@nospam. nospam> >References : <Oo************ **@TK2MSFTNGP04 .phx.gbl> <00********* *************** **********@x41g 2000hsb.googleg roups.com> <#0********* *****@TK2MSFTNG P06.phx.gbl> <Oy********* ****@TK2MSFTNGP 02.phx.gbl> <O7********* *****@TK2MSFTNG P05.phx.gbl> <uh********* *****@TK2MSFTNG P05.phx.gbl> >Subject: Re: Windows Service config file >Date: Tue, 22 Apr 2008 21:12:36 -0500 > >Here's the error message on the client sided > >"Server encountered an internal error. For more information, turn off >customErro rs in the server's .config file." > >Here's the conde on the Server side. > >namespac e ReportsService >{ public partial class ReportService : ServiceBase { private TcpChannel _objChannel = null; > private const int INT_DEFAULT_POR T = 8000; private const string STR_DEFAULT_NAM E = "ReportsServer. tcp"; > public ReportService() { InitializeCompo nent(); } > protected override void OnStart(string[] args) { RemotingConfigu ration.CustomEr rorsMode = CustomError sModes.Off; // Create the TcpChannel this._objChanne l = new TcpChannel(INT_ DEFAULT_PORT); ChannelServices .RegisterChanne l(this._objChan nel, false); > // Register the Proxy class for remoting. RemotingConfigu ration.Register WellKnownServic eType( typeof(Report), STR_DEFAULT_NAM E, WellKnownObject Mode.Singleton) ; > } > protected override void OnStop() { ChannelServices .UnregisterChan nel(this._objCh annel); } } >} > >"Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message >news:uh*** ***********@TK2 MSFTNGP05.phx.g bl... >"Peter" <cz****@nospam. nospamwrote in message >news:O7*** ***********@TK2 MSFTNGP05.phx.g bl... >>>I am using a Windows service with remoting >>> >>and I have tried both app.config file - where app = >>applicati onname.exe >>and I have tried RemotingConfigu ration.CustomEr rorsEnabled on the client >>side and still getting the same error on the client. >>> >>My application name is ReportsService. exe >>and the config file is ReportsService. exe.config >>> >> >> >But this doesn't answer the question whether you are using a Config >file >or whether you are explicitly configuring the services and channels >in >code. I would love to see the code that initializes the server side >of >your remoting service. >Also, what's the exact error message received by the client when >_the_ >error occurs? >> >> >Willy. >> > > >
What is the value returned by CustomErrorsEna bled when called after the after setting the CustomErrorsMod e to Off?
... RemotingConfig uration.CustomE rrorsMode = CustomErrorsMod es.Off; bool customErrors = RemotingConfigu ration.CustomEr rorsEnabled(fal se); // customErrors should be 'false', remote callers should get full exception info including stack trace..... ...
Willy.
When I execute the following on the client side the customErrors returns
false :
RemotingConfigu ration.CustomEr rorsMode = CustomErrorsMod es.Off;
bool customErrors = RemotingConfigu ration.CustomEr rorsEnabled(fal se);
You need to execute this at the server side! It makes no sense to do this on
the client, it's the server that sends error information to the client when
an error occurs.
Willy.
"Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message
news:uA******** ******@TK2MSFTN GP04.phx.gbl...
"Peter" <cz****@nospam. nospamwrote in message
news:e0******** ******@TK2MSFTN GP04.phx.gbl...
>> "Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message news:%2******* *********@TK2MS FTNGP05.phx.gbl ...
>>"Peter" <cz****@nospam. nospamwrote in message news:%2****** **********@TK2M SFTNGP02.phx.gb l... RemotingConf iguration.Custo mErrorsMode = CustomErrorsMod es.Off; or RemotingConf iguration.Confi gure("ReportsSe rver.exe.config ");
does not make any difference. the client still is getting "Server encountered an internal error. For more information, turn off customErro rs in the server's .config file."
I have tried to compile in Debug and Release and it did not make any difference .
I know for a fact that the lines below get executed because I set the port number in the same method.
RemotingConf iguration.Custo mErrorsMode = CustomErrorsMod es.Off; or RemotingConf iguration.Confi gure("ReportsSe rver.exe.config ");
"Steven Cheng [MSFT]" <st*****@online .microsoft.comw rote in message news:EK***** *********@TK2MS FTNGHUB02.phx.g bl... Hi Peter, > Based on the code snippet you provided, you have used the following code to set the CustomErrorMode on server: > RemotingCon figuration.Cust omErrorsMode = CustomErrorsMod es.Off; > Didn't it work? > Based on my understanding, there are two means to set Custom Error mode for remoting service: > 1. Programmaticall y set it via code, just like the code you provided, you can set RemotingConfigu ration.CustomEr rorsMode at initialization time. > 2. You can also use configuration file to set the custom error mode. e.g. > ========= = <system.run time.remoting> <customErrors mode="Off" /> .. ========= = > However, you need to make sure you've called the following method so as to tell the remoting runtime to load configuration from the app.config file: > =========== == static void Init() { Console.WriteLi ne("Init....... ............... ....."); > //here SimpleRemotingS ln.ServerApp.ex e is my server appliation's exe file name. > > RemotingCon figuration.Conf igure("SimpleRe motingSln.Serve rApp.exe.config "); ........ =========== = > Sincerely , > Steven Cheng > Microsoft MSDN Online Support Lead > > Delightin g our customers is our #1 priority. We welcome your comments and suggestio ns about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: ms****@microsof t.com. > =========== =============== =============== ========= Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. > =========== =============== =============== ========= This posting is provided "AS IS" with no warranties, and confers no rights. > -------------------- >>From: "Peter" <cz****@nospam. nospam> >>Reference s: <Oo************ **@TK2MSFTNGP04 .phx.gbl> <00******** *************** ***********@x41 g2000hsb.google groups.com> <#0******** ******@TK2MSFTN GP06.phx.gbl> <Oy******** *****@TK2MSFTNG P02.phx.gbl> <O7******** ******@TK2MSFTN GP05.phx.gbl> <uh******** ******@TK2MSFTN GP05.phx.gbl> >>Subject : Re: Windows Service config file >>Date: Tue, 22 Apr 2008 21:12:36 -0500 >> >>Here's the error message on the client sided >> >>"Server encountered an internal error. For more information, turn off >>customErr ors in the server's .config file." >> >>Here's the conde on the Server side. >> >>namespa ce ReportsService >>{ > public partial class ReportService : ServiceBase > { > private TcpChannel _objChannel = null; >> > private const int INT_DEFAULT_POR T = 8000; > private const string STR_DEFAULT_NAM E = "ReportsServer. tcp"; >> > public ReportService() > { > InitializeCompo nent(); > } >> > protected override void OnStart(string[] args) > { > RemotingConfigu ration.CustomEr rorsMode = >CustomErro rsModes.Off; > // Create the TcpChannel > this._objChanne l = new TcpChannel(INT_ DEFAULT_PORT); > ChannelServices .RegisterChanne l(this._objChan nel, false); >> > // Register the Proxy class for remoting. > RemotingConfigu ration.Register WellKnownServic eType( > typeof(Report), > STR_DEFAULT_NAM E, > WellKnownObject Mode.Singleton) ; >> > } >> > protected override void OnStop() > { > ChannelServices .UnregisterChan nel(this._objCh annel); > } > } >>} >> >>"Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message >>news:uh** ************@TK 2MSFTNGP05.phx. gbl... >>"Peter" <cz****@nospam. nospamwrote in message >>news:O7** ************@TK 2MSFTNGP05.phx. gbl... >>>>I am using a Windows service with remoting >>>> >>>and I have tried both app.config file - where app = >>>applicat ionname.exe >>>and I have tried RemotingConfigu ration.CustomEr rorsEnabled on the client >>>side and still getting the same error on the client. >>>> >>>My application name is ReportsService. exe >>>and the config file is ReportsService. exe.config >>>> >>> >>> >>But this doesn't answer the question whether you are using a Config >>file >>or whether you are explicitly configuring the services and channels >>in >>code. I would love to see the code that initializes the server side >>of >>your remoting service. >>Also, what's the exact error message received by the client when >>_the_ >>error occurs? >>> >>> >>Willy. >>> >> >> >> >
What is the value returned by CustomErrorsEna bled when called after the after setting the CustomErrorsMod e to Off?
... RemotingConfi guration.Custom ErrorsMode = CustomErrorsMod es.Off; bool customErrors = RemotingConfigu ration.CustomEr rorsEnabled(fal se); // customErrors should be 'false', remote callers should get full exception info including stack trace..... ...
Willy. When I execute the following on the client side the customErrors returns false :
RemotingConfig uration.CustomE rrorsMode = CustomErrorsMod es.Off; bool customErrors = RemotingConfigu ration.CustomEr rorsEnabled(fal se);
You need to execute this at the server side! It makes no sense to do this
on the client, it's the server that sends error information to the client
when an error occurs.
Willy.
Thank You
executing bool customErrors =
RemotingConfigu ration.CustomEr rorsEnabled(fal se);
on the server side did the trick.
Hi Peter,
Yes, as Willy mentioned, generally the CustomErrorMode means the Mode on
server-side because that controls whether the detailed error info will be
output to client-side. Therefore, now your remoting application's custom
error should has been turned off and the exception info is the full info
come from server-side.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at: ms****@microsof t.com.
=============== =============== =============== =====
Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Peter" <cz****@nospam. nospam> References: <Oo************ **@TK2MSFTNGP04 .phx.gbl>
<00************ *************** *******@x41g200 0hsb.googlegrou ps.com>
<#0h#<e0******* *******@TK2MSFT NGP04.phx.gbl>
<uA************ **@TK2MSFTNGP04 .phx.gbl>
>Subject: Re: Windows Service config file Date: Wed, 23 Apr 2008 14:53:36 -0500
>
"Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message news:uA******* *******@TK2MSFT NGP04.phx.gbl.. .
>"Peter" <cz****@nospam. nospamwrote in message news:e0******* *******@TK2MSFT NGP04.phx.gbl.. .
>>> "Willy Denoyette [MVP]" <wi************ *@telenet.bewro te in message news:%2****** **********@TK2M SFTNGP05.phx.gb l... "Peter" <cz****@nospam. nospamwrote in message news:%2***** ***********@TK2 MSFTNGP02.phx.g bl... RemotingCon figuration.Cust omErrorsMode = CustomErrorsMod es.Off; or RemotingCon figuration.Conf igure("ReportsS erver.exe.confi g"); > does not make any difference. the client still is getting "Server encountered an internal error. For more information, turn off customError s in the server's .config file." > > I have tried to compile in Debug and Release and it did not make any differenc e. > I know for a fact that the lines below get executed because I set the port number in the same method. > RemotingCon figuration.Cust omErrorsMode = CustomErrorsMod es.Off; or RemotingCon figuration.Conf igure("ReportsS erver.exe.confi g"); > > "Steven Cheng [MSFT]" <st*****@online .microsoft.comw rote in message news:EK**** **********@TK2M SFTNGHUB02.phx. gbl... >Hi Peter, >> >Based on the code snippet you provided, you have used the following >code >to set the CustomErrorMode on server: >> >RemotingCo nfiguration.Cus tomErrorsMode = CustomErrorsMod es.Off; >> >Didn't it work? >> >Based on my understanding, there are two means to set Custom Error >mode for >remoting service: >> >1. Programmaticall y set it via code, just like the code you
provided,
>>>>>you >can set RemotingConfigu ration.CustomEr rorsMode at initialization
time.
>>>>>> >2. You can also use configuration file to set the custom error mode. >e.g. >> >======== == ><system.ru ntime.remoting> > <customErrors mode="Off" /> >.. >======== == >> >However, you need to make sure you've called the following method so >as to >tell the remoting runtime to load configuration from the app.config >file: >> >========== === > static void Init() > { > Console.WriteLi ne("Init....... ............... ....."); >> >//here SimpleRemotingS ln.ServerApp.ex e is my server appliation's exe >file >name. >> >> >>
RemotingConfigu ration.Configur e("SimpleRemoti ngSln.ServerApp .exe.config");
>>>>>........ >========== == >> >S
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: |
last post by:
Hi,
I have a Windows Service that uses a referenced dotnet-dll.
In my dll I set some public string to a stringvalue that I
get from reading a xml-file(my config file). It works fine
if I use it in a vb-form. But since Windows Services ?
executes? in windows\system32 I can´t locate my xml-config-
file.
I don´t want to set different "compiling-statements" such
as :
|
by: Vlad |
last post by:
Is there any way to install multiple instances of the same windows service
designed with VS.NET 2003? I tried copying the binaries into a separate
folder and then copying registry entries for the original service under a
new name but the SCM complains that the executable does not have this
service implemented.
Please note that I need to have distinct instances of executables installed
not merely multiple windows services defined within...
|
by: TomB |
last post by:
I've written a simple service that reads the app.config file on start.
It works fine if I start it from the VS IDE -- F5 then installutil
I then created a package, wherein the content of app.config has "" for the
values. With the idea that my user, can enter the information before
starting the service. However; this doesn't work. I'm very confused.
As a test, I "emptied" the app.config file and rebuilt, then did an
installutil. ...
|
by: Bill |
last post by:
I've created a windows service in C#, but I'm having trouble reading
<appSettings> from a app.config file.
I can read <appSettings> just fine from a normal C# windows app, so there
must be some trick to read this file from a windows service, yes? perhaps
the location of the .config file?
any help is appreciated...
-bill
|
by: Trevor |
last post by:
Argh! This problem is driving me nuts! Can you help?
In November of 2003, I installed a web service on Windows Server 2003 built
in VB.NET for v1.1.4322 of the framework. It contains a timer
(System.Timers.Timer) which has an interval of 24 hours. Actually, it reads
a time like 2AM out of the config file, and calculates the time between the
start of the service to 2AM, and sets the timer. When the timer expires, it
re-reads the...
| |
by: PeterW |
last post by:
I have a Windows service that needs to get some values from a config file. I
place the config file for the service in the System32 directory. I do not
get the values using the usual ConfigurationSettings.AppSettings
Any tips please
cheers
--
PeterW
|
by: noah.blumenthal |
last post by:
I wrote a windows service in c# (applause) and now I want to
add the ability to edit its settings. Basically this service checks an
email account at certain intervals and forwards the emails to another
email address. I want to be able to configure how often it runs (it
uses a timer, so setting the interval for that timer is what I mean by
that statement) and what account to check and what email address to
send to.
Seems easy, right? ...
|
by: =?Utf-8?B?U2ltb25EZXY=?= |
last post by:
Hi All
I would like to install the same Windows Service project on the same server
under different names, one for each customer. I have been able to do it but
I would like an expert opinion as to whether my solution is robust or whether
there is a better way to do it.
What I've been trying to do is to create a core project with different
extension projects, one for each customer. I wanted to create a different
Setup project for each...
|
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= |
last post by:
Hi,
I created a web service that I want to host in windows service. The
problem is that if I host it as windows service it does not use the
configuration file. I have to define the binding, endpoint etc.
programmatically in the Program.cs file.
Any idea what I might be doing wrong?
Cheers,
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |