Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Can it cause problems when using reflection in a web service?

Reply
Thread Tools

Can it cause problems when using reflection in a web service?

 
 
grompl
Guest
Posts: n/a
 
      06-22-2006
I want to read an xml file that is located in the directory of the web
service (c:\inetpub\wwwroot\WLSService\). I've written this little test
method:

<WebMethod()> Public Function openregwls() As String
Dim path As String =
System.Reflection.Assembly.GetExecutingAssembly.Co deBase
path = path.Substring(0, path.LastIndexOf("/"c)) 'bin path
path = path.Substring(0, path.LastIndexOf("/"c) + 1) 'root
path of web service

Dim xmlDoc As New Xml.XmlDocument
xmlDoc.Load(path & "reg.wls")


Return xmlDoc.OuterXml
End Function

it works fine on my machine, but can it cause problems on other
machines like permission or security exeptions?

 
Reply With Quote
 
 
 
 
Michel Posseth [MCP]
Guest
Posts: n/a
 
      06-24-2006

Well unless you have altered the settings of your server it should work
just as fine on another default server
as ASP.net is always running under a seperate account ( also on your dev
machine )


I have made webservice that even access XML files that are on a different
server as the webservice but on the same private network
and exposed them to the web this can be done with the right security
settings on the fileshare path and the asp.net worker process account

however copying this webservice to another server does require the
alteration of settings on the new server


regards

Michel Posseth [MCP]


"grompl" <> schreef in bericht
news: ups.com...
>I want to read an xml file that is located in the directory of the web
> service (c:\inetpub\wwwroot\WLSService\). I've written this little test
> method:
>
> <WebMethod()> Public Function openregwls() As String
> Dim path As String =
> System.Reflection.Assembly.GetExecutingAssembly.Co deBase
> path = path.Substring(0, path.LastIndexOf("/"c)) 'bin path
> path = path.Substring(0, path.LastIndexOf("/"c) + 1) 'root
> path of web service
>
> Dim xmlDoc As New Xml.XmlDocument
> xmlDoc.Load(path & "reg.wls")
>
>
> Return xmlDoc.OuterXml
> End Function
>
> it works fine on my machine, but can it cause problems on other
> machines like permission or security exeptions?
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems invoking a getter method using reflection? Pep Java 5 07-08-2009 03:49 PM
Finding all Web Forms in a web site using reflection Per Bolmstedt ASP .Net 4 12-14-2006 06:26 PM
will all these messages cause a problem . I am a new subscriber and my computer is downloading 100,000 messages. Will this cause any kind of a problem with my ability to store other items?? Camille White Camille White Computer Support 9 11-08-2004 01:13 AM
Managed C++ Web Service - strange reflection problems Ray Deese ASP .Net Web Services 0 05-06-2004 06:16 PM
Using reflection in an asp.net web page ... performance Mark ASP .Net 2 04-10-2004 11:50 PM



Advertisments