View Single Post
  #1 (permalink)  
Old November 17th, 2005, 12:15 AM
askman askman is offline
Registered User
Join Date: Nov 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access file in WSS through browser or C# code?

If I use OWA(Outlook Web Access) to access WSS, it can access directory. For example, http://localhost/public/myfolder. If I point to a file in such directory, for example http://localhost/public/myfolder/a1.xml, then browser will display 403 error and a1.xml can not be accessed.
Similarity, if I use following code to acesss http://localhost/public/myfolder/a1.xml, it still tell me the 403 error from catch statements:

 WebClient client = new WebClient();
 client.Credentials = new System.Net.NetworkCredential("username", "password");
 inputStream = client.OpenRead("http://localhost/public/myfolder/a1.xml");
 reader = new XmlTextReader(inputStream);
catch (WebException webEx)
Would you please tell me how to resolve this problem?

Reply With Quote