Well, the current state of this application is using the setup that you assumed
(a virtual directory pointing to the unc share), but I was thinking that maybe it woul
be better to access the file directly rather than via the UNC share (hence my wonderin
if what the preferred best practise when choosing between these 2 options). If going directl
I would eliminate a potential fail-over point (e.g. the webserver going down, or being restarted etc...
From the Framework class library reference
"WebRequest descendants are typically registered to handle a specific protocol, such as HTTP or FTP, but can be registered to handle a request to a specific server or path on a server.
So there should be some way connect to a share \\server\share - but I haven't found the right syntax for it as yet
I can access the files by entering my unc share in the browser so I know the unc file path is correct
Joh
----- William F. Robertson, Jr. wrote: ----
I also was assuming you had a virtual directory set up called "share" tha
points to \\server\share and has all the associated permissions
Also, the URI you are using in your Create method, try placing that straigh
into a browser and make sure you can open that way
Can you not just access the file through UNC
//You will also need to set the GetReponse to the WebResponse object
WebResponse response = request.GetResponse()
//this probably isn't the only way to do this
System.IO.Stream stream = response.GetResponseStream()
StreamReader reader = new StreamReader( stream )
string s = reader.ReadToEnd()
response.Close(
HTH
bil
John K said:
"
http://server/share/file.xml" )
request.PreAuthenticate = true
request.Credentials = new NetworkCredential( "user", "pass" )
surely? I've tried a couple of different variant