how to get server name in timer.

how to get server name in timer.

  
hi,

can anybady tell me how to get server  name in timer.

Regards,
sattibabu vatti.
Hi there,

You can use the function existing in the RichWidgets eSpace called GetServerName()
It makes what you want?

Best Reggards,
NM
hi,

 actually my  problum is i am working on E mail. every where the server name is visible and captured. but remainder mail,  i use through  timer. at the time of remainder send to the employee it is not showing the srver  name in link. can u tell me where i did the wrong?

Regards,
sattibabu vatti.
I don't know If I understand clearly what is your problem.

You have an email that you send to a employee for example:

Hi Employee,

Please click here to go to the page.

Reggards,
Support


Where here is a link to a page?

Best Reggards,
NM
hi,
actually i send mail like below.

Hi Employee,

Please click here to go to the page.
or
please copy and paste the below URL
URL..link

Reggards,
Support
.


URL link i need to display total link of the page.


Regards,
sattibabu vatti.
Ok,
I understand now. What are you using to construct the URL an expression?

You can use an expression with something like. "http://" +GetServerName() + "/eSpaceName/EntryPoint.aspx"

This makes what you want?

Best Reggards,
NM
Hi,

If I remember correctly GetServerName() will give the server name based on the request. That mostly likely won't work on an Timer or Emails.

If using the Email screens of the platform you can set your Hostname in Service Center "Envirnment Configuration" screen.
The generated links in emails will have the server name replaced with that automatically.

That way you can use simple destinations to screens (out of the box), instead of trying to construct complicated external url's with the correct names.


Regards,
João Rosado
hi ,

 i did the above thing ,but i have small  problum.

when the user gets an email. it is showing empty in the server place  in Email. like  "http:///" + "/eSpaceName/EntryPoint.aspx".

please help me.

Regards,
sattibabu vatti.
Hi,

I didn't now that you can do it like João says.
But you tried João solution right? The one that I mention seems to not work. Another solution is to store the server address in a Site Property, It is not the prettier solution since any time you change from environments you have to be careful to change that site property.

Regards,
NM
Hi Nuno,
Please give me more inputs regarding  set your Hostname in Service Center "Envirnment Configuration" screen.

Sunil Mane
hi ,

when i use "http://" +GetServerName() + "/eSpaceName/EntryPoint.aspx"  for get the server name it is showing "127.0.0.1" as a server name. can anybady tell me where i did the mistake.

Regards,
sattibabu vatti.
GetServerName is returning an empty string for me as well
Hello,

Why don't you put the servername in a site property? Is the servername going to change much?

Kind regards,
Evert


Hi all,

I don't get why still trying to solve the initial problem with GetServerName() .
Like I said before, it will not work in Emails and Timers.

If it is needed in a Timer logic, then like others sugested a Site Property is a possible solution.
If its for an Email Screen, then just leave use normal destinations, instead of "hardcoded" external url's. Url's in emails will be correctly rendered with the value set in the Email Configuration screen in Service Center.


Regards,
João Rosado
You can get the Hostname configuration from the Environment Configuration in the Service Center with an SQL query:
SELECT [VAL]
FROM [ossys_Parameter]
WHERE [NAME]='DefaultDnsName'
I had the same problem trying to use GetServerName() to build an entry point URL within a Timer. I'm happy to say that I found a solution that may work for you. The steps are very simple...

  1. Go to Add/Remove Dependencies.
  2. Find the HtmlRenderer extension.
  3. Select the GetMachineName() function in the list.
Now you can reference it in your Timer action. Here is a sample of how I used it in my Timer...

        "http://" + GetMachineName() + "/eSpaceName/EntryPoint.aspx

That's all there is to it!

I hope this helps!
Daryl