[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

James

8/22/2003 1:09:00 PM

I tried that. I used

string strPath = Server.MapPath("/PermitWebServices");

where PermitWebServices was my virtual directory.

This returned:

C:\inetpub\wwwroot\PermitWebServices

however the real path is

C:\inetpub\wwwroot\ImpactWebServices\PermitWebServices

I need the real path. Any suggestions?
Thanks.

>-----Original Message-----
>Hi James,
>
>You may use Server.MapPath to meet your requirements.
Check the following
>link for more information.
>
>HttpServerUtility.MapPath Method
><http://msdn.microsoft.com/library/de...
url=/library/en-us/cpref/html
>/frlrfSystemWebHttpServerUtilityClassMapPathTopic.asp>
>
>Does this answer your question? Please let me know if you
need more
>information, thanks.
>
>Best regards,
>Lewis
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>--------------------
>| Content-Class: urn:content-classes:message
>| From: "James" <james@imp-res.com>
>| Sender: "James" <james@imp-res.com>
>| Subject: Finding the webservice path
>| Date: Thu, 21 Aug 2003 08:09:15 -0700
>| Lines: 9
>| Message-ID: <000b01c367f6$2fb0d680$a301280a@phx.gbl>
>| MIME-Version: 1.0
>| Content-Type: text/plain;
>| charset="iso-8859-1"
>| Content-Transfer-Encoding: 7bit
>| X-Newsreader: Microsoft CDO for Windows 2000
>| Thread-Index: AcNn9i+wcCjNOjp3S72RIhCxxuGJdg==
>| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>| Newsgroups:
microsoft.public.dotnet.framework.aspnet.webservices
>| Path: cpmsftngxa06.phx.gbl
>| Xref: cpmsftngxa06.phx.gbl
>microsoft.public.dotnet.framework.aspnet.webservices:18923
>| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
>| X-Tomcat-NG:
microsoft.public.dotnet.framework.aspnet.webservices
>|
>| I need to get the physical path (i.e
>| C:\inetpub\wwwroot\webservice\bin) where a webservice
is
>| located. I need to create and reference a sub-
directory
>| where I can work with some initialization files when
the
>| webservice initializes and starts.
>|
>| How do I get the directory in c#.
>|
>| Thanks.
>|
>
>.
>
1 Answer

v-lwang

8/25/2003 2:12:00 AM

0

Hi James,

You may remove the "/" before "PermitWebServices"

string strPath = Server.MapPath("PermitWebServices");

Please try again to see if it meets your requirements, thanks.

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.


-------------------
| Content-Class: urn:content-classes:message
| From: "James" <james@imp-res.com>
| Sender: "James" <james@imp-res.com>
| References: <000b01c367f6$2fb0d680$a301280a@phx.gbl>
<V1tVWCJaDHA.2136@cpmsftngxa06.phx.gbl>
| Subject: RE: Finding the webservice path
| Date: Fri, 22 Aug 2003 06:08:32 -0700
| Lines: 78
| Message-ID: <0c4501c368ae$7ceed150$a301280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcNornzuJfPRP01MQz+Nr443AeQbLg==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:18955
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
| I tried that. I used
|
| string strPath = Server.MapPath("/PermitWebServices");
|
| where PermitWebServices was my virtual directory.
|
| This returned:
|
| C:\inetpub\wwwroot\PermitWebServices
|
| however the real path is
|
| C:\inetpub\wwwroot\ImpactWebServices\PermitWebServices
|
| I need the real path. Any suggestions?
| Thanks.
|
| >-----Original Message-----
| >Hi James,
| >
| >You may use Server.MapPath to meet your requirements.
| Check the following
| >link for more information.
| >
| >HttpServerUtility.MapPath Method
| ><http://msdn.microsoft.com/library/de...
| url=/library/en-us/cpref/html
| >/frlrfSystemWebHttpServerUtilityClassMapPathTopic.asp>
| >
| >Does this answer your question? Please let me know if you
| need more
| >information, thanks.
| >
| >Best regards,
| >Lewis
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights.
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "James" <james@imp-res.com>
| >| Sender: "James" <james@imp-res.com>
| >| Subject: Finding the webservice path
| >| Date: Thu, 21 Aug 2003 08:09:15 -0700
| >| Lines: 9
| >| Message-ID: <000b01c367f6$2fb0d680$a301280a@phx.gbl>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| Thread-Index: AcNn9i+wcCjNOjp3S72RIhCxxuGJdg==
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Newsgroups:
| microsoft.public.dotnet.framework.aspnet.webservices
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| >microsoft.public.dotnet.framework.aspnet.webservices:18923
| >| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| >| X-Tomcat-NG:
| microsoft.public.dotnet.framework.aspnet.webservices
| >|
| >| I need to get the physical path (i.e
| >| C:\inetpub\wwwroot\webservice\bin) where a webservice
| is
| >| located. I need to create and reference a sub-
| directory
| >| where I can work with some initialization files when
| the
| >| webservice initializes and starts.
| >|
| >| How do I get the directory in c#.
| >|
| >| Thanks.
| >|
| >
| >.
| >
|