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

G

grompl

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.CodeBase
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?
 
M

Michel Posseth [MCP]

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top