Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Tuned Listener
yshld
Posts: 63
Registered: 11-29-2011

How to get the SalesLogix Web server root directory?

Hi,

 

I would like to know how I can get the application root directory of SalesLogix Web? For example if my SalesLogix Portal is running under SLXClent directory of IIS? How can I get the path of the IIS directory?

 

Thanks a lot for any help!

Please use plain text.
Bronze Contributor
rchavez
Posts: 91
Registered: 06-09-2009

Re: How to get the SalesLogix Web server root directory?

Page.Server.MapPath("/")
Raul A. Chavez
http://raul.chavez.com
http://www.crmbi.com
Please use plain text.
Tuned Listener
yshld
Posts: 63
Registered: 11-29-2011

Re: How to get the SalesLogix Web server root directory?

Is it a static method? Which assembly is it?

 

Thanks  a lot!

Please use plain text.
Bronze Contributor
rchavez
Posts: 91
Registered: 06-09-2009

Re: How to get the SalesLogix Web server root directory?

It goes back to the ASP Objects: Application, Server, Session, Request and Response.

 

In ASP.Net, I believe you have it wrapped under the HttpServerUtility class (System.Web.HttpServerUtility).

 

Each Page will have a reference to it already built, so all you need to do is:

 

Page.Server.

 

or this.

 

Or Server.  (It all depends on the Class that your Web Page is derived on, so if working on an SLX Control, you may need to do Page.Server to get an instance of the Object).

 

Raul A. Chavez
http://raul.chavez.com
http://www.crmbi.com
Please use plain text.
Tuned Listener
yshld
Posts: 63
Registered: 11-29-2011

Re: How to get the SalesLogix Web server root directory?

Thank a lot for your reply. My problem here is I am not dealing with it in a ASP page. I use a external assembly for my Business Rules. In the business rule method I need to get the path, how can I get the reference to the Page object in this way? The only thing SalesLogix passed in to the method is the Entity.

Please use plain text.
Bronze Contributor
rchavez
Posts: 91
Registered: 06-09-2009

Re: How to get the SalesLogix Web server root directory?

It is on the System.Web dll

You could try instantiating an object and see if it works:

System.Web.HttpServerUtility util = new System.Web.HttpServerUtility();
string path = util.MapPath("/");
Raul A. Chavez
http://raul.chavez.com
http://www.crmbi.com
Please use plain text.