Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Tuned Listener
Posts: 67
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!

Highlighted
Bronze Super Contributor
Posts: 129
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
Highlighted
Tuned Listener
Posts: 67
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!

Highlighted
Bronze Super Contributor
Posts: 129
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
Highlighted
Tuned Listener
Posts: 67
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.

Highlighted
Bronze Super Contributor
Posts: 129
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